/* 写真お渡しシステム APP CSS(design/mockup.html の「APP CSS」から流用。見た目を変える時は design も更新する) */
/* ---------- 1. 色・文字・余白(トークン) ---------- */
:root {
  /* 夜(背景) */
  --c-night:   #120E26;  /* 画面の背景 */
  --c-night-2: #1C1738;  /* 一段持ち上げた面(案内の箱・一覧の選択行) */
  --c-night-3: #231D44;  /* 入力欄の中 */
  --c-line:    #2E2757;  /* 区切り線(飾り用) */
  --c-edge:    #7A70B3;  /* 入力欄・副ボタンの枠(背景とのコントラスト 3:1 以上) */

  /* 文字 */
  --c-moon:    #F4EFE2;  /* 本文 */
  --c-mist:    #ABA4C9;  /* 補足・ラベル */
  --c-faint:   #7D76A0;  /* 入力欄のプレースホルダーだけに使う */
  --c-number:  #FFF6DC;  /* 受付番号の数字 */

  /* 灯り(操作できるもの) */
  --c-lantern:    #FFCF6E;  /* 主ボタン・選択中・フォーカス */
  --c-lantern-hi: #FFE2A3;  /* 主ボタンを押した瞬間 */
  --c-ink:        #1A1430;  /* 主ボタンの上の文字 */

  /* 光の軌跡(線の飾りだけに使う。文字やボタンには使わない) */
  --c-trail-gold:  #FFD98A;
  --c-trail-rose:  #FF6FB5;
  --c-trail-frost: #8FD9FF;
  --c-trail-core:  #FFFBEF;  /* 線の芯。長時間露光で白く飛ぶ部分 */

  /* 状態 */
  --c-ok:     #93E2B4;
  --c-error:  #FF9AA8;

  /* 書体 */
  --f-display: "Kaisei Decol", "Hiragino Mincho ProN", serif;
  --f-ui: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;

  /* 文字サイズ(スマホ基準) */
  --fs-xs: 13px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-input: 17px;   /* 16px 未満だと iPhone が入力時に拡大するので 17px */
  --fs-md: 18px;
  --fs-lg: 22px;
  --fs-xl: 28px;
  --fs-2xl: 32px;

  /* 余白(4の倍数) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --gutter: 20px;     /* スマホの左右の余白 */

  /* 角の丸み(役割ごとに変える) */
  --r-photo: 4px;
  --r-input: 10px;
  --r-box: 12px;
  --r-btn: 14px;
}

/* ---------- 2. 土台 ---------- */
.app, .app * { box-sizing: border-box; }
.app {
  background: var(--c-night);
  color: var(--c-moon);
  font-family: var(--f-ui);
  font-size: var(--fs-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  container-type: inline-size;  /* 写真の全幅表示の切り替えに使う */
}
.app h1, .app h2, .app h3, .app p, .app ol, .app ul, .app figure { margin: 0; }
.app ol, .app ul { padding: 0; list-style: none; }
.app a:not(.btn) { color: var(--c-lantern); text-underline-offset: 3px; }
.app :focus-visible { outline: 3px solid var(--c-lantern); outline-offset: 3px; }

.wrap { max-width: 480px; margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: var(--s-6); }

.brand {
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  letter-spacing: .04em;
  color: var(--c-lantern);
}
.title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-2xl);
  line-height: 1.4;
  letter-spacing: .02em;
}
.title--md { font-size: var(--fs-xl); }
.heading {
  font-weight: 700;
  font-size: var(--fs-md);
  line-height: 1.5;
}
.text-sub { color: var(--c-mist); }
.text-sm  { font-size: var(--fs-sm); line-height: 1.7; }
.text-xs  { font-size: var(--fs-xs); line-height: 1.6; }

.rule { border: 0; border-top: 1px solid var(--c-line); margin: var(--s-10) 0; }

