/* 共有のシステム色・書体・動きと、シート・表・段の列・結果の合図。gp-creator が使い、gp-admin は後で使う。
 * Apple HIG「Dark Mode」「Sheets」「Lists and tables」「Motion」「Feedback」を参照し、配色は端末の設定に従う。
 * 色は :root に集め、暗い配色では色だけを差し替える。画面固有の配置は各画面の styles.css に置く。
 * CSP に従い外部 CSS とクラスで見た目を定義する。JS は innerHTML・style 属性を使わず、必要な更新は CSSOM だけ。
 * 動きを減らす設定では位置・大きさを動かさず、薄く出す・消すだけにする。強制色と reduce の上書きは末尾に置く。
 */
:root {
  --gp-nav-height: 52px;
  --gp-large-title-size: 34px;
  --gp-large-title-leading: 41px;
  --gp-large-title-pad-top: 12px;
  --gp-large-title-pad-bottom: 8px;
  --gp-title-to-content: 16px;
  --gp-page-gutter: 40px;
  --gp-page-top: 40px;
  --gp-sidebar-top: 24px;
  --gp-head-gap: 24px;
  --gp-title-to-meta: 10px;
  --gp-section-gap: 32px;
  --gp-list-header-gap: 8px;
  color-scheme: light dark;
  --gp-bg: #f2f2f7;
  --gp-surface: #ffffff;
  --gp-surface-2: #f2f2f7;
  --gp-surface-hover: #e5e5eb;
  --gp-sidebar: #eaeaf0;
  --gp-bar: rgb(255 255 255 / .88);
  --gp-separator: #d1d1d6;
  --gp-border-strong: #7a7a80;
  --gp-label: #1c1c1e;
  --gp-secondary-label: #606066;
  --gp-tint: #0060c0;
  --gp-tint-hover: #004e9c;
  --gp-on-tint: #ffffff;
  /* スイッチのつまみ（iOS と同じく明暗とも白）。 */
  --gp-switch-thumb: #ffffff;
  --gp-tint-soft: #e0edff;
  --gp-tint-text: #0053a6;
  --gp-focus: #0060c0;
  --gp-neutral-fg: #505057;
  --gp-neutral-bg: #e9e9ee;
  --gp-info-fg: #00529e;
  --gp-info-bg: #e0efff;
  --gp-progress-fg: #0055ad;
  --gp-progress-bg: #e0edff;
  --gp-ok-fg: #17663a;
  --gp-ok-bg: #e0f3e7;
  --gp-warn-fg: #785000;
  --gp-warn-bg: #fff0cf;
  --gp-danger-fg: #a52220;
  --gp-danger-bg: #ffe5e3;
  --gp-muted-fg: #5b5b63;
  --gp-muted-bg: #ececf1;
  --gp-danger: #b52320;
  --gp-on-danger: #ffffff;
  --gp-scrim: rgb(0 0 0 / .32);
  --gp-shadow: 0 1px 3px rgb(0 0 0 / .06);
  --gp-shadow-sheet: 0 20px 80px rgb(0 0 0 / .25);
  --gp-shadow-toast: 0 8px 32px rgb(0 0 0 / .18);
  --gp-skeleton: #dedee5;
  --gp-skeleton-shine: #f7f7fa;
  --gp-font: "GP Latin", system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --gp-text-large-title: 34px;
  --gp-text-title1: 28px;
  --gp-text-title2: 22px;
  --gp-text-title3: 20px;
  --gp-text-headline: 17px;
  --gp-text-body: 15px;
  --gp-text-callout: 16px;
  --gp-text-subhead: 15px;
  --gp-text-footnote: 13px;
  --gp-text-caption: 12px;
  --gp-radius-group: 12px;
  --gp-radius-card: 16px;
  --gp-radius-control: 10px;
  --gp-radius-sheet: 16px;
  --gp-radius-pill: 999px;
  --gp-ease-out: cubic-bezier(.22, 1, .36, 1);
  --gp-ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --gp-ease-spring: cubic-bezier(.22, 1.12, .36, 1);
  --gp-duration-fast: .15s;
  --gp-duration: .3s;
  --gp-duration-slow: .45s;
  --gp-duration-menu: .22s;
  --gp-duration-reveal: .2s;
  --gp-duration-press: .1s;
  --gp-duration-out: .25s;
  --gp-duration-shake: .35s;
  --gp-menu-scrim: rgb(0 0 0 / 0);
  --gp-rise: 12px;
  --gp-scroll-top: 0px;
  --gp-toast-offset: 0px;
  --gp-space-1: 4px;
  --gp-space-2: 8px;
  --gp-space-3: 12px;
  --gp-space-4: 16px;
  --gp-space-5: 20px;
  --gp-space-6: 24px;
  --gp-space-7: 32px;
}
@media (prefers-color-scheme: dark) {
  :root {
  --gp-bg: #000000;
  --gp-surface: #1c1c1e;
  --gp-surface-2: #2c2c2e;
  --gp-surface-hover: #363638;
  --gp-sidebar: #161618;
  --gp-bar: rgb(28 28 30 / .9);
  --gp-separator: #414145;
  --gp-border-strong: #88888e;
  --gp-label: #f5f5f7;
  --gp-secondary-label: #b0b0b8;
  --gp-tint: #62afff;
  --gp-tint-hover: #8fc6ff;
  --gp-on-tint: #071a2e;
  --gp-switch-thumb: #ffffff;
  --gp-tint-soft: #163553;
  --gp-tint-text: #8fc6ff;
  --gp-focus: #62afff;
  --gp-neutral-fg: #c4c4cc;
  --gp-neutral-bg: #303034;
  --gp-info-fg: #8fc6ff;
  --gp-info-bg: #173650;
  --gp-progress-fg: #8fc6ff;
  --gp-progress-bg: #163553;
  --gp-ok-fg: #85dba5;
  --gp-ok-bg: #193d29;
  --gp-warn-fg: #f5ce78;
  --gp-warn-bg: #453719;
  --gp-danger-fg: #ffaaa5;
  --gp-danger-bg: #4d2527;
  --gp-muted-fg: #bdbdc6;
  --gp-muted-bg: #303034;
  --gp-danger: #ffaaa5;
  --gp-on-danger: #400b0a;
  --gp-scrim: rgb(0 0 0 / .5);
  --gp-menu-scrim: rgb(0 0 0 / 0);
  --gp-shadow: 0 1px 3px rgb(0 0 0 / .2);
  --gp-shadow-sheet: 0 20px 80px rgb(0 0 0 / .6);
  --gp-shadow-toast: 0 8px 32px rgb(0 0 0 / .5);
  --gp-skeleton: #36363b;
  --gp-skeleton-shine: #48484f;
  }
}
/* 英数字だけ Montserrat（日本語の字はこの束にないので端末の書体になる。gp-play と同じファイル） */
@font-face { font-family: "GP Latin"; src: url("/fonts/montserrat-latin-500.woff2") format("woff2"); font-weight: 100 650; font-style: normal; font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF; }
@font-face { font-family: "GP Latin"; src: url("/fonts/montserrat-latin-800.woff2") format("woff2"); font-weight: 651 1000; font-style: normal; font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF; }


