:root {
  --paper: #f2effa;
  --ink: #17152f;
  --muted: #77758e;
  --line: #e1deeb;
  --green: #6252df;
  --lime: #e2ff58;
  --orange: #ff705b;
  --white: #fff;
  --shadow: 0 16px 38px #28204412;
}

html, body { background: var(--paper); }
body { color: var(--ink); font-family: Inter, "Aptos", "Segoe UI", "Noto Sans JP", sans-serif; }
.shell { max-width: 1160px; padding: 0 38px 48px; }
.top { margin: 0 -38px; padding: 17px 38px; background: var(--ink); color: #fff; border: 0; }
.brand { gap: 11px; font-weight: 850; }
.brand-icon { width: 38px; height: 38px; border-radius: 13px; background: var(--lime); color: var(--ink); transform: rotate(-5deg); }
.brand small { color: #aaa7c2; font-size: 8px; letter-spacing: .2em; }
.top-right { gap: 8px; }
.pill { border-color: #ffffff3b; color: #d2cfe2; padding: 9px 14px; font-size: 10px; }
.pill.active { background: var(--lime); color: var(--ink); border-color: var(--lime); }
#adminToggle { color: white; }
.hero { gap: 20px; min-height: 215px; margin: 29px 0 23px; padding: 32px 35px 29px; background: var(--lime); border-radius: 26px; position: relative; overflow: hidden; }
.hero:after { content: ""; position: absolute; right: 12%; top: -56px; font-size: 260px; line-height: 1; color: #17152f0b; transform: rotate(12deg); }
.hero > div { position: relative; z-index: 1; }
.eyebrow { color: var(--green); font-size: 9px; font-weight: 850; letter-spacing: .17em; }
.hero h1 { max-width: 740px; margin: 13px 0; font-size: clamp(38px, 5.5vw, 66px); font-weight: 900; line-height: 1.02; letter-spacing: -.075em; }
.hero p { max-width: 490px; margin: 0; color: #45415f; font-size: 13px; line-height: 1.6; }
.day-tag { position: relative; z-index: 1; padding: 11px 14px; background: var(--ink); color: var(--lime); border-radius: 10px; font-size: 10px; font-weight: 850; letter-spacing: .05em; transform: none; }
.layout { grid-template-columns: minmax(0, 1.45fr) minmax(285px, .72fr); gap: 17px; }
.card { border-color: var(--line); background: var(--white); border-radius: 23px; box-shadow: var(--shadow); }
.stamp-card { padding: 27px 30px 23px; overflow: hidden; }
.stamp-card:after { content: "01—04"; position: absolute; top: 19px; right: 26px; color: #f0eef6; font-size: 42px; font-weight: 900; letter-spacing: -.1em; }
.card-head h2 { font-size: 17px; letter-spacing: -.045em; }
.card-head p { margin-top: 6px; color: var(--muted); font-size: 11px; }
.mono { color: var(--muted); font: 10px ui-monospace, monospace; }
.stamps { gap: 14px; margin: 25px 4px 20px; }
.stamp { border: 1.5px dashed #c9c5d9; background: #faf9fd; color: #b7b2c9; font: 10px ui-monospace, monospace; }
.stamp:before { content: ""; position: absolute; inset: 7px; border: 1px solid #f0eef5; border-radius: 50%; }
.stamp.filled { background: var(--green); color: white; box-shadow: inset 0 0 0 5px #ffffff17; }
.stamp.filled:after { color: var(--lime); font-size: 27px; }
.stamp:nth-child(4).filled { background: var(--orange); }
.progressline { padding-top: 16px; }
.progressline strong { font-size: 13px; }
.progressline span { color: var(--muted); font-size: 10px; }
.side { position: relative; overflow: hidden; padding: 21px 22px; gap: 15px; background: var(--ink); color: white; border: 0; }
.side:after { content: "★"; position: absolute; top: 53px; right: 5px; color: #ffffff0b; font-size: 140px; }
.side > * { position: relative; z-index: 1; }
.side h3 { font-size: 13px; }
.prize-art { height: 125px; border-radius: 17px; background: linear-gradient(135deg, #7458ef, #f176bd); color: var(--lime); }
.prize-art:before, .prize-art:after { content: ""; position: absolute; width: 100px; height: 100px; border: 1px solid #ffffff40; border-radius: 50%; }
.prize-art:after { width: 145px; height: 145px; }
.sun { width: 67px; height: 67px; border: 1px solid #ffffffa0; background: #ffffff1a; box-shadow: none; font-size: 32px; }
.side-copy b { font-size: 12px; }
.side-copy span { color: #bcb8d3; font: 9px ui-monospace, monospace; }
.stock-track { height: 7px; background: #39354e; }
.stock-track i { background: var(--lime); }
.stock-caption { margin-top: -7px; color: #c6c2d7; font-size: 9px; }
.actions { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-top: 14px; }
.btn { border-radius: 14px; padding: 15px 19px; font-weight: 850; }
.btn-primary { background: var(--green); color: white; }
.btn-primary:disabled { background: #dfddeb; color: #a6a2b7; opacity: 1; }
.btn-light { background: #e9e6f4; color: var(--ink); }
.btn-orange { background: var(--orange); color: white; }
.btn-danger { background: #a93232; color: #fff; }
.btn-danger:disabled { cursor: not-allowed; opacity: .48; }
.bottomnote { gap: 9px; margin: 12px 3px 0; color: var(--muted); font-size: 10px; }
.dot { width: 8px; height: 8px; background: #7ac6b7; box-shadow: 0 0 0 4px #7ac6b722; }
.section-head { margin: 26px 2px 11px; }
.section-head h2 { font-size: 15px; }
.section-head span { color: var(--muted); font: 9px ui-monospace, monospace; letter-spacing: .08em; }
.spot-strip { gap: 8px; }
.spot { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.spot label { color: var(--muted); font: 8px ui-monospace, monospace; }
.spot b { margin-top: 5px; font-size: 10px; }
.footer { gap: 14px; margin-top: 20px; color: var(--muted); font-size: 9px; }
.textbtn { color: var(--green); font-weight: 800; }
.toast { z-index: 30; bottom: 22px; padding: 12px 18px; background: var(--ink); font-size: 11px; }
.admin-stats { gap: 10px; }
.stat { padding: 19px; }
.stat label { color: var(--muted); font-size: 9px; font-weight: 750; }
.stat strong { margin: 10px 0 3px; font-size: 29px; }
.stat small { color: var(--green); font-size: 9px; font-weight: 700; }
.admin-grid { gap: 13px; margin-top: 13px; }
.panel { padding: 20px; }
.panel h3 { margin-bottom: 14px; font-size: 13px; }
.row { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; padding: 11px 0; font-size: 10px; }
.row small { color: var(--muted); }
.spot-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.row .spot-actions .textbtn { padding: 5px 2px; font-size: 9px; }
.row .spot-actions .spot-delete { color: #a93232; }
.switch { background: #d9d6e5; }
.switch.on { background: var(--green); }
.feed { color: var(--muted); font-size: 10px; line-height: 1.9; }
.feed b { color: var(--ink); }
.modal-bg { z-index: 20; padding: 16px; background: #111022bd; backdrop-filter: blur(4px); }
.modal { width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 26px; border-radius: 24px; background: #fbfaff; box-shadow: 0 30px 100px #0c0b1a55; }
.modal h2 { margin: 10px 0; font-size: 22px; letter-spacing: -.06em; }
.modal p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.close { top: 15px; right: 15px; width: 32px; height: 32px; background: #e9e6f4; color: var(--ink); }
.scan-options { gap: 8px; margin: 17px 0; }
.scan-option { padding: 12px; border: 1px solid var(--line); border-radius: 13px; font-size: 11px; }
.roulette-wheel { border-color: white; box-shadow: 0 8px 30px #24183c24; }
.result { color: var(--green) !important; font-weight: 900; }
.won { padding: 16px; border-radius: 15px; background: var(--lime); color: var(--ink); font-weight: 850; }

@media (max-width: 780px) {
  .shell { padding: 0 24px 38px; }
  .top { margin: 0 -24px; padding: 14px 24px; }
  .hero { margin-top: 20px; }
  .layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; }
  .stamp-card { padding: 22px; }
  .stamps { gap: 9px; }
  .side { padding: 17px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; }
  .spot-actions { gap: 5px; }
  .row .spot-actions .textbtn { font-size: 8px; }
}
@media (max-width: 600px) {
  body { overflow-x: hidden; }
  .shell { max-width: none; padding: 0 0 calc(26px + env(safe-area-inset-bottom)); }
  .top { position: relative; margin: 0; padding: 12px 15px; }
  .brand { gap: 9px; font-size: 13px; }
  .brand-icon { width: 32px; height: 32px; border-radius: 11px; }
  .brand small { font-size: 7px; }
  .top-right { gap: 4px; }
  .pill { padding: 8px 9px; font-size: 9px; }
  #adminToggle { padding: 8px 10px; font-size: 0; }
  #adminToggle:after { content: "運営"; font-size: 9px; }
  #player, #admin { padding: 0 14px; }
  .hero { display: block; min-height: 0; margin: 12px 0; padding: 21px 20px 18px; border-radius: 21px; }
  .hero:after { top: -12px; right: 5px; font-size: 150px; }
  .hero .eyebrow { font-size: 8px; }
  .hero h1 { margin: 10px 0; font-size: 35px; line-height: 1.04; }
  .hero p { max-width: 290px; font-size: 11px; line-height: 1.55; }
  .day-tag { display: inline-block; margin-top: 14px; padding: 8px 10px; border-radius: 8px; font-size: 8px; }
  .layout { display: flex; flex-direction: column; gap: 10px; }
  .stamp-card { padding: 18px 17px 15px; border-radius: 19px; }
  .stamp-card:after { top: 13px; right: 15px; font-size: 32px; }
  .card-head h2 { font-size: 14px; }
  .card-head p { font-size: 9px; }
  .mono { font-size: 9px; }
  .stamps { gap: 8px; margin: 18px 1px 14px; }
  .stamp:before { inset: 5px; }
  .stamp.filled:after { font-size: 22px; }
  .progressline { padding-top: 13px; }
  .progressline strong { font-size: 11px; }
  .progressline span { font-size: 9px; }
  .side { display: grid; grid-template-columns: 70px minmax(0, 1fr); grid-template-areas: "title title" "art name" "art track" "art caption"; gap: 7px 12px; padding: 15px; border-radius: 19px; }
  .side h3 { grid-area: title; font-size: 12px; }
  .prize-art { grid-area: art; width: 70px; height: 88px; border-radius: 13px; }
  .sun { width: 54px; height: 54px; font-size: 25px; }
  .side-copy { display: block; grid-area: name; align-self: end; }
  .side-copy b { font-size: 11px; }
  .side-copy span { display: block; margin-top: 3px; font-size: 8px; }
  .stock-track { grid-area: track; align-self: center; }
  .stock-caption { grid-area: caption; margin: 0; font-size: 8px; }
  .actions { position: sticky; z-index: 8; bottom: calc(8px + env(safe-area-inset-bottom)); grid-template-columns: 1.1fr .9fr; gap: 7px; margin: 9px -2px 7px; padding: 6px; border: 1px solid #e5e2ef; border-radius: 16px; background: #fbfaffed; box-shadow: 0 7px 25px #211a4020; backdrop-filter: blur(12px); }
  .actions .btn { min-height: 48px; padding: 10px 7px; border-radius: 12px; font-size: 11px; }
  .actions #scanBtn { background: var(--orange); color: white; }
  .actions #spinBtn:disabled { background: #e6e3ef; color: #a6a2b4; opacity: 1; }
  .bottomnote { margin: 5px 2px 15px; font-size: 9px; }
  .section-head { margin: 20px 2px 9px; }
  .section-head h2 { font-size: 13px; }
  .section-head span { font-size: 7px; }
  .spot-strip { display: flex; gap: 7px; overflow-x: auto; margin: 0 -14px; padding: 0 14px 5px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .spot-strip::-webkit-scrollbar { display: none; }
  .spot { flex: 0 0 103px; padding: 11px; border-radius: 13px; scroll-snap-align: start; }
  .spot label { font-size: 7px; }
  .spot b { font-size: 9px; }
  .footer { display: block; margin: 17px 2px 0; font-size: 8px; line-height: 1.8; }
  .footer > span { display: block; }
  .footer > span + span { margin-top: 3px; }
  .admin-stats { gap: 7px; }
  .stat { padding: 13px; border-radius: 15px; }
  .stat label, .stat small { font-size: 8px; }
  .stat strong { margin: 7px 0 2px; font-size: 23px; }
  .admin-grid { gap: 9px; margin-top: 10px; }
  .panel { padding: 15px; border-radius: 17px; }
  .panel h3 { margin-bottom: 10px; font-size: 12px; }
  .row { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 5px; padding: 9px 0; font-size: 8px; }
  .row small { font-size: 7px; }
  .row .textbtn { font-size: 8px; }
  .adminbar { margin-top: 9px; }
  .adminbar .day-tag { margin: 0; }
  .modal { padding: 21px; border-radius: 20px; }
  .modal h2 { font-size: 20px; }
}
@media (max-width: 360px) {
  .top { padding-inline: 10px; }
  .brand { font-size: 11px; }
  .brand-icon { width: 29px; height: 29px; }
  .brand small { letter-spacing: .14em; }
  .top-right { gap: 3px; }
  .pill { padding: 7px 8px; }
  .hero { padding: 19px; }
  .hero h1 { font-size: 31px; }
  .stamps { gap: 6px; }
  .progressline strong { font-size: 10px; }
  .actions .btn { font-size: 10px; }
  .row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .row .spot-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .row .textbtn { grid-column: 1 / -1; text-align: left; }
}

/* OMU KOSEN student field-rally direction: workshop notebook + wayfinding. */
:root {
  --paper: #f4f1e8;
  --ink: #17283a;
  --muted: #657385;
  --line: #d6d9d5;
  --green: #1768a6;
  --lime: #f3b544;
  --orange: #e35c35;
  --white: #fffefa;
  --shadow: 0 12px 32px #1b324015;
}
html, body { background-color: var(--paper); }
body {
  background-image: linear-gradient(#526b7b0b 1px, transparent 1px), linear-gradient(90deg, #526b7b0b 1px, transparent 1px);
  background-size: 24px 24px;
}
.top { background: var(--ink); border-bottom: 3px solid var(--lime); }
.brand-icon { border-radius: 9px; background: var(--lime); color: var(--ink); transform: rotate(-3deg); }
.brand small { color: #b8c7d4; letter-spacing: .13em; }
.pill.active { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.hero {
  min-height: 220px; padding: 30px 34px; border: 1px solid #23547c;
  border-radius: 12px; background: #173b5b; color: white;
  box-shadow: 7px 7px 0 #1768a626;
}
.hero:after {
  content: "+  +  +"; top: auto; right: 20px; bottom: 3px;
  color: #ffffff0d; font: 900 92px/1 ui-monospace, monospace;
  letter-spacing: -.15em; transform: rotate(-12deg);
}
.eyebrow { color: var(--lime); font-family: ui-monospace, monospace; }
.hero h1 { max-width: 660px; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.06em; }
.hero p { color: #d5e2eb; }
.day-tag { border-radius: 4px; background: var(--lime); color: var(--ink); transform: rotate(-2deg); }
.card { border: 1px solid #cfd4d4; border-radius: 13px; box-shadow: 4px 5px 0 #17283a10; }
.stamp-card { background: #fffefa; }
.stamp-card:after { color: #1768a60d; font-family: ui-monospace, monospace; }
.stamp { border-radius: 12px; background: #f8f7f1; }
.stamp:before { border-radius: 6px; }
.stamp.filled { border-radius: 12px; background: var(--green); color: white; }
.stamp.filled:after { content: none; display: none; }
.stamp.filled span { opacity: 1; color: #fff; font-weight: 850; }
.stamp:nth-child(4).filled { background: var(--orange); }
.side { background: #fffefa; color: var(--ink); }
.side:after { color: #1768a60b; }
.prize-art { border-radius: 8px; background-color: #164e76; background-image: linear-gradient(#ffffff10 1px, transparent 1px), linear-gradient(90deg, #ffffff10 1px, transparent 1px); background-size: 18px 18px; }
.sun { border-color: #f3b54480; color: var(--lime); }
.stock-track { background: #e6e8e2; }
.stock-track i { background: var(--orange); }
.btn { border-radius: 8px; }
.btn-primary { background: var(--green); }
.btn-orange { background: var(--orange); }
.spot { border: 1px solid var(--line); border-radius: 8px; background: #fffefa; }
.spot label, .mono, .section-head span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.textbtn { color: var(--green); }
.modal { border: 1px solid var(--line); border-radius: 14px; }
.probability-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; }
.probability-copy h3 { margin: 0 0 5px; font-size: 14px; }
.probability-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.probability-form { display: grid; grid-template-columns: auto minmax(100px, 130px) auto; align-items: center; gap: 9px; }
.probability-form label { color: var(--muted); font-size: 11px; font-weight: 750; }
.probability-input { display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.probability-input input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 10px 0; color: var(--ink); background: transparent; font-size: 16px; font-weight: 850; }
.probability-input span { color: var(--muted); font-size: 12px; font-weight: 750; }
.probability-form .btn { padding: 11px 17px; }
.event-settings { margin-top: 16px; }
.reset-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; border-color: #e8caca; background: #fffafa; }
.reset-panel h3 { margin: 4px 0 5px; }
.reset-panel p { max-width: 620px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.reset-panel .eyebrow { color: #a93232; }
.settings-header h3 { margin: 0 0 5px; font-size: 15px; }
.settings-header p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.setting-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 750; }
.setting-field.span-two { grid-column: span 2; }
.setting-field input:not([type="file"]):not([type="checkbox"]) { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; outline-color: var(--green); background: white; color: var(--ink); font-size: 15px; font-weight: 700; }
.setting-field input[type="file"] { max-width: 100%; padding: 7px; border: 1px dashed var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 11px; }
.settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.settings-actions span { color: var(--muted); font-size: 10px; }
.settings-actions .btn { flex: 0 0 auto; padding: 11px 18px; }
.image-setting { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.image-setting img { width: 112px; height: 78px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: white; }
.image-setting img[hidden], .prize-image[hidden] { display: none !important; }
.check-field { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.check-field input { width: 16px; height: 16px; accent-color: var(--orange); }
.prize-image { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) {
  body { background-size: 18px 18px; }
  .top { border-bottom-width: 3px; }
  .brand-icon { border-radius: 8px; }
  .hero { min-height: 0; padding: 20px 18px 19px; border-radius: 11px; }
  .hero:after { top: auto; right: 0; bottom: -4px; font-size: 53px; }
  .hero h1 { max-width: 330px; font-size: 30px; line-height: 1.12; }
  .hero p { color: #d5e2eb; }
  .day-tag { border-radius: 4px; }
  .stamp-card, .side { border-radius: 12px; }
  .stamp-card:after { font-size: 28px; }
  .stamp { border-radius: 9px; }
  .stamp:before { border-radius: 5px; }
  .stamp.filled { border-radius: 9px; }
  .stamp.filled:after { content: none; display: none; }
  .stamp.filled span { opacity: 1; color: #fff; font-weight: 850; }
  .actions { background: #f4f1e8ed; border-color: #d6d9d5; border-radius: 11px; }
  .actions .btn { border-radius: 8px; }
  .actions #scanBtn { background: var(--orange); }
  .spot { border-radius: 9px; }
  .modal { border-radius: 13px; }
  .probability-panel { display: block; margin-top: 11px; padding: 15px; }
  .probability-copy h3 { font-size: 13px; }
  .probability-copy p { font-size: 10px; line-height: 1.5; }
  .probability-form { grid-template-columns: auto minmax(80px, 1fr) auto; gap: 8px; margin-top: 12px; }
  .probability-form label { font-size: 10px; }
  .probability-form .btn { min-height: 42px; padding: 9px 14px; }
  .event-settings { margin-top: 11px; padding: 15px; }
  .settings-header h3 { font-size: 14px; }
  .settings-header p { margin-bottom: 13px; font-size: 10px; line-height: 1.5; }
  .reset-panel { display: block; }
  .reset-panel .btn { width: 100%; margin-top: 12px; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .setting-field.span-two { grid-column: span 2; }
  .setting-field { font-size: 9px; }
  .setting-field input:not([type="file"]):not([type="checkbox"]) { padding: 9px; font-size: 16px; }
  .settings-actions { align-items: stretch; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 12px; }
  .settings-actions .btn { width: 100%; min-height: 44px; }
  .image-setting { gap: 9px; }
}