/* ---------- 3. 光の軌跡(SVG) ---------- */
/* 1本の線を「にじみ・色・白い芯」の3層で重ねる。<use> に class を付けて使う */
.tr-halo, .tr-body, .tr-core {
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.tr-halo { stroke: var(--trail, url(#g-trail)); stroke-width: 14; opacity: .55; filter: url(#f-glow); }
.tr-body { stroke: var(--trail, url(#g-trail)); stroke-width: 4; }
.tr-core { stroke: var(--c-trail-core); stroke-width: 1.4; opacity: .9; }
.tr-tip  { fill: var(--c-trail-core); filter: url(#f-glow-sm); }

/* 一度だけ描かれる(受付ページを開いた時) */
.trail--draw use { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trail-draw 1.8s cubic-bezier(.45,.05,.35,1) .2s forwards; }
.trail--draw .tr-tip { opacity: 0; animation: tip-in .4s ease-out 1.9s forwards; }
/* 描いては消える(準備中) */
.trail--loop use { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trail-loop 4.8s ease-in-out infinite; }

@keyframes trail-draw { to { stroke-dashoffset: 0; } }
@keyframes tip-in { to { opacity: 1; } }
@keyframes trail-loop {
  0%   { stroke-dashoffset: 1; opacity: 1; }
  60%  { stroke-dashoffset: 0; opacity: 1; }
  85%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 1; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .trail--draw use, .trail--loop use { animation: none; stroke-dashoffset: 0; }
  .trail--draw .tr-tip { animation: none; opacity: 1; }
}

/* ---------- 4. ボタン ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  width: 100%;
  min-height: 58px;
  padding: var(--s-3) var(--s-6);
  border: 0;
  border-radius: var(--r-btn);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn--primary {
  background: var(--c-lantern);
  color: var(--c-ink);
  box-shadow: inset 0 0 0 1px rgba(255,236,190,.7), 0 10px 30px -10px rgba(255,207,110,.6);
}
.btn--primary:active { background: var(--c-lantern-hi); transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--c-moon);
  box-shadow: inset 0 0 0 1.5px var(--c-edge);
}
.btn--ghost:active { background: var(--c-night-2); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: #3A335F; color: var(--c-mist); box-shadow: none; cursor: default; transform: none;
}
.btn--sm { width: auto; min-height: 44px; padding: var(--s-2) var(--s-4); font-size: var(--fs-base); border-radius: 10px; }
.btn--inline { width: auto; }

/* ---------- 5. 入力欄 ---------- */
.field + .field { margin-top: var(--s-6); }
.field__label { display: block; font-weight: 700; font-size: var(--fs-base); margin-bottom: var(--s-2); }
.field__label small { font-weight: 400; color: var(--c-mist); font-size: var(--fs-sm); margin-left: var(--s-1); }
.field__input {
  display: block; width: 100%;
  min-height: 56px;
  padding: var(--s-3) var(--s-4);
  background: var(--c-night-3);
  color: var(--c-moon);
  border: 1.5px solid var(--c-edge);
  border-radius: var(--r-input);
  font: inherit;
  font-size: var(--fs-input);
  line-height: 1.4;
  -webkit-appearance: none; appearance: none;
}
.field__input::placeholder { color: var(--c-faint); }
.field__input:focus, .field__input.is-focus {
  outline: none;
  border-color: var(--c-lantern);
  box-shadow: 0 0 0 3px rgba(255,207,110,.28);
}
.field__help { margin-top: var(--s-2); font-size: var(--fs-sm); line-height: 1.6; color: var(--c-mist); }
.field__error { display: none; margin-top: var(--s-2); font-size: var(--fs-sm); line-height: 1.6; color: var(--c-error); font-weight: 700; }
.field.is-error .field__input { border-color: var(--c-error); }
.field.is-error .field__error { display: block; }

/* 同意チェック(箱全体が押せる) */
.consent {
  display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3);
  align-items: start;
  padding: var(--s-4);
  background: var(--c-night-2);
  border-radius: var(--r-box);
  cursor: pointer;
}
.consent__box {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; margin: 0;
  border: 2px solid var(--c-edge); border-radius: 7px;
  background: var(--c-night-3);
  display: grid; place-content: center;
  cursor: pointer;
}
.consent__box::after {
  content: ""; width: 12px; height: 7px;
  border: solid var(--c-ink); border-width: 0 0 3px 3px;
  transform: rotate(-45deg) translate(1px,-1px);
  opacity: 0;
}
.consent__box:checked { background: var(--c-lantern); border-color: var(--c-lantern); }
.consent__box:checked::after { opacity: 1; }
.consent__text { font-size: var(--fs-sm); line-height: 1.75; }
.consent__text strong { display: block; font-size: var(--fs-base); margin-bottom: var(--s-1); }
.consent.is-error { box-shadow: inset 0 0 0 1.5px var(--c-error); }

/* ---------- 6. 受付ページ ---------- */
.hero { padding-top: var(--s-6); }
.hero__trail { display: block; width: calc(100% + var(--gutter) * 2); height: auto; margin: var(--s-2) calc(var(--gutter) * -1) 0; }
.hero__title { margin-top: calc(var(--s-6) * -1); }  /* 線の終わりに文字を少しかぶせる */
.hero__lead { margin-top: var(--s-5); color: var(--c-mist); }

/* 当日の流れ(順番があるので番号つき) */
.flow { counter-reset: flow; position: relative; }
.flow::before { /* 番号どうしをつなぐ細い線 */
  content: ""; position: absolute; left: 13px; top: 18px; bottom: 18px;
  border-left: 1px dashed var(--c-edge);
}
.flow__item { counter-increment: flow; position: relative; padding-left: 44px; }
.flow__item + .flow__item { margin-top: var(--s-4); }
.flow__item::before {
  content: counter(flow);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-content: center;
  background: var(--c-night); box-shadow: inset 0 0 0 1.5px var(--c-edge);
  font-weight: 700; font-size: var(--fs-sm); line-height: 1;
}
.flow__item.is-now::before { background: var(--c-lantern); color: var(--c-ink); box-shadow: none; }
.flow__title { font-weight: 700; line-height: 1.6; }
.flow__text { font-size: var(--fs-sm); line-height: 1.7; color: var(--c-mist); }

.form { margin-top: var(--s-10); }
.form__submit { margin-top: var(--s-8); }

.footer { padding: var(--s-12) 0 var(--s-10); font-size: var(--fs-xs); line-height: 1.7; color: var(--c-mist); }

/* ---------- 7. 受付完了ページ ---------- */
.done { padding-top: var(--s-6); text-align: center; }
.done__status { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--c-ok); font-weight: 700; font-size: var(--fs-base); }
.done__status svg { width: 20px; height: 20px; }
.done__ask { margin-top: var(--s-3); font-size: var(--fs-md); font-weight: 700; line-height: 1.6; }

.ticket { margin: var(--s-4) auto 0; width: min(100%, 360px); }
.ticket__label { font-size: var(--fs-base); color: var(--c-mist); letter-spacing: .1em; }
.ticket__ring { position: relative; aspect-ratio: 340 / 220; display: grid; place-items: center; }
.ticket__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ticket__num {
  position: relative;
  font-family: var(--f-ui);
  font-weight: 900;
  font-size: clamp(96px, 31vw, 132px);
  line-height: 1;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: var(--c-number);
}
.ticket__name { margin-top: var(--s-1); font-family: var(--f-display); font-weight: 700; font-size: var(--fs-xl); line-height: 1.4; }
.ticket__name span { font-size: var(--fs-md); margin-left: .2em; }

.mypage { text-align: left; }
.urlbox {
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--c-night-3);
  border-radius: var(--r-input);
  font-size: var(--fs-sm); line-height: 1.6;
  color: var(--c-moon);
  word-break: break-all;
}
.btn-row { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.btn-row--2 { grid-template-columns: 1fr 1fr; }

/* 案内の箱(保存方法・ブックマーク方法など) */
.note {
  padding: var(--s-4);
  background: var(--c-night-2);
  border-radius: var(--r-box);
  font-size: var(--fs-sm); line-height: 1.75;
}
.note__title { font-weight: 700; font-size: var(--fs-base); margin-bottom: var(--s-1); }
.note dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-3); }
.note dt { color: var(--c-mist); }
.note dd { margin: 0; }

/* ---------- 8. 個人ページ ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--gutter);
  border-bottom: 1px solid var(--c-line);
}
.topbar__no { font-size: var(--fs-sm); color: var(--c-mist); }
.topbar__no b { font-size: var(--fs-md); color: var(--c-moon); margin-left: var(--s-1); font-variant-numeric: tabular-nums; }

.mine__head { padding-top: var(--s-8); }
.mine__count { margin-top: var(--s-1); color: var(--c-mist); }

/* 準備中:写真の枠の中で、光の線が描かれ続ける */
.developing { margin-top: var(--s-6); }
.developing__frame {
  position: relative; aspect-ratio: 3 / 2;
  background: #0B0819;
  border-radius: var(--r-photo);
  box-shadow: inset 0 0 0 1px var(--c-line);
  overflow: hidden;
}
.developing__frame svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.developing__title { margin-top: var(--s-6); font-weight: 700; font-size: var(--fs-lg); line-height: 1.5; }
.developing__text { margin-top: var(--s-2); color: var(--c-mist); }

.facts { margin-top: var(--s-8); border-top: 1px solid var(--c-line); }
.facts__row { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-sm); line-height: 1.7; }
.facts__row dt { color: var(--c-mist); }
.facts__row dd { margin: 0; }

/* 写真あり */
.photos { margin-top: var(--s-6); }
.photo + .photo { margin-top: var(--s-10); }
.photo__img {
  display: block;
  width: calc(100% + var(--gutter) * 2);   /* スマホでは左右いっぱいに見せる */
  margin: 0 calc(var(--gutter) * -1);
  height: auto; aspect-ratio: 3 / 2;
  background: #000;
  -webkit-touch-callout: default;           /* iPhone の長押しメニューを止めない */
}
.photo__bar { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s-3); }
.photo__no { font-size: var(--fs-sm); color: var(--c-mist); font-variant-numeric: tabular-nums; }
@container (min-width: 600px) {
  .photo__img { width: 100%; margin: 0; border-radius: var(--r-photo); }
}

/* ---------- 9. スタッフページ(iPad 横向き) ---------- */
.staff { display: grid; grid-template-rows: auto 1fr; height: 100%; min-height: 820px; }
.staff__bar {
  display: flex; align-items: center; gap: var(--s-6);
  padding: var(--s-3) var(--s-6);
  border-bottom: 1px solid var(--c-line);
}
.staff__bar .brand { font-size: var(--fs-base); }
.staff__role { font-size: var(--fs-xs); color: var(--c-mist); padding: 2px 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--c-edge); }
.stats { display: flex; gap: var(--s-6); margin-left: auto; }
.stat { font-size: var(--fs-sm); color: var(--c-mist); line-height: 1.3; }
.stat b { display: block; font-size: var(--fs-lg); color: var(--c-moon); font-variant-numeric: tabular-nums; }

.staff__body { display: grid; grid-template-columns: 440px 1fr; min-height: 0; }
.staff__list { border-right: 1px solid var(--c-line); display: flex; flex-direction: column; min-height: 0; }
.staff__tools { padding: var(--s-4) var(--s-5); display: grid; gap: var(--s-3); border-bottom: 1px solid var(--c-line); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--c-mist); }
.search .field__input { padding-left: 44px; min-height: 52px; }

.tabs { display: flex; gap: var(--s-2); }
.tab {
  min-height: 40px; padding: 0 var(--s-4);
  border: 0; border-radius: 999px;
  background: transparent; color: var(--c-mist);
  box-shadow: inset 0 0 0 1px var(--c-line);
  font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--c-moon); color: var(--c-ink); box-shadow: none; }
