/* 観客投票フォーム */
:root {
	--ink: #17171c;
	--ink-2: #3d3d46;
	--muted: #5c5c66;
	--line: #e2e2e8;
	--line-2: #c9c9d1;
	--surface: #f4f4f6;
	--accent: #c8321e;
	--accent-dark: #9e2516;
	--wide: 960px;
	--narrow: 640px;
	--display: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: 'Noto Sans JP', sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
/* iOSでフォーカス時に画面が拡大されないよう、文字入力欄は16px以上にする */
input:not([type="radio"]):not([type="checkbox"]), select, textarea { font-size: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.v-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.v-pad { padding-left: max(20px, calc((100% - var(--wide)) / 2)); padding-right: max(20px, calc((100% - var(--wide)) / 2)); }
.v-narrow-pad { padding-left: max(20px, calc((100% - var(--narrow)) / 2)); padding-right: max(20px, calc((100% - var(--narrow)) / 2)); }

/* ヘッダー */
.v-header { background: var(--ink); color: #fff; padding: 20px max(20px, calc((100% - var(--wide)) / 2)) 18px; display: flex; flex-direction: column; gap: 14px; }
.v-header--slim { padding-top: 20px; padding-bottom: 20px; }
.v-header__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.v-header__event { margin: 0; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .12em; }
.v-header__saved { margin: 0; font-size: 12px; color: #c9c9d1; }
.v-header__title { margin: 0; font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1.25; letter-spacing: .02em; }
.v-header__ticket { display: flex; align-items: center; gap: 8px; }
.v-header__no { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.v-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--accent); font-size: 13px; font-weight: 700; }

.v-app { flex: 1; display: flex; flex-direction: column; }
.v-intro { margin: 0; padding-top: 18px; padding-bottom: 6px; font-size: 14px; color: var(--ink-2); }

/* お知らせ・エラー */
.v-banner { margin: 12px max(20px, calc((100% - var(--wide)) / 2)) 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.v-banner--error { background: #fcefed; color: #8a2116; border: 1px solid #f1b8af; }
.v-banner--info { background: var(--surface); color: var(--ink-2); }

/* あなたについて */
.v-card { margin: 12px max(20px, calc((100% - var(--wide)) / 2)) 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px 20px; align-items: start; }
.v-card__title { grid-column: 1 / -1; margin: 0; font-family: var(--display); font-size: 16px; font-weight: 700; }
.v-card__note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.v-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; margin: 0; padding: 0; border: 0; min-width: 0; }
.v-field legend { padding: 0 0 4px; }
.v-opt { font-weight: 400; color: var(--muted); }
.v-req { font-weight: 700; color: var(--accent-dark); }
.v-input { width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 16px; font-weight: 400; background: #fff; color: var(--ink); }
.v-input--age { width: 110px; }
.v-input--code { letter-spacing: .15em; text-transform: uppercase; }
.v-age { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; }
.v-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.v-choice { height: 44px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.v-choice[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 上映日タブ */
.v-tabs { position: sticky; top: 0; z-index: 2; background: #fff; padding-top: 12px; padding-bottom: 12px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.v-tab { flex: 1; max-width: 200px; height: 44px; border-radius: 22px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.v-tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 作品 */
.v-main { padding-top: 8px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 28px; }
.v-group { display: flex; flex-direction: column; gap: 14px; }
.v-group__head { margin: 16px 0 0; font-family: var(--display); font-size: 16px; font-weight: 700; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.v-group__progress { font-family: 'Noto Sans JP', sans-serif; font-size: 12px; font-weight: 500; color: var(--muted); }
.v-films { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; align-items: start; }
.v-film { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.v-film__head { display: flex; gap: 12px; padding: 12px; }
.v-still { width: 104px; height: 64px; flex-shrink: 0; border-radius: 6px; background: #e9e9ee; object-fit: cover; display: block; }
.v-film__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v-film__title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.v-film__director { margin: 0; font-size: 13px; color: var(--muted); }
.v-lock { margin: 0 12px 12px; padding: 12px; border-radius: 8px; background: var(--surface); display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.v-lock svg { flex-shrink: 0; }
.v-film__body { padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.v-rate { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v-stars { display: flex; flex-wrap: wrap; gap: 2px; }
.v-star { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #8e8e99; }
.v-star svg { width: 30px; height: 30px; }
.v-star path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.v-star.is-on { color: var(--accent); }
.v-star.is-on path { fill: currentColor; stroke: currentColor; }
.v-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.v-num { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; cursor: pointer; }
.v-num.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.v-score { font-family: var(--display); font-size: 22px; font-weight: 900; min-width: 52px; text-align: right; white-space: nowrap; }
.v-score--empty { font-size: 15px; font-weight: 700; color: var(--muted); }
.v-clear { align-self: flex-start; min-height: 32px; padding: 0 4px; border: 0; background: transparent; font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.v-comment { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; }
.v-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 16px; line-height: 1.6; resize: vertical; background: #fff; }
.v-count { align-self: flex-end; font-size: 12px; color: var(--muted); font-weight: 400; }

/* フッター */
/* 送信ボタンの帯：画面の実際の下端（アドレスバーの伸縮に追従する動的ビューポート）に固定 */
.v-footer { margin-top: auto; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; background: #fff; border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.v-unsent { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--accent-dark); }
.v-unsent::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }
.v-small { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

.v-btn { width: 100%; max-width: 480px; display: inline-flex; align-items: center; justify-content: center; height: 52px; border-radius: 26px; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.v-btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.v-btn--primary:hover { background: var(--accent-dark); color: #fff; }
.v-btn--outline { background: #fff; color: var(--ink); border-color: var(--line-2); height: 48px; }
.v-btn[disabled] { opacity: .6; cursor: progress; }

/* 確認画面 */
.v-subhead { padding-top: 16px; padding-bottom: 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.v-back { width: 44px; height: 44px; margin-left: -12px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.v-subhead__title { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 700; }
.v-ticketbox { margin: 20px max(20px, calc((100% - var(--narrow)) / 2)); padding: 18px; border-radius: 12px; background: var(--ink); color: #fff; }
.v-ticketbox p { margin: 0; }
.v-ticketbox__label { font-size: 13px; color: #c9c9d1; }
.v-ticketbox__no { font-family: var(--display); font-size: 26px; font-weight: 900; letter-spacing: .02em; }
.v-profile { margin: 0 max(20px, calc((100% - var(--narrow)) / 2)) 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: 72px 1fr; row-gap: 6px; font-size: 14px; }
.v-profile dt { color: var(--muted); }
.v-profile dd { margin: 0; font-weight: 700; }
.v-list { padding-left: max(20px, calc((100% - var(--narrow)) / 2)); padding-right: max(20px, calc((100% - var(--narrow)) / 2)); }
.v-list__head { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.v-list__item { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.v-list__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.v-list__title { margin: 0; font-weight: 700; }
.v-list__score { margin: 0; font-family: var(--display); font-weight: 900; font-size: 18px; color: var(--accent); white-space: nowrap; }
.v-list__comment { margin: 0; font-size: 13px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.v-note { margin: 20px max(20px, calc((100% - var(--narrow)) / 2)); padding: 14px 16px; border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.v-note p { margin: 0; }
.v-note__head { font-weight: 700; color: var(--ink); }
.v-footer--plain { position: static; }
/* 固定した帯の高さぶん、本文の下に余白を確保（高さはJSで計測） */
.v-has-footer { padding-bottom: var(--v-footer-h, 140px); }
/* 入力中は帯を隠して、キーボードと重ならないようにする（タッチ端末のみ） */
@media (hover: none) and (pointer: coarse) {
	.is-typing .v-footer:not(.v-footer--plain) { visibility: hidden; }
}

/* 完了・メッセージ画面 */
.v-msg { flex: 1; padding: 40px max(28px, calc((100% - 560px) / 2)); display: flex; flex-direction: column; gap: 18px; }
.v-msg .v-note { margin: 0; }
.v-msg__icon { width: 56px; height: 56px; border-radius: 28px; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.v-msg__title { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 900; line-height: 1.4; }
.v-msg__body { margin: 0; color: var(--ink-2); }
.v-form { display: flex; flex-direction: column; gap: 14px; }
.v-form .v-btn { max-width: none; }
.v-done { flex: 1; padding: 48px max(28px, calc((100% - 560px) / 2)) 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.v-done__icon { width: 72px; height: 72px; border-radius: 36px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.v-done__title { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 900; line-height: 1.35; }
.v-done__meta { margin: 0; font-size: 14px; color: var(--ink-2); }
.v-done .v-note { margin: 0; width: 100%; text-align: left; font-size: 14px; }
.v-done__foot { padding: 16px max(20px, calc((100% - 560px) / 2)) 28px; display: flex; justify-content: center; }
.v-done__foot .v-btn { border-color: var(--ink); max-width: none; }

.v-toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); max-width: calc(100% - 40px); padding: 10px 16px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; z-index: 10; }

/* 部門タグ */
.v-tag { align-self: flex-start; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-bottom: 2px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 11px; font-weight: 700; letter-spacing: .02em; }

/* 紙で受け付けた作品 */
.v-film--paper { background: var(--surface); }
.v-paper-note { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.v-paper-comment { margin: 0; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