.gp-large-title { font-size: var(--gp-large-title-size); font-weight: 800; line-height: var(--gp-large-title-leading); padding-block: var(--gp-large-title-pad-top) var(--gp-large-title-pad-bottom); letter-spacing: -.025em; }
.gp-group { background: var(--gp-surface); border-radius: var(--gp-radius-group); overflow: hidden; }
.gp-group-header, .gp-group-footer { color: var(--gp-secondary-label); font-size: var(--gp-text-footnote); padding: var(--gp-space-2) var(--gp-space-4); }
.gp-row { min-height: 44px; padding: var(--gp-space-3) var(--gp-space-4); display: flex; align-items: center; justify-content: space-between; gap: var(--gp-space-3); position: relative; }
.gp-row + .gp-row::before { content: ""; position: absolute; top: 0; left: var(--gp-space-4); right: 0; border-top: 1px solid var(--gp-separator); }
.gp-icon { width: 24px; height: 24px; flex: none; vertical-align: middle; }
.gp-page { min-height: 100dvh; background: var(--gp-bg); transform-origin: center top; transition: transform var(--gp-duration-slow) var(--gp-ease-out), filter var(--gp-duration); }
.gp-nav { box-sizing: border-box; position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(92px, 1fr); align-items: center; gap: 8px; height: calc(var(--gp-nav-height) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left)); background: var(--gp-surface); border-bottom: 1px solid transparent; color: var(--gp-label); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gp-nav { background: var(--gp-bar); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); }
}
.gp-nav.is-scrolled { border-bottom-color: var(--gp-separator); }
.gp-nav-leading, .gp-nav-trailing { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gp-nav-trailing { justify-content: flex-end; gap: 4px; }
.gp-nav-title { min-width: 0; max-width: 15em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; font-size: var(--gp-text-headline); font-weight: 700; opacity: 0; transition: opacity var(--gp-duration-fast); }
.gp-nav.is-scrolled .gp-nav-title { opacity: 1; }
.gp-nav-mark { width: 32px; height: 32px; flex: none; }
.gp-nav-brand { margin: 0; font-size: 17px; font-weight: 800; white-space: nowrap; }
.gp-nav-sub { font-size: 13px; color: var(--gp-secondary-label); border-left: 1px solid var(--gp-separator); padding-left: 10px; white-space: nowrap; }
.gp-nav .gp-nav-icon, .gp-nav .gp-nav-back { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; border: 0; padding: 0; background: transparent; color: var(--gp-tint-text); border-radius: var(--gp-radius-control); text-decoration: none; font: inherit; cursor: pointer; }
.gp-nav .gp-nav-back { gap: 2px; }
.gp-nav .gp-nav-icon:hover, .gp-nav .gp-nav-back:hover { background: var(--gp-surface-hover); }
.gp-nav [hidden] { display: none; }
.gp-pressable { transition: transform var(--gp-duration-press) var(--gp-ease-out), background-color var(--gp-duration-press); }
.gp-pressable:active { transform: scale(.97); }
.gp-nav .gp-pressable:active:not(:disabled) { transform: scale(.97); }
/* body の固定位置を帯で打ち消し、縮む中心も画面の上端にそろえる。 */
html.gp-sheet-open .gp-page { transform-origin: center calc(0px - var(--gp-scroll-top)); }
html.gp-sheet-open .gp-page .gp-nav { top: calc(0px - var(--gp-scroll-top)); }
.gp-menu-layer { box-sizing: border-box; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--gp-menu-scrim); z-index: 100; color: var(--gp-label); }
.gp-menu-layer::backdrop { background: transparent; }
.gp-menu { box-sizing: border-box; position: fixed; width: 280px; max-width: calc(100vw - 24px); overflow: auto; overscroll-behavior: contain; padding: 6px 0; border: 1px solid var(--gp-separator); border-radius: 14px; background: var(--gp-surface); color: var(--gp-label); box-shadow: var(--gp-shadow-sheet); font: 500 15px/1.5 var(--gp-font); animation: gp-menu-in var(--gp-duration-menu) var(--gp-ease-spring) backwards; }
.gp-menu-header { padding: 10px 16px; overflow-wrap: anywhere; }
.gp-menu-header p { margin: 2px 0 0; font-size: var(--gp-text-footnote); color: var(--gp-secondary-label); }
.gp-menu-separator { border-top: 1px solid var(--gp-separator); margin: 4px 0; }
.gp-menu .gp-menu-item { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: auto; min-height: 44px; white-space: normal; overflow-wrap: anywhere; padding: 10px 16px; border: 0; border-radius: 0; color: var(--gp-label); background: transparent; text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.gp-menu-item .gp-icon { width: 20px; height: 20px; }
.gp-menu .gp-menu-item:hover, .gp-menu .gp-menu-item:focus-visible { background: var(--gp-surface-hover); outline-offset: -3px; }
.gp-menu .gp-menu-danger { color: var(--gp-danger-fg); }
.gp-menu-item[aria-disabled="true"] { opacity: .5; cursor: default; }
.gp-list-section { display: grid; gap: var(--gp-list-header-gap); }
.gp-list-header, .gp-list-footer { margin: 0; padding: 0 16px; font-size: var(--gp-text-footnote); color: var(--gp-secondary-label); }
.gp-list { list-style: none; margin: 0; padding: 0; border-radius: var(--gp-radius-group); background: var(--gp-surface); overflow: hidden; }
.gp-list > .gp-cell { box-sizing: border-box; position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px; }
.gp-cell + .gp-cell::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--gp-separator); }
.gp-cell-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.gp-cell-leading, .gp-cell-trailing, .gp-cell-chevron { display: flex; align-items: center; flex: none; }
/* 前端の高さは呼出側の CSS で変更可。lh は題名と同じ1行の高さ。 */
.gp-cell:has(> .gp-cell-leading):has(> .gp-cell-main > .gp-cell-sub) { align-items: flex-start; }
.gp-cell:has(> .gp-cell-leading):has(> .gp-cell-main > .gp-cell-sub) > .gp-cell-leading { height: var(--gp-cell-leading-size, 36px); }
.gp-cell:has(> .gp-cell-leading):has(> .gp-cell-main > .gp-cell-sub) > .gp-cell-main { padding-top: max(0px, calc((var(--gp-cell-leading-size, 36px) - 1lh) / 2)); }
.gp-cell:has(> .gp-cell-leading):has(> .gp-cell-main > .gp-cell-sub) .gp-cell-action { height: auto; align-content: start; }
.gp-cell-value, .gp-cell-trailing, .gp-cell-chevron { align-self: center; }
.gp-cell-value { flex: 0 1 auto; min-width: 0; max-width: 60%; text-align: right; overflow-wrap: anywhere; }
.gp-cell-trailing { flex: 0 1 auto; flex-wrap: wrap; min-width: 0; max-width: 60%; gap: 8px; }
.gp-cell-trailing button, .gp-nav .gp-nav-back span { min-width: 0; max-width: 100%; white-space: nowrap; }
.gp-menu-item span { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.gp-nav-leading, .gp-nav-trailing { flex-wrap: wrap; }
.gp-cell-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-cell-title.gp-cell-title-wrap { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.gp-cell-danger { color: var(--gp-danger-fg); }
.gp-cell-sub { display: block; overflow-wrap: anywhere; font-size: var(--gp-text-footnote); color: var(--gp-secondary-label); }
.gp-cell .gp-cell-action { display: block; min-width: 0; min-height: 44px; max-width: 100%; padding: 0; border: 0; background: transparent; text-align: left; text-decoration: none; color: inherit; font: inherit; cursor: pointer; }
.gp-cell .gp-cell-cover { min-height: 0; }
.gp-cell-cover::after { content: ""; position: absolute; inset: 0; }
.gp-cell-action:focus-visible { outline-offset: -3px; }
.gp-cell:has(.gp-cell-cover:focus-visible) { outline: 3px solid var(--gp-focus); outline-offset: -3px; }
.gp-cell-chevron { color: var(--gp-secondary-label); }
.gp-cell-chevron .gp-icon { width: 16px; height: 16px; }
.gp-list-sidebar { background: transparent; }
.gp-list-sidebar > .gp-cell { border-radius: var(--gp-radius-control); }
.gp-list-sidebar > .gp-cell + .gp-cell::before { display: none; }
.gp-list .gp-cell.selected, .gp-cell:has([aria-current="true"]) { background: var(--gp-tint-soft); font-weight: 700; }
.gp-cell-enter { overflow: hidden; animation: gp-cell-in var(--gp-duration) var(--gp-ease-out) backwards; }
.gp-cell-leave { overflow: hidden; animation: gp-cell-out var(--gp-duration-out) var(--gp-ease-out) backwards; }
.gp-cell-highlight { animation-name: gp-cell-in, gp-cell-flash; }
.gp-empty { display: grid; justify-items: center; align-content: center; gap: 14px; padding: 24px; min-height: 240px; color: var(--gp-secondary-label); text-align: center; }
.gp-empty > .gp-icon { width: 56px; height: 56px; }
.gp-empty img { width: 72px; height: 72px; }
.gp-empty h2, .gp-empty p { margin: 0; }
.gp-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gp-empty-steps { display: grid; gap: 16px; text-align: left; padding-left: 24px; }
.gp-empty-steps li { padding-left: 8px; }
.gp-empty-steps .is-done { color: var(--gp-ok-fg); }
.gp-field { display: grid; gap: 6px; }
.gp-field > label { font-size: var(--gp-text-footnote); color: var(--gp-secondary-label); }
.gp-field input:not([type="checkbox"]), .gp-field textarea, .gp-field select { box-sizing: border-box; width: 100%; min-height: 44px; min-width: 0; padding: 10px 12px; border: 1px solid var(--gp-border-strong); border-radius: var(--gp-radius-control); color: var(--gp-label); background: var(--gp-surface); font: inherit; font-size: 16px; }
.gp-field-help, .gp-field-error { margin: 0; font-size: var(--gp-text-footnote); }
.gp-field-help { color: var(--gp-secondary-label); }
.gp-field-error { color: var(--gp-danger-fg); }
input.gp-switch[role="switch"] { box-sizing: border-box; appearance: none; position: relative; width: 52px; min-width: 52px; height: 44px; min-height: 44px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; }
.gp-switch::before { content: ""; position: absolute; inset: 6px 0; border: 1px solid var(--gp-border-strong); border-radius: 16px; background: var(--gp-neutral-bg); }
.gp-switch::after { content: ""; position: absolute; top: 9px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--gp-switch-thumb); box-shadow: var(--gp-shadow); outline: 1px solid var(--gp-border-strong); outline-offset: -1px; }
.gp-switch:checked::before { background: var(--gp-tint); border-color: var(--gp-tint); }
.gp-switch:checked::after { left: 23px; outline-color: transparent; }
.gp-switch:disabled { opacity: .5; cursor: default; }
.gp-field :focus-visible, .gp-switch:focus-visible { outline: 3px solid var(--gp-focus); outline-offset: 2px; }
.gp-sheet > [hidden] { display: none !important; }
.gp-sheet-discard { grid-area: 1 / 1 / -1 / -1; padding: 24px; align-self: start; }
.gp-sheet-discard h2 { margin: 0 0 24px; text-align: center; font-size: var(--gp-text-headline); }
.gp-sheet-discard-actions { display: flex; flex-direction: column; gap: 8px; }
/* 同じ値の基本の形だけを共有する。画面ごとの差は画面の CSS に残す。 */
.sk-block { background: linear-gradient(100deg, var(--gp-skeleton) 30%, var(--gp-skeleton-shine) 50%, var(--gp-skeleton) 70%) 0 0 / 300% 100%; animation: gp-shine 1.5s ease-in-out infinite backwards; }
.sk-line { height: 14px; }
.sk-line.sk-thin { height: 11px; }
.sk-line.sk-heading { height: 20px; }
.sk-line.sk-title { height: 26px; }
.gp-reveal { animation: gp-reveal var(--gp-duration-reveal) var(--gp-ease-out) backwards; }
.gp-button, .gp-button-tinted, .gp-button-plain { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; padding: var(--gp-space-2) var(--gp-space-4); border: 0; border-radius: var(--gp-radius-control); font: inherit; font-weight: 600; cursor: pointer; }
.gp-button { background: var(--gp-tint); color: var(--gp-on-tint); }
.gp-button:hover { background: var(--gp-tint-hover); }
.gp-button-tinted { background: var(--gp-tint-soft); color: var(--gp-tint-text); }
.gp-button-plain { background: transparent; color: var(--gp-tint-text); }
.gp-button-danger, .gp-button-danger:hover { background: var(--gp-danger); color: var(--gp-on-danger); }
/* 新しい形は画面単位で採用する。未移行の admin/play の表示は保つ。 */
.gp-button-shapes :is(.gp-button, .gp-button-tinted, .gp-button-plain, .gp-button-danger) {
  box-sizing: border-box; display: inline-block; height: 44px; min-height: 44px; min-width: 44px; max-width: 100%;
  flex: none; align-self: center; padding: 0 16px; border-radius: 999px;
  white-space: nowrap; vertical-align: middle;
  transition: transform var(--gp-duration-press) var(--gp-ease-out), background-color var(--gp-duration-press);
}
.gp-button-shapes :is(.gp-button, .gp-button-tinted, .gp-button-plain, .gp-button-danger):active:not(:disabled) { transform: scale(.97); filter: brightness(.92); }
/* 通常の操作名は1行に収める。文字拡大時だけ gp-button-flex で折り返せる。 */
.gp-button-shapes .gp-button-small { position: relative; height: 36px; min-height: 36px; padding: 0 14px; overflow: visible; }
.gp-button-shapes .gp-button-small::before { content: ""; position: absolute; inset: -4px 0; }
.gp-button-label { display: block; min-width: 0; white-space: inherit; }
.gp-button-shapes .gp-button-full { width: 100%; height: 50px; min-height: 50px; border-radius: 12px; padding-inline: 16px; }
.gp-button-shapes .gp-button-icon, .gp-button-shapes .gp-nav .gp-nav-icon { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.gp-nav .gp-nav-back:is(.gp-button-shapes *) { border-radius: 999px; }
.gp-button-shapes .gp-button-flex[data-flex-height] { height: auto; min-height: 44px; white-space: normal; overflow-wrap: anywhere; text-align: center; padding-block: max(0px, calc((44px - 1lh) / 2)); line-height: 1.6; border-radius: 22px; }
.gp-button-shapes .gp-button-full.gp-button-flex[data-flex-height] { min-height: 50px; padding-block: max(0px, calc((50px - 1lh) / 2)); border-radius: 12px; }
.gp-badge { box-sizing: border-box; display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; border-radius: var(--gp-radius-pill); padding: 2px 8px; font-size: var(--gp-text-caption); }
.gp-badge.tone-neutral { color: var(--gp-neutral-fg); background: var(--gp-neutral-bg); }
.gp-badge.tone-info { color: var(--gp-info-fg); background: var(--gp-info-bg); }
.gp-badge.tone-progress { color: var(--gp-progress-fg); background: var(--gp-progress-bg); }
.gp-badge.tone-ok { color: var(--gp-ok-fg); background: var(--gp-ok-bg); }
.gp-badge.tone-warn { color: var(--gp-warn-fg); background: var(--gp-warn-bg); }
.gp-badge.tone-danger { color: var(--gp-danger-fg); background: var(--gp-danger-bg); }
.gp-badge.tone-muted { color: var(--gp-muted-fg); background: var(--gp-muted-bg); }
html.gp-sheet-open { overflow: hidden; overscroll-behavior: none; }
.gp-sheet-open body { position: fixed; top: var(--gp-scroll-top); width: 100%; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
input[aria-invalid="true"] { border-color: var(--gp-danger-fg); }
.gp-sheet { box-sizing: border-box; padding: 0; border: 1px solid var(--gp-separator); border-radius: var(--gp-radius-sheet); width: min(560px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); overflow: auto; overflow-x: hidden; overflow-x: clip; overscroll-behavior: contain; color: var(--gp-label); background: var(--gp-surface); box-shadow: var(--gp-shadow-sheet); font-family: var(--gp-font); animation: gp-sheet-in var(--gp-duration-slow) var(--gp-ease-out) backwards; transition: transform var(--gp-duration-fast) var(--gp-ease-out); }
.gp-sheet-large { width: min(720px, calc(100% - 32px)); }
.gp-sheet::backdrop { background: var(--gp-scrim); animation: gp-fade var(--gp-duration) var(--gp-ease-out) backwards; }
.gp-sheet.closing { animation: gp-sheet-out var(--gp-duration) var(--gp-ease-in-out) backwards; }
.gp-sheet.closing::backdrop { animation: gp-fade-out var(--gp-duration) var(--gp-ease-out) backwards; }
.gp-sheet-bar { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 4fr) minmax(120px, 1fr); gap: 8px; align-items: center; padding: 8px; background: var(--gp-surface); border-bottom: 1px solid var(--gp-separator); touch-action: none; }
.gp-sheet-bar h2 { font-size: var(--gp-text-headline); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.gp-sheet.gp-sheet-bottom-actions .gp-sheet-bar { grid-template-columns: minmax(64px, 1fr) minmax(0, 4fr) minmax(64px, 1fr); }
.gp-sheet-footer { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: var(--gp-surface); border-top: 1px solid var(--gp-separator); }
.gp-sheet-cancel { justify-self: start; white-space: nowrap; padding-inline: 8px; }
.gp-sheet-actions { justify-self: end; display: flex; flex-wrap: wrap; min-width: 0; max-width: 100%; gap: 8px; }
.gp-sheet-actions button { white-space: nowrap; max-width: 100%; }
.gp-button-shapes .gp-sheet-actions button { display: block; min-width: 0; }
/* DOM は閉じる・入力・確定の順。上部確定だけ grid で見出しの後端へ置く。 */
.gp-sheet-top-actions[open] { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 4fr) minmax(120px, 1fr); align-items: center; align-content: start; }
/* 帯を一枚の箱に保ち、空いた所も引けるようにする。確定だけを後端へ重ねる。 */
.gp-sheet-top-actions .gp-sheet-bar { grid-area: 2 / 1 / 3 / -1; min-height: 60px; align-self: stretch; padding: 0; gap: 0; }
.gp-sheet-top-actions .gp-sheet-cancel, .gp-sheet-top-actions .gp-sheet-bar h2 { margin: 8px; }
.gp-sheet-top-actions .gp-sheet-cancel { grid-column: 1; }
.gp-sheet-top-actions .gp-sheet-bar h2 { grid-column: 2; margin-inline: 0; }
.gp-sheet-top-actions > .gp-sheet-actions { grid-area: 2 / 3 / 3 / 4; position: sticky; top: 8px; z-index: 2; margin: 8px; }
.gp-sheet-top-actions > .gp-sheet-content { grid-area: 3 / 1 / 4 / -1; }
.gp-sheet-top-actions > .gp-sheet-grabber { grid-area: 1 / 1 / 2 / -1; }
.gp-sheet-content { padding: var(--gp-space-6); display: grid; gap: var(--gp-space-4); }
.gp-sheet-grabber { display: none; touch-action: none; }
.gp-sunken { filter: brightness(.96); transition: transform var(--gp-duration-slow) var(--gp-ease-out), filter var(--gp-duration); }
.gp-toasts { position: fixed; z-index: 40; top: calc(72px + env(safe-area-inset-top)); bottom: auto; left: 16px; right: 16px; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.gp-toasts::backdrop { background: transparent; pointer-events: none; }
@supports selector(:popover-open) {
  .gp-toasts[popover]:not(:popover-open) { display: none; }
}
::view-transition-group(gp-topbar), ::view-transition-old(gp-topbar), ::view-transition-new(gp-topbar) { animation: none; transform: none; }
.gp-toast { box-sizing: border-box; max-width: 100%; overflow-wrap: anywhere; display: flex; gap: 10px; align-items: center; padding: 12px 20px; border-radius: var(--gp-radius-pill); background: var(--gp-surface); color: var(--gp-label); border: 1px solid var(--gp-separator); box-shadow: var(--gp-shadow-toast); animation: gp-rise var(--gp-duration) var(--gp-ease-out) backwards; pointer-events: auto; }
.gp-toast.closing { animation: gp-fade-out .2s var(--gp-ease-out) backwards; }
.gp-toast.tone-ok .gp-check { color: var(--gp-ok-fg); }
.gp-toast.tone-info .gp-check { color: var(--gp-info-fg); }
.gp-toast.tone-danger .gp-check { color: var(--gp-danger-fg); }
.gp-toast.tone-danger { color: var(--gp-danger-fg); border-color: var(--gp-danger-fg); }
ol.gp-stages { display: flex; flex-wrap: nowrap; list-style: none; padding: 12px 0; margin: 0; width: 100%; }
.gp-stages .step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; font-size: var(--gp-text-caption); color: var(--gp-secondary-label); }
.gp-stages .step::before, .gp-stages .step::after { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--gp-separator); }
.gp-stages .step::after { background: var(--gp-tint); transform: scaleX(0); transform-origin: left; transition: transform var(--gp-duration-slow) var(--gp-ease-out); }
.gp-stages .step:first-child::before, .gp-stages .step:first-child::after { display: none; }
.gp-stages .step-done::after, .gp-stages .step-current::after, .gp-stages .step-failed::after { transform: scaleX(1); }
.gp-stages .step-dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--gp-surface); border: 2px solid var(--gp-border-strong); display: grid; place-items: center; font: 700 12px/1 system-ui; }
.gp-stages .step-label { white-space: nowrap; padding: 0 2px; }
.gp-stages .step-done .step-dot { background: var(--gp-tint); border-color: var(--gp-tint); color: var(--gp-on-tint); }
.gp-stages .step-done .step-dot::after { content: "✓"; }
.gp-stages .step-current { color: var(--gp-tint-text); font-weight: 700; }
.gp-stages .step-current .step-dot { border: 3px solid var(--gp-tint); box-shadow: 0 0 0 3px var(--gp-tint-soft); }
.gp-stages .step-failed { color: var(--gp-danger-fg); }
.gp-stages .step-failed .step-dot { border-color: var(--gp-danger-fg); }
.gp-stages .step-failed .step-dot::after { content: "×"; }
.gp-stages .step-skipped .step-dot { border-style: dashed; }
.gp-stages .gp-stage-enter { animation: gp-pop var(--gp-duration) var(--gp-ease-spring) backwards; }
.gp-check { width: 24px; height: 24px; vertical-align: middle; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: 6px; }
.gp-check circle, .gp-check path { stroke-dasharray: 70; stroke-dashoffset: 0; animation: gp-check-draw var(--gp-duration-slow) var(--gp-ease-out) backwards; }
.gp-shake { animation: gp-shake var(--gp-duration-shake) var(--gp-ease-in-out) backwards; border-color: var(--gp-danger-fg); }
::view-transition-group(gp-game-card) { animation-duration: var(--gp-duration-slow); animation-timing-function: var(--gp-ease-out); }
::view-transition-old(root) { animation: gp-fade-out var(--gp-duration) var(--gp-ease-out) backwards; }
::view-transition-new(root) { animation: gp-fade var(--gp-duration) var(--gp-ease-out) backwards; }
@media (max-width: 743.98px), ((pointer: coarse) and (orientation: landscape) and (max-width: 1023px) and (max-height: 500px)) {
  .gp-sheet { position: fixed; inset: auto 0 0; margin: 0; width: 100%; max-height: calc(100dvh - env(safe-area-inset-top) - 16px); border-radius: var(--gp-radius-sheet) var(--gp-radius-sheet) 0 0; padding-bottom: env(safe-area-inset-bottom); animation-name: gp-sheet-up; }
  /* 延長量 extend に上限を設け、Safari の浮いた帯の後ろまで面を切れ目なく延ばす。
   * 影の形の上端は top + 角丸でシートの中。外側の影は枠の外にしか描かれない。
   * 下端から下へは 2 × extend + 角丸、左右へは extend の分だけ広がる。開閉・ドラッグに追従する。
   * forced-colors では box-shadow が消える。 */
  .gp-sheet.gp-sheet-form { --gp-sheet-extend: min(100dvh, 480px); top: calc(var(--gp-sheet-vv-top, 0px) + env(safe-area-inset-top) + 16px); bottom: auto; height: calc(var(--gp-sheet-vv-height, 100dvh) - env(safe-area-inset-top) - 16px); max-height: calc(var(--gp-sheet-vv-height, 100dvh) - env(safe-area-inset-top) - 16px); border-bottom-color: transparent; box-shadow: 0 calc(var(--gp-sheet-extend) + var(--gp-radius-sheet)) 0 var(--gp-sheet-extend) var(--gp-surface), var(--gp-shadow-sheet); }
  .gp-sheet.gp-sheet-form.gp-sheet-bottom-actions[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; align-content: start; }
  .gp-sheet.gp-sheet-form.gp-sheet-bottom-actions > .gp-sheet-content { align-content: start; }
  .gp-sheet.closing { animation-name: gp-sheet-down; }
  .gp-sheet .gp-sheet-bar, .gp-sheet.gp-sheet-bottom-actions .gp-sheet-bar { grid-template-columns: minmax(max-content, 1fr) minmax(0, 2fr) minmax(max-content, 1fr); }
  .gp-sheet-top-actions[open] { grid-template-columns: minmax(max-content, 1fr) minmax(0, 2fr) minmax(max-content, 1fr); }
  /* subgrid の無いブラウザでも、長い確定と見出しが重ならない幅を確保する。 */
  .gp-sheet-top-actions .gp-sheet-bar { grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) minmax(120px, 1fr); }
  .gp-sheet-bar h2 { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .gp-sheet-content { padding: 20px 16px; }
  .gp-sheet-bottom-actions { padding-bottom: 0; }
  .gp-sheet-footer .gp-sheet-actions { width: 100%; flex-direction: column; }
  .gp-sheet-footer button { width: 100%; }
  .gp-stages .step-label { font-size: calc(var(--gp-text-caption) - 1px); padding: 0; letter-spacing: -.02em; }
  .gp-stages .step:first-child .step-label { align-self: flex-start; text-align: left; }
  .gp-stages .step:last-child .step-label { align-self: flex-end; text-align: right; }
  .gp-sheet-grabber { display: block; height: 20px; background: var(--gp-surface); }
  .gp-sheet-grabber::before { content: ""; display: block; position: relative; top: 8px; width: 36px; height: 4px; margin: auto; border-radius: var(--gp-radius-pill); background: var(--gp-border-strong); }
  .gp-sunken { transform: scale(.97); border-radius: var(--gp-radius-sheet); }
  .gp-toasts { top: auto; bottom: calc(var(--gp-toast-offset) + 20px + env(safe-area-inset-bottom)); left: 16px; right: 16px; justify-items: center; }
  ::view-transition-old(root) { animation-name: gp-nav-out; }
  ::view-transition-new(root) { animation-name: gp-nav-in; }
  html.gp-nav-back::view-transition-old(root) { animation-name: gp-nav-back-out; }
  html.gp-nav-back::view-transition-new(root) { animation-name: gp-nav-back-in; }
}
@supports (grid-template-columns: subgrid) {
  .gp-sheet-top-actions .gp-sheet-bar { grid-template-columns: subgrid; }
}
html.gp-root-fade::view-transition-old(root) { animation-name: gp-fade-out; }
html.gp-root-fade::view-transition-new(root) { animation-name: gp-fade; }
@media (max-width: 399px) {
  .gp-stages .step-label { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; max-width: 100%; }
}
@keyframes gp-rise { from { opacity: 0; transform: translateY(var(--gp-rise)); } }
@keyframes gp-menu-in { from { opacity: 0; transform: scale(.9); } }
@keyframes gp-cell-in { from { opacity: 0; max-height: 0; min-height: 0; padding-block: 0; } to { max-height: var(--gp-cell-height); } }
@keyframes gp-cell-out { from { max-height: var(--gp-cell-height); } to { opacity: 0; max-height: 0; min-height: 0; padding-block: 0; } }
@keyframes gp-cell-flash { from { background-color: var(--gp-tint-soft); } to { background-color: transparent; } }
@keyframes gp-reveal { from { opacity: 0; } }
@keyframes gp-fade { from { opacity: 0; } }
@keyframes gp-fade-out { to { opacity: 0; } }
@keyframes gp-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes gp-sheet-in { from { opacity: 0; transform: scale(.97); } }
@keyframes gp-sheet-out { to { opacity: 0; transform: scale(.97); } }
@keyframes gp-sheet-up { from { transform: translateY(100%); } }
@keyframes gp-sheet-down { to { transform: translateY(100%); } }
@keyframes gp-pop { from { transform: scale(.8); } }
@keyframes gp-check-draw { from { stroke-dashoffset: 70; } }
@keyframes gp-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes gp-nav-in { from { opacity: 0; transform: translateX(16%); } }
@keyframes gp-nav-out { to { opacity: 0; transform: translateX(-16%); } }
@keyframes gp-nav-back-in { from { opacity: 0; transform: translateX(-16%); } }
@keyframes gp-nav-back-out { to { opacity: 0; transform: translateX(16%); } }
@media (max-width: 743.98px) {
  :root { --gp-nav-height: 44px; --gp-page-gutter: 16px; --gp-page-top: 20px; }
  .gp-nav { height: calc(var(--gp-nav-height) + env(safe-area-inset-top)); grid-template-columns: minmax(88px, 1fr) minmax(0, auto) minmax(92px, 1fr); gap: 4px; }
  .gp-nav-brand, .gp-nav-sub { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  html.gp-sheet-open .gp-page.gp-sunken { transform: scale(.94); border-radius: var(--gp-radius-sheet); overflow: clip; }
}
@media (forced-colors: active) {
  .gp-nav, .gp-menu, .gp-list, .gp-empty, .gp-field input, .gp-field textarea, .gp-switch::before, .gp-switch::after { border: 1px solid CanvasText; }
  .gp-list .gp-cell.selected, .gp-cell:has([aria-current="true"]) { outline: 2px solid Highlight; outline-offset: -2px; }
  .gp-switch:checked::before { background: Highlight; }
  .gp-switch::after { background: CanvasText; }
  .sk-block { background: GrayText; }
  .gp-sheet, .gp-toast, .gp-group, .gp-button, .gp-button-tinted, .gp-badge { border: 1px solid CanvasText; }
  .gp-sheet.gp-sheet-form { border-bottom-color: CanvasText; }
  .gp-stages .step-dot { border-color: CanvasText; }
  .gp-stages .step::before, .gp-stages .step::after { background: CanvasText; }
  :focus-visible { outline: 3px solid Highlight; }
}
@media (prefers-reduced-motion: reduce) {
  .gp-button-shapes :is(.gp-button, .gp-button-tinted, .gp-button-plain, .gp-button-danger):active:not(:disabled) { transform: none; }
  .gp-menu, .gp-cell-enter { animation-name: gp-fade; }
  .gp-cell-leave { animation-name: gp-fade-out; }
  .gp-cell-highlight { animation-name: gp-fade; }
  .sk-block { animation: none; }
  .gp-pressable:active, html.gp-sheet-open .gp-page.gp-sunken { transform: none; }
  .gp-nav .gp-pressable:active:not(:disabled) { transform: none; }
  .gp-page, .gp-pressable { transition: none; }
  :root { --gp-rise: 0px; }
  .gp-sheet, .gp-toast, .gp-stages .gp-stage-enter, .gp-check circle, .gp-check path { animation-name: gp-fade; }
  .gp-sheet.closing, .gp-toast.closing { animation-name: gp-fade-out; }
  .gp-sunken, .gp-sheet, .gp-stages .step::after { transition: none; }
  .gp-sunken { transform: none; }
  .gp-stages .step::after { transform: none; opacity: 0; }
  .gp-stages .step-done::after, .gp-stages .step-current::after, .gp-stages .step-failed::after { opacity: 1; }
  .gp-shake { animation: none; transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; transform: none; }
}