.tab span { font-weight: 400; margin-left: 4px; font-variant-numeric: tabular-nums; }

.guests { overflow-y: auto; }
.guest {
  display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: var(--s-3);
  width: 100%; min-height: 76px;
  padding: var(--s-3) var(--s-5);
  border: 0; border-bottom: 1px solid var(--c-line);
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
  position: relative;
}
.guest[aria-current="true"] { background: var(--c-night-2); }
.guest[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c-lantern); }
.guest__no { font-weight: 900; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.guest__who { display: grid; min-width: 0; }
.guest__name { display: block; font-weight: 700; font-size: var(--fs-md); line-height: 1.4; }
.guest__meta { display: block; font-size: var(--fs-sm); color: var(--c-mist); line-height: 1.5; }

/* 状態バッジ(色+文字で区別。色だけに頼らない) */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 0 10px;
  border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 700; white-space: nowrap;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge--sent    { color: var(--c-ok); background: rgba(147,226,180,.12); }
.badge--waiting { color: var(--c-mist); background: rgba(171,164,201,.12); }
.badge--waiting::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.badge--error   { color: var(--c-error); background: rgba(255,154,168,.14); }

.staff__detail { padding: var(--s-8) var(--s-10); overflow-y: auto; }
.person { display: flex; align-items: flex-end; gap: var(--s-5); }
.person__no { font-weight: 900; font-size: 64px; line-height: .9; font-variant-numeric: tabular-nums; color: var(--c-number); }
.person__name { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-xl); line-height: 1.3; }
.person__meta { font-size: var(--fs-sm); color: var(--c-mist); margin-top: 2px; }
.person__meta button { background: none; border: 0; padding: 0 0 0 6px; color: var(--c-lantern); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.panel { margin-top: var(--s-8); }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-3); }
.panel__head .heading { font-size: var(--fs-md); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.thumb { position: relative; }
.thumb__img { display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; background: #000; border-radius: var(--r-photo); }
.thumb__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: 6px; font-size: var(--fs-xs); color: var(--c-mist); min-height: 24px; }
.thumb__x { background: none; border: 0; color: var(--c-mist); font: inherit; font-size: var(--fs-xs); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; cursor: pointer; }
.progress { height: 4px; border-radius: 2px; background: var(--c-line); overflow: hidden; flex: 1; }
.progress > i { display: block; height: 100%; background: var(--c-lantern); }
.thumb.is-done .thumb__foot { color: var(--c-ok); }

.picker {
  display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-5);
  border-radius: var(--r-box);
  background: var(--c-night-2);
}
.picker .btn { flex: none; }
.picker__hint { font-size: var(--fs-sm); line-height: 1.7; color: var(--c-mist); }
.picker__hint b { color: var(--c-moon); }

.sendbar { display: flex; align-items: center; gap: var(--s-5); margin-top: var(--s-6); }
.sendbar .btn { width: auto; min-width: 300px; }
.sendbar__note { font-size: var(--fs-sm); color: var(--c-mist); line-height: 1.6; }


/* 共通の SVG 部品を隠す(display:none にしない。Chrome でグラデーションが消える) */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
html, body { margin: 0; min-height: 100%; }
body.app { min-height: 100vh; }
/* スタッフ一覧の行はリンクで作っているので、文字色と下線を見本(ボタン)に合わせる */
.app a.guest, .app a.guest:visited { color: inherit; text-decoration: none; }
