:root{--navy:#1d2e55;--ink:#252c2a;--muted:#858a86;--paper:#fbfbf8;--line:#e4e5df;--blue:#91c7ed;--bg:#f0f3fa}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:"DM Sans","Noto Sans KR",sans-serif}.topline{width:min(1140px,calc(100% - 48px));margin:0 auto;height:80px;display:flex;align-items:center;justify-content:space-between;font-size:10px;letter-spacing:2px;color:#737b85}.top-actions{display:flex;align-items:center;gap:17px}.gallery-open{border:0;background:transparent;color:#667080;letter-spacing:.2px;font-size:12px;cursor:pointer}.admin-toggle{border:1px solid #d9dde3;background:#fff;border-radius:20px;padding:7px 11px;color:#667080;font-size:10px;cursor:pointer}.admin-toggle.selected{background:var(--navy);border-color:var(--navy);color:#fff}.gallery-open b{display:inline-grid;place-items:center;width:21px;height:21px;border-radius:50%;margin-left:5px;background:var(--navy);color:white;font-size:10px}.layout{width:min(1140px,calc(100% - 48px));min-height:730px;margin:34px auto 70px;display:grid;grid-template-columns:1fr 1fr;background:white;border:1px solid #e0e2e5;border-radius:22px;overflow:hidden;box-shadow:0 18px 55px #23365b0b}.story-panel{background:var(--navy);color:white;padding:42px 40px 30px;display:flex;flex-direction:column;position:relative;overflow:hidden}.event-chip{border:1px solid #8190a5;border-radius:40px;padding:11px 17px;font-size:11px;width:max-content;color:#e5eaf1;letter-spacing:.3px}.eyebrow{font-size:10px;letter-spacing:2.4px;color:#c6d2e0;margin:46px 0 18px}.story-panel h1{font-family:"Noto Sans KR",sans-serif;font-size:35px;line-height:1.65;letter-spacing:-1.7px;margin:0;font-weight:800}.story-panel h1 em{font-style:normal;color:var(--blue)}.story-copy{font-size:14px;line-height:1.9;color:#d2d8e3;margin:20px 0}.track-art{height:280px;margin-top:auto;position:relative;display:flex;flex-direction:column;justify-content:flex-end;padding:0 0 46px 45px}.track-art:before,.track-art:after{content:"";position:absolute;left:-25px;bottom:18px;width:390px;height:165px;border:1px solid #72849a;border-radius:50% 50% 0 0;transform:rotate(-17deg);opacity:.8}.track-art:after{left:-8px;bottom:35px;width:350px;height:138px;opacity:.7}.track-art span{position:absolute;left:60%;top:29%;font-size:9px;letter-spacing:3px;color:#c3d0df;transform:rotate(-23deg)}.track-art strong{font-size:55px;font-weight:400;color:var(--blue);line-height:1;z-index:1}.track-art small{font-size:8px;letter-spacing:2px;color:#c9d4e2;margin-top:12px;z-index:1}.story-footer{border-top:1px solid #66768e;padding-top:20px;display:flex;justify-content:space-between;color:#c4ccd8;font-size:8px;letter-spacing:1.3px}.form-panel{padding:34px 42px 27px;display:flex;flex-direction:column}.steps{height:40px;display:flex;align-items:center;justify-content:space-between;margin-bottom:38px}.steps>i{height:1px;background:#e5e6e0;flex:1;margin:0 13px}.step{display:flex;align-items:center;gap:8px;color:#a2a59f;font-size:10px;white-space:nowrap}.step b{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:#f2f3ef;font-size:10px}.step.active{color:var(--navy);font-weight:700}.step.active b,.step.done b{background:var(--navy);color:white}.section-kicker{font-size:9px;color:#747b77;letter-spacing:2px;margin:0 0 12px}.view{display:none}.view.active{display:block}.view h2,.gallery-head h2{font-family:"Noto Sans KR",sans-serif;font-size:23px;letter-spacing:-.8px;margin:0 0 8px}.subheading{font-size:12px;color:#7e837f;margin:0 0 30px}.field-label{display:block;font-family:"Noto Sans KR",sans-serif;font-size:13px;font-weight:700;margin-bottom:10px}.field-label small{font-size:10px;color:#999;font-weight:400;margin-left:7px}.form-panel input{font-family:inherit}.form-panel input:not([type=checkbox]){border:1px solid var(--line);border-radius:10px;background:var(--paper);height:54px;padding:0 15px;font-size:14px;color:var(--ink);outline:none;transition:.18s}.form-panel input:focus{border-color:#8396b1;box-shadow:0 0 0 3px #1d2e550d}.form-panel input::placeholder{color:#aaa}.#name{width:100%}#name{display:block;width:100%}.hint{font-size:9px;color:#9a9e98;margin:8px 0 28px}.time-label{margin-bottom:10px}.time-fields{display:grid;grid-template-columns:1fr 12px 1fr 12px 1fr;align-items:start;gap:8px}.time-fields label{display:flex;flex-direction:column;align-items:center;gap:8px}.time-fields input{width:100%;text-align:center;font-size:24px!important;letter-spacing:2px;padding:0!important}.time-fields label span{font-size:10px;color:#8e928d}.time-fields>b{font-weight:400;color:#8c908b;margin-top:16px;text-align:center}.error{font-size:11px;color:#b64242;min-height:16px;margin:10px 0 3px}.primary{width:100%;height:52px;border:0;border-radius:8px;background:var(--navy);color:white;font-family:"Noto Sans KR",sans-serif;font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:space-between;padding:0 17px;cursor:pointer;transition:transform .15s,background .15s}.primary:hover{background:#2a416f;transform:translateY(-1px)}.primary span{font-size:20px;font-weight:400}.notice{display:flex;gap:10px;padding:14px;background:#f6f7f3;border-radius:9px;margin-top:18px;color:#c0392b;font-size:10px;line-height:1.8}.notice b{font-size:14px;color:#c0392b}.privacy-note{text-align:center;font-size:9px;line-height:1.8;color:#999e98;margin:20px 0 0}.record-card{background:var(--navy);color:white;border-radius:12px;padding:25px 26px;margin:20px 0 12px;display:flex;flex-direction:column;gap:11px}.record-card span,.record-card small{font-size:9px;letter-spacing:2px;color:#c5d0df}.record-card strong{font-family:"Noto Sans KR",sans-serif;font-size:25px;overflow-wrap:anywhere}.record-card b{font-weight:500;font-size:21px;color:var(--blue);letter-spacing:2px}.text-button{display:block;border:0;background:none;color:#747d89;font-family:inherit;font-size:11px;cursor:pointer;padding:16px 0;margin:0 auto}.qr-card{border:1px solid var(--line);border-radius:13px;margin:20px 0;padding:20px;display:flex;align-items:center;flex-direction:column;gap:6px}.qr-card #qr-code{padding:10px;background:white}.qr-card #qr-code img{display:block!important;width:194px!important;height:194px!important;image-rendering:pixelated}.qr-card #qr-code canvas{display:none!important}.qr-card strong{font-family:"Noto Sans KR",sans-serif;font-size:18px;margin-top:5px}.qr-card>span{font-size:15px;letter-spacing:2px;color:#4a5670}.qr-card small{font-size:9px;color:#77836f;min-height:12px}.settings{border-top:1px solid #ecece7;margin-top:24px;padding-top:15px}.settings summary{font-size:11px;font-weight:700;cursor:pointer;list-style:none;display:flex;justify-content:space-between}.settings summary::-webkit-details-marker{display:none}.settings summary span{font-size:9px;color:#929891;font-weight:400}.settings-body{padding-top:12px}.settings-body p,.settings-body small{font-size:9px;color:#868b85;line-height:1.7}.settings-body label{display:block;font-size:10px;font-weight:600;margin:10px 0 6px}.settings-body input{width:100%;height:38px!important;font-size:10px!important;padding:0 10px!important}.entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.save-settings{border:0;border-radius:6px;background:#edf0f4;color:var(--navy);font-size:10px;font-weight:700;padding:9px 13px;margin:11px 8px 0 0;cursor:pointer}#settings-status{font-size:9px;color:#4f7754}.gallery-dialog{border:0;border-radius:16px;width:min(470px,calc(100% - 28px));max-height:80vh;padding:25px;box-shadow:0 24px 90px #18274540}.gallery-dialog::backdrop{background:#17243d75}.gallery-head{display:flex;justify-content:space-between;align-items:flex-start}.gallery-head h2{font-size:20px}.gallery-head button{border:0;background:transparent;font-size:25px;cursor:pointer;color:#68707a}.gallery-empty{font-size:12px;color:#898f88;padding:25px 0}.gallery-list{display:grid;gap:10px;max-height:48vh;overflow:auto}.gallery-item{border:1px solid var(--line);padding:12px;border-radius:10px;display:grid;grid-template-columns:64px 1fr auto;gap:12px;align-items:center}.gallery-item img{width:64px;height:64px}.gallery-item strong{font-size:13px}.gallery-item span{display:block;font-size:11px;color:#6e7784;margin-top:5px}.gallery-item button{border:0;background:#eef0f3;border-radius:6px;padding:8px;font-size:9px;cursor:pointer}.clear-gallery{border:0;background:transparent;color:#9c6262;font-size:10px;padding:14px 0 0;cursor:pointer}.hidden-frame{position:absolute;width:1px;height:1px;left:-10000px;top:-10000px}@media(max-width:780px){.topline{height:65px;width:calc(100% - 32px)}.layout{width:calc(100% - 24px);margin:10px auto 35px;grid-template-columns:1fr;border-radius:16px}.story-panel{min-height:315px;padding:24px 25px 20px}.eyebrow{margin:25px 0 10px}.story-panel h1{font-size:27px;line-height:1.5}.story-copy{margin:9px 0;font-size:12px}.track-art{height:55px;padding:0;position:absolute;right:22px;bottom:57px;width:135px}.track-art:before,.track-art:after{width:125px;height:55px;left:0;bottom:0}.track-art:after{width:100px;height:42px;left:10px;bottom:7px}.track-art strong{font-size:24px;margin:0}.metric-options{gap:9px}.track-art small,.track-art span{display:none}.story-footer{margin-top:auto;padding-top:13px}.form-panel{padding:24px 22px}.steps{margin-bottom:27px}.view h2{font-size:21px}.settings{margin-top:20px}}

.qr-instruction{font-size:15px;line-height:1.65;color:#606a79}
@media(max-width:780px){.qr-instruction{font-size:14px}}

/* Compact phone layout: keep event context, form fields and primary action visible together. */
@media (max-width: 640px) {
  body { min-height: 100svh; background: #f5f6f9; }
  .topline { width: 100%; height: 50px; padding: 0 18px; font-size: 9px; letter-spacing: 1.6px; }
  .layout { display: flex; flex-direction: column; width: 100%; min-height: 0; margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .story-panel { height: 178px; min-height: 0; padding: 13px 20px 15px; }
  .event-chip { padding: 6px 11px; font-size: 9px; }
  .eyebrow { margin: 10px 0 4px; font-size: 8px; letter-spacing: 1.9px; }
  .story-panel h1 { font-size: 21px; line-height: 1.4; letter-spacing: -.8px; }
  .story-copy { margin: 5px 0 0; font-size: 10px; line-height: 1.45; }
  .track-art, .story-footer { display: none; }
  .form-panel { width: 100%; padding: 17px 20px calc(20px + env(safe-area-inset-bottom)); }
  .steps { height: 28px; margin-bottom: 17px; }
  .steps > i { margin: 0 8px; }
  .step { gap: 6px; font-size: 10px; }
  .step b { width: 21px; height: 21px; font-size: 9px; }
  .section-kicker { margin-bottom: 6px; font-size: 8px; letter-spacing: 1.6px; }
  .view h2 { margin-bottom: 5px; font-size: 19px; letter-spacing: -.55px; }
  .subheading { margin-bottom: 17px; font-size: 11px; line-height: 1.55; }
  .field-label { margin-bottom: 7px; font-size: 12px; }
  .field-label small { font-size: 9px; }
  .form-panel input:not([type=checkbox]) { height: 46px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
  .hint { margin: 5px 0 16px; font-size: 9px; }
  .time-label { margin-bottom: 7px; }
  .time-fields { gap: 6px; grid-template-columns: 1fr 10px 1fr 10px 1fr; }
  .time-fields label { gap: 5px; }
  .time-fields input { font-size: 20px !important; }
  .time-fields > b { margin-top: 12px; }
  .time-fields label span { font-size: 9px; }
  .error { min-height: 0; margin: 5px 0 2px; }
  .primary { height: 48px; border-radius: 9px; font-size: 12px; }
  .notice { gap: 8px; margin-top: 12px; padding: 10px 11px; font-size: 9px; line-height: 1.6; }
  .notice b { font-size: 12px; }
  .record-card { gap: 8px; margin: 15px 0 10px; padding: 18px 20px; }
  .record-card strong { font-size: 21px; }
  .record-card b { font-size: 19px; }
  .qr-card { margin: 14px 0; padding: 14px; gap: 5px; }
  .qr-card #qr-code { padding: 7px; }
  .qr-card #qr-code img { width: 174px !important; height: 174px !important; }
  .qr-instruction { margin-bottom: 13px; font-size: 14px; }
  .qr-card strong { font-size: 16px; }
  .qr-card > span { font-size: 14px; }
  .text-button { padding: 11px 0; }
  .privacy-note { margin-top: 12px; }
  .gallery-dialog { padding: 20px; }
}
@media (max-width: 640px) and (max-height: 720px) {
  .story-panel { height: 140px; }
  .form-panel { padding-top: 13px; }
  .steps { margin-bottom: 12px; }
  .subheading { margin-bottom: 12px; }
  .hint { margin-bottom: 12px; }
  .notice { margin-top: 9px; }
}

/* Garmin Run inspired visual system: black navigation, electric blue hero, crisp white form. */
:root { --navy:#07131f; --ink:#111820; --muted:#67727c; --blue:#bcecff; --bg:#eaf3fb; --line:#d8e2ea; }
body { background:linear-gradient(180deg,#e9f4ff 0,#f4f7fa 520px,#f4f7fa 100%); }
.topline { width:100%; height:64px; padding:0 max(24px,calc((100% - 1180px)/2)); margin:0; background:#050709; color:#fff; letter-spacing:2.2px; }
.topline > span { position:relative; font-family:"Barlow Condensed","DM Sans",sans-serif; font-size:17px; font-weight:700; letter-spacing:2.2px; }
.topline > span:before { content:""; display:inline-block; width:7px; height:20px; margin-right:10px; background:#62c5ff; vertical-align:-4px; transform:skew(-12deg); }
.gallery-open { color:#eaf4ff; }
.gallery-open b { background:#1688e8; color:#fff; }
.layout { width:min(1180px,calc(100% - 48px)); min-height:680px; margin:28px auto 64px; grid-template-columns:.95fr 1.05fr; border:0; border-radius:8px; box-shadow:0 24px 64px #06264a20; }
.story-panel { isolation:isolate; background:linear-gradient(135deg,#58bdff 0%,#168be7 46%,#123e91 100%); padding:44px 42px 30px; }
.story-panel:before { content:""; position:absolute; z-index:-1; inset:0; opacity:.54; background:linear-gradient(0deg,#051a47b8 0%,transparent 58%),repeating-linear-gradient(90deg,transparent 0 43px,#d7f4ff2b 44px 46px,transparent 47px 83px); mask-image:linear-gradient(180deg,transparent 25%,#000 76%); }
.story-panel:after { content:""; position:absolute; z-index:-1; width:430px; height:430px; right:-185px; top:120px; border:1px solid #e6f8ff70; border-radius:50%; box-shadow:0 0 0 18px #e6f8ff12,0 0 0 38px #e6f8ff10,0 0 0 60px #e6f8ff0c; }
.event-chip { border-color:#e7f8ffb0; background:#052d6340; color:#fff; font-family:"Barlow Condensed","DM Sans",sans-serif; font-weight:600; letter-spacing:1px; }
.eyebrow { color:#e9f8ff; font-family:"Barlow Condensed","DM Sans",sans-serif; font-size:12px; letter-spacing:3px; }
.story-panel h1 { font-size:42px; line-height:1.45; letter-spacing:-1.3px; color:#fff; text-shadow:0 2px 15px #123d7740; }
.story-panel h1 em { color:#c4f0ff; }
.story-copy { color:#f0faff; }
.track-art { padding-left:35px; }
.track-art:before,.track-art:after { border-color:#e6f7ff90; }
.track-art strong { color:#fff; font-family:"Barlow Condensed","DM Sans",sans-serif; font-size:72px; font-weight:600; }
.metric-options { display:flex; align-items:baseline; gap:clamp(12px, 2.5vw, 30px); position:relative; z-index:1; }
.metric-options strong { margin:0; font-size:38px; line-height:1.1; letter-spacing:.3px; }
.story-courses-mobile { display:none; }
.track-art small,.track-art span { color:#e8f7ff; }
.story-footer { border-color:#c0e9ff80; color:#effaff; }
.form-panel { padding:38px 46px 34px; background:#fff; }
.step.active { color:#0b5fac; }
.step.active b,.step.done b { background:#1688e8; }
.view h2 { color:#101820; font-size:25px; }
.subheading { color:#687580; }
.form-panel input:not([type=checkbox]) { background:#f8fbfd; border-color:#d9e3eb; border-radius:6px; }
.form-panel input:focus { border-color:#1688e8; box-shadow:0 0 0 3px #1688e81a; }
.primary { background:#087bd3; border-radius:5px; box-shadow:0 5px 13px #087bd32a; }
.primary:hover { background:#0567b7; }
.notice { background:#fff5f3; border:1px solid #ffe1dc; color:#c0392b; border-radius:5px; }
.notice b { color:#c0392b; }
.record-card { background:linear-gradient(135deg,#087bd3,#13488f); border-radius:7px; }
.qr-card { border-color:#dce8f0; border-radius:7px; }
.qr-card #qr-code { box-shadow:0 8px 24px #102c4b14; }
.qr-card #qr-code img { display:none !important; }
.qr-card #qr-code canvas { display:block !important; width:194px !important; height:194px !important; image-rendering:pixelated; }
@media (max-width:640px) {
  .qr-card #qr-code canvas { width:174px !important; height:174px !important; }
}
@media (max-width:780px) {
  .story-courses-mobile { display:block; margin:5px 0 0; color:#eaf8ff; font-size:14px; font-weight:700; letter-spacing:.3px; }
  .story-courses-mobile span { padding:0 4px; opacity:.8; }
  .track-art .metric-options { display:none; }
}
@media (max-width:640px) {
  .story-panel { height:190px; }
  .story-courses-mobile { margin-top:3px; font-size:11px; }
}
@media (max-width:640px) and (max-height:720px) {
  .story-panel { height:180px; }
}

/* Fit the revised event title and course labels in the mobile banner. */
@media (max-width:640px) {
  .story-panel { height:190px; }
}
@media (max-width:640px) and (max-height:720px) {
  .story-panel { height:180px; }
}

/* Larger, centered entry labels and values for phone use. */
#input-view .field-label {
  text-align:center;
  font-size:clamp(18px, 2vw, 21px);
  margin-bottom:12px;
}
#input-view .field-label small { font-size:0.72em; }
#input-view #name {
  height:60px;
  text-align:center;
  font-size:clamp(20px, 2.2vw, 24px);
}
#input-view #name::placeholder { font-size:clamp(17px, 1.8vw, 20px); }
#input-view .hint { text-align:center; font-size:11px; }
#input-view .time-label { margin-top:25px; margin-bottom:12px; }
#input-view .time-fields input {
  height:60px !important;
  font-size:clamp(26px, 3vw, 30px) !important;
}
#input-view .time-fields > b { font-size:25px; margin-top:18px; }
#input-view .time-fields label span { font-size:12px; }
@media (max-width:640px) {
  #input-view .field-label { font-size:20px; margin-bottom:10px; }
  #input-view #name { height:58px; font-size:27px; }
  #input-view #name::placeholder { font-size:17px; }
  #input-view .time-label { margin-top:22px; margin-bottom:10px; }
  #input-view .time-fields input { height:58px !important; font-size:27px !important; }
  #input-view .time-fields > b { font-size:23px; margin-top:16px; }
  #input-view .time-fields label span { font-size:11px; }
}

#confirm-view .record-card {
  background:linear-gradient(135deg,#ffffff 0%,#d9dee4 22%,#f8fafc 43%,#c9d0d8 66%,#f4f6f8 100%);
  border:1px solid #aeb7c2;
  box-shadow:0 8px 22px #34425212,inset 0 1px 0 #fff,inset 0 -1px 0 #aeb7c2;
  color:#172b4d;
  align-items:center;
  text-align:center;
  gap:14px;
  padding:30px 22px;
}
#confirm-view .record-card span,
#confirm-view .record-card small { color:#66717e; }
#confirm-view .record-card span { color:#66717e; }
#confirm-view .record-card span,
#confirm-view .record-card small { font-size:12px; letter-spacing:2.5px; }
#confirm-view .record-card small { margin-top:8px; }
#confirm-view .record-card strong.korean-name > span { color:#172b4d; }
#confirm-view .record-card strong {
  width:100%;
  font-size:clamp(32px, 4vw, 42px);
  line-height:1.3;
  letter-spacing:0.3em;
  overflow-wrap:anywhere;
}
#confirm-view .record-card b {
  color:#172b4d;
  font-size:clamp(29px, 3.6vw, 36px);
  letter-spacing:0.12em;
}
@media (max-width:640px) {
  #confirm-view .record-card { gap:12px; padding:25px 16px; }
  #confirm-view .record-card span,
  #confirm-view .record-card small { font-size:11px; }
  #confirm-view .record-card strong { font-size:32px; letter-spacing:0.25em; }
  #confirm-view .record-card b { font-size:29px; letter-spacing:0.1em; }
}

.qr-card #qr-code { padding:0 !important; }
.qr-card #qr-code canvas { width:393px !important; height:393px !important; }
.qr-card strong { font-size:41px; }
.qr-card > span { font-size:35px; }
.qr-card #form-status { display:none !important; }
@media (max-width:640px) {
  .qr-card #qr-code canvas {
    width:min(352px, calc(90vw - 22px)) !important;
    height:min(352px, calc(90vw - 22px)) !important;
  }
  .qr-card strong { font-size:36px; }
  .qr-card > span { font-size:32px; }
}

#input-view .field-label {
  display:flex;
  align-items:center;
  gap:8px;
  text-align:left;
  font-size:16px;
  margin-bottom:10px;
}
#input-view .field-icon {
  width:20px;
  height:20px;
  flex:0 0 20px;
  fill:none;
  stroke:#1688e8;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#input-view .field-label small { font-size:12px; }
#input-view #name::placeholder { font-size:22px; }
#input-view .time-fields {
  width:min(90%, 460px);
  margin-inline:auto;
  grid-template-columns:minmax(0, 1fr) 14px minmax(0, 1fr) 14px minmax(0, 1fr);
  gap:10px;
}
@media (max-width:640px) {
  #input-view .field-label { font-size:16px; margin-bottom:9px; }
  #input-view .field-label small { font-size:11px; }
  #input-view #name::placeholder { font-size:27px; }
  #input-view .time-fields { width:92%; gap:7px; grid-template-columns:minmax(0, 1fr) 12px minmax(0, 1fr) 12px minmax(0, 1fr); }
}

#record-form .entry-fields-card {
  padding:20px;
  border:1px solid #aeb7c2;
  border-radius:14px;
  background:linear-gradient(135deg,#ffffff 0%,#d9dee4 22%,#f8fafc 43%,#c9d0d8 66%,#f4f6f8 100%);
  box-shadow:0 8px 22px #34425212,inset 0 1px 0 #fff,inset 0 -1px 0 #aeb7c2;
}
#record-form .entry-fields-card #name { width:100%; }
#record-form .entry-fields-card .time-fields { width:100%; }
#record-form > .primary { margin-top:16px; }
@media (max-width:640px) {
  #record-form .entry-fields-card { padding:15px; border-radius:12px; }
  #record-form > .primary { margin-top:15px; }
}
#input-view #name.korean-name { letter-spacing:0.6em; }
#input-view #name:not(.korean-name) { letter-spacing:normal; }
#input-view #name::placeholder { letter-spacing:normal; }
#confirm-view .record-card strong.korean-name,
#qr-view .qr-card strong.korean-name {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:0.45em;
  letter-spacing:normal;
}
#confirm-view .record-card strong.korean-name { font-size:clamp(29px, 3.6vw, 36px); }
#confirm-view .record-card strong.korean-name > span,
#qr-view .qr-card strong.korean-name > span { white-space:pre; }
#confirm-view .record-card strong.korean-name > span { font-size:inherit; }
#confirm-view .record-card strong:not(.korean-name),
#qr-view .qr-card strong:not(.korean-name) { letter-spacing:normal; }
#qr-view .qr-card > span { color:#252c2a; }
#confirm-view .record-card strong {
  display:grid;
  place-items:center;
  max-width:100%;
  margin-inline:auto;
  text-align:center;
  white-space:normal;
}
@media (max-width:640px) {
  #confirm-view .record-card strong.korean-name,
  #confirm-view .record-card b { font-size:32px; }
  #confirm-view .record-card strong.korean-name,
  #qr-view .qr-card strong.korean-name { gap:0.45em; }
}
.gallery-dialog { border-radius:9px; }
@media (max-width: 640px) {
  body { background:#f3f7fb; }
  .topline { height:52px; padding:0 18px; }
  .topline > span { font-size:15px; }
  .layout { width:100%; margin:0 auto; border-radius:0; box-shadow:none; }
  .story-panel { background:linear-gradient(125deg,#61c5ff,#168be7 65%,#1452a2); padding:12px 20px 14px; }
  .event-chip { padding:5px 10px; font-size:9px; }
  .eyebrow { color:#eaf9ff; }
  .story-panel h1 { font-size:21px; line-height:1.38; }
  .story-copy { color:#f4fbff; }
  .form-panel { border-top:4px solid #1289e4; }
  .view h2 { font-size:20px; }
  .primary { box-shadow:0 4px 11px #087bd326; }
}
@media (max-width: 640px) and (max-height: 720px) {
  .story-panel { height:160px; }
}
@media (min-width: 641px) and (max-width: 780px) {
  .layout { width:min(700px,calc(100% - 40px)); grid-template-columns:1fr; }
  .story-panel { min-height:360px; }
}

/* Larger saved QR gallery for easier viewing and selection. */
.gallery-dialog { width:min(680px,calc(100% - 32px)); max-height:86vh; padding:30px; }
.gallery-head h2 { font-size:26px; }
.gallery-list { gap:14px; max-height:62vh; }
.gallery-item { grid-template-columns:112px minmax(0,1fr) auto; gap:18px; padding:16px; border-radius:12px; }
.gallery-item img { width:112px; height:112px; }
.gallery-item strong { font-size:19px; }
.gallery-item span { font-size:15px; margin-top:8px; }
.gallery-item button { padding:11px 16px; font-size:13px; }
.gallery-empty { font-size:16px; padding:32px 0; }
.clear-gallery { font-size:13px; padding-top:18px; }
@media (max-width:640px) {
  .gallery-dialog { width:calc(100% - 20px); padding:20px; }
  .gallery-head h2 { font-size:22px; }
  .gallery-list { max-height:64vh; }
  .gallery-item { grid-template-columns:88px minmax(0,1fr) auto; gap:12px; padding:12px; }
  .gallery-item img { width:88px; height:88px; }
  .gallery-item strong { font-size:16px; }
  .gallery-item span { font-size:12px; }
  .gallery-item button { padding:10px 12px; font-size:12px; }
}

/* Make the top-right saved QR control easier to notice and tap. */
.topline .gallery-open {
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 15px;
  border:1px solid #ffffff80;
  border-radius:999px;
  background:#ffffff18;
  color:#fff;
  font-size:16px;
  font-weight:700;
  line-height:1;
}
.topline .gallery-open:hover { background:#ffffff30; }
.topline .gallery-open b {
  width:30px;
  height:30px;
  margin:0;
  background:#fff;
  color:#1676cb;
  font-size:14px;
}
@media (max-width:640px) {
  .topline .gallery-open { gap:8px; padding:7px 10px; font-size:13px; }
  .topline .gallery-open b { width:24px; height:24px; font-size:12px; }
}

.gallery-item .gallery-preview-trigger {
  display:grid;
  place-items:center;
  width:100%;
  min-width:0;
  aspect-ratio:1;
  padding:7px;
  border:1px solid #e0e7ef;
  border-radius:9px;
  background:#fff;
  cursor:zoom-in;
}
.gallery-item .gallery-preview-trigger img {
  display:block;
  width:100%;
  height:100%;
  min-width:0;
  object-fit:contain;
}
.gallery-item .gallery-preview-trigger:hover { border-color:#1688e8; box-shadow:0 4px 14px #1688e822; }
.gallery-preview-dialog {
  width:min(620px,calc(100% - 28px));
  max-height:92vh;
  padding:24px;
  border:0;
  border-radius:16px;
  box-shadow:0 24px 90px #18274540;
  text-align:center;
}
.gallery-preview-dialog::backdrop { background:#17243d85; }
.gallery-preview-dialog .gallery-head { position:relative; justify-content:center; text-align:center; }
.gallery-preview-dialog .gallery-head > div { flex:1; text-align:center; }
.gallery-preview-dialog .gallery-head button { position:absolute; top:0; right:0; }
.gallery-preview-dialog #gallery-preview-finish-time { margin:6px 0 0; color:#4a5670; font-size:18px; font-weight:700; letter-spacing:1px; }
.gallery-preview-dialog #gallery-preview-image {
  display:block;
  width:min(500px,78vw);
  height:min(500px,78vw);
  object-fit:contain;
  margin:12px auto 8px;
  image-rendering:pixelated;
}
.gallery-preview-dialog #gallery-preview-time { margin:0; color:#687384; font-size:17px; letter-spacing:1px; }
.gallery-preview-dialog #gallery-preview-time { white-space:pre-line; line-height:1.6; }
.gallery-item .gallery-saved-at { margin-top:4px; font-size:13px; color:#9099a5; }
@media (max-width:640px) {
  .gallery-preview-dialog { width:calc(100% - 24px); padding:18px; }
  .gallery-preview-dialog #gallery-preview-image { width:min(82vw,460px); height:min(82vw,460px); }
  .gallery-preview-dialog #gallery-preview-time { font-size:14px; }
  .gallery-preview-dialog #gallery-preview-finish-time { font-size:16px; }
  .gallery-item .gallery-saved-at { margin-top:3px; font-size:11px; }
}

/* Mobile-first finishing pass for the entry, confirmation and QR steps. */
@media (max-width:640px) {
  body { min-height:100svh; background:#f3f7fb; }
  .topline {
    position:sticky;
    top:0;
    z-index:30;
    width:100%;
    height:58px;
    padding:0 16px;
    background:#050709;
  }
  .topline > span { font-size:14px; letter-spacing:1.4px; }
  .topline > span:before { height:18px; margin-right:8px; }
  .topline .gallery-open { min-height:40px; padding:6px 9px; font-size:12px; }
  .topline .gallery-open b { width:25px; height:25px; }
  .layout {
    display:flex;
    flex-direction:column;
    width:100%;
    min-height:0;
    margin:0 auto 20px;
    overflow:visible;
    border:0;
    border-radius:0;
    box-shadow:none;
  }
  .story-panel {
    display:flex;
    flex-direction:column;
    height:auto;
    min-height:0;
    padding:16px 20px 18px;
    border-bottom:4px solid #1688e8;
  }
  .event-chip { padding:6px 11px; font-size:10px; }
  .eyebrow { margin:12px 0 5px; font-size:9px; letter-spacing:2px; }
  .story-panel h1 { font-size:clamp(21px,6vw,25px); line-height:1.25; letter-spacing:-.55px; }
  .story-copy { margin:8px 0 0; font-size:13px; line-height:1.5; }
  .story-courses-mobile { margin:5px 0 0; font-size:13px; line-height:1.4; }
  .track-art, .story-footer { display:none; }
  .form-panel { width:100%; padding:20px 18px calc(28px + env(safe-area-inset-bottom)); border-top:0; }
  .steps { height:34px; margin:0 0 22px; }
  .steps > i { min-width:10px; margin:0 6px; }
  .step { gap:6px; font-size:11px; }
  .step b { width:25px; height:25px; font-size:11px; }
  .section-kicker { margin:0 0 8px; font-size:9px; letter-spacing:1.7px; }
  .view h2 { margin:0 0 6px; font-size:22px; line-height:1.35; letter-spacing:-.5px; }
  .subheading { margin:0 0 19px; font-size:14px; line-height:1.55; }
  #record-form .entry-fields-card { padding:16px; border-radius:15px; }
  #input-view .field-label { margin-bottom:9px; font-size:17px; }
  #input-view .field-label small { font-size:11px; }
  #input-view #name { height:58px; border-radius:11px; font-size:27px; }
  #input-view #name::placeholder { font-size:21px; }
  #input-view .time-label { margin-top:20px; margin-bottom:10px; }
  #input-view .time-fields { width:100%; gap:7px; grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr) 12px minmax(0,1fr); }
  #input-view .time-fields input { height:58px !important; border-radius:11px; font-size:27px !important; }
  #input-view .time-fields > b { margin-top:15px; font-size:22px; }
  #input-view .time-fields label span { font-size:11px; }
  .error { min-height:0; margin:6px 0 2px; font-size:12px; line-height:1.45; }
  .primary { min-height:56px; height:56px; padding:0 18px; border-radius:12px; font-size:16px; }
  .primary span { font-size:22px; }
  #record-form > .primary { margin-top:13px; }
  .notice { gap:9px; margin-top:14px; padding:12px; border-radius:11px; font-size:11px; line-height:1.6; }
  .notice b { flex:0 0 auto; font-size:14px; }
  #confirm-view .record-card { gap:12px; margin:18px 0 14px; padding:24px 16px; border-radius:15px; }
  #confirm-view .record-card span,
  #confirm-view .record-card small { font-size:11px; }
  #confirm-view .record-card strong.korean-name,
  #confirm-view .record-card b { font-size:32px; }
  #confirm-view .record-card b { letter-spacing:.1em; }
  .text-button { min-height:48px; padding:12px 8px; font-size:14px; }
  .qr-instruction { margin-bottom:15px; font-size:15px; }
  .qr-card { gap:8px; margin:16px 0; padding:16px 12px; border-radius:15px; }
  .qr-card #qr-code { max-width:100%; }
  .qr-card #qr-code canvas { width:min(352px,calc(90vw - 46px)) !important; height:min(352px,calc(90vw - 46px)) !important; }
  .qr-card strong { max-width:100%; font-size:34px; text-align:center; }
  .qr-card > span { font-size:28px; }
  .privacy-note { margin:12px 0 0; font-size:11px; line-height:1.6; }
  .gallery-dialog { max-height:88svh; padding:18px; }
  .gallery-preview-dialog { max-height:92svh; }
}
@media (max-width:360px) {
  .topline { padding-inline:12px; }
  .topline > span { font-size:12px; letter-spacing:1px; }
  .topline .gallery-open { gap:6px; padding-inline:7px; font-size:11px; }
  .form-panel { padding-inline:14px; }
  .steps > i { margin-inline:4px; }
  .step { gap:4px; font-size:10px; }
  .step b { width:23px; height:23px; }
  #record-form .entry-fields-card { padding:13px; }
  #input-view #name::placeholder { font-size:18px; }
}

/* Keep typed names the same size as the numeric finish-time fields. */
#input-view #name,
#input-view .time-fields input { font-size:clamp(26px,3vw,30px) !important; }
@media (max-width:640px) {
  #input-view #name,
  #input-view .time-fields input { font-size:27px !important; }
}

#confirm-view .secondary-button {
  width:100%;
  min-height:54px;
  margin:10px auto 0;
  padding:12px 18px;
  border:1px solid #cbd9e5;
  border-radius:11px;
  background:#fff;
  color:#315778;
  font-size:13px;
  font-weight:700;
  text-align:center;
  box-shadow:0 3px 10px #183a5610;
}
#confirm-view .secondary-button:hover { background:#f3f8fc; border-color:#8eaec6; }
#confirm-view .secondary-button:focus-visible { outline:3px solid #1688e84a; outline-offset:2px; }
#input-view #record-form > .primary { font-size:13px; }
#confirm-view #make-qr {
  position:relative;
  justify-content:space-between;
  text-align:left;
  font-size:13px;
}
#confirm-view #make-qr span { position:absolute; right:18px; }
#confirm-view .secondary-button { text-align:left; justify-content:flex-start; }
#qr-view #download-qr { justify-content:space-between; text-align:left; }
@media (max-width:640px) {
  .steps { height:auto; min-height:40px; gap:5px; margin-bottom:22px; }
  .steps > i { min-width:8px; margin-inline:5px; }
  .step { gap:7px; font-size:clamp(12px,3.3vw,14px); }
  .step b { flex:0 0 28px; width:28px; height:28px; font-size:12px; }
  #input-view #record-form > .primary { font-size:16px; }
  #confirm-view .secondary-button { min-height:54px; margin-top:9px; font-size:16px; }
  #confirm-view #make-qr { font-size:16px; }
  #confirm-view #make-qr span { right:18px; }
}
@media (max-width:360px) {
  .steps { gap:3px; }
  .steps > i { min-width:5px; margin-inline:3px; }
  .step { gap:4px; font-size:12px; }
  .step b { flex-basis:24px; width:24px; height:24px; font-size:11px; }
}
#input-view .input-intro { display:flex; align-items:flex-start; gap:8px; }
#input-view .input-intro svg {
  width:20px;
  height:20px;
  flex:0 0 20px;
  margin-top:1px;
  fill:none;
  stroke:#1688e8;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#input-view .input-intro span { flex:1; }
.notice {
  gap:11px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#922c20;
  font-size:13px;
  line-height:1.7;
}
.notice b {
  display:block;
  flex:0 0 auto;
  width:auto;
  height:auto;
  border-radius:0;
  background:transparent;
  color:#c0392b;
  font-size:14px;
}
#input-view .input-intro,
#confirm-view .subheading,
#qr-view .qr-instruction {
  font-size:14px;
  line-height:1.55;
}

/* Mobile confirmation card styled as a silver finisher medal. */
@media (max-width:640px) {
  #confirm-view .record-card {
    width:min(100%,360px);
    aspect-ratio:1 / 1;
    min-height:0;
    margin:20px auto 14px;
    padding:clamp(30px,8vw,42px);
    border-radius:50%;
    justify-content:center;
    gap:12px;
    box-shadow:
      0 8px 22px #34425212,
      inset 0 0 0 7px #ffffff75,
      inset 0 0 0 9px #aeb7c280,
      inset 0 1px 0 #fff,
      inset 0 -1px 0 #aeb7c2;
  }
}
