@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300..800&display=swap");
@font-face {
    font-family: "Local Noto Sans JP";
    src: local("Noto Sans JP");
}

/* =============================================================
   style.css — 案件開始用ベース（SP単一 / PCなし）
   デザイン幅 1200 / PC表示は半分の600pxで頭打ち / lp-css-rules 準拠
   ============================================================= */

/* -------------------------------------------------------------
   型2: フルードタイポの基準幅（SP単一なので min 一本）
   ------------------------------------------------------------- */
:root {
  --min-viewport-width: 1200;
  --min-fluid-ratio: calc(1 / var(--min-viewport-width) * 100dvi);

  /* PCでの頭打ち倍率: 表示600px / デザイン1200px = 0.5
     上限px値 = デザインpx数 * var(--max-scale) * 1px */
  --max-scale: 0.5;

  /* -------------------------------------------------------------
   型1: 色トークン（用途名。支給4色）
   ------------------------------------------------------------- */

  --color-bg: #231815;          /* ベース背景 */
  --color-text: #ffffff;        /* 本文 */
  --color-content-bg: #000000;  /* コンテンツ背景 */
  --color-button-bg: #1746ff;   /* ボタン背景 */
  --color-button-bg-stop: #ff0000;
  --color-button-text: #ffffff; /* ボタンテキスト */

  /* -------------------------------------------------------------
   型1: フォント（本文は Local Noto Sans JP 先頭。日本語前提）
   ------------------------------------------------------------- */
  --font-family-base: "Local Noto Sans JP", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  /* -------------------------------------------------------------
   型2: フォントサイズ段階トークン（1200基準の比率で算出）
   上限px値はデザインpx数 × --max-scale（=半分）。px数・上限は案件に合わせて調整。
   ------------------------------------------------------------- */
  --fs-base: min(calc(64 * var(--min-fluid-ratio)), calc(64 * var(--max-scale) * 1px));
  --fs-lg: min(calc(80 * var(--min-fluid-ratio)), calc(80 * var(--max-scale) * 1px));

  --radius-full: calc(1px / 0);
}


/* ress.css • v2.0.4 MIT License github.com/filipelinhares/ress */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS */
  word-break: normal;
  -moz-tab-size: 4;
  tab-size: 4;
}

*,
::before,
::after {
  background-repeat: no-repeat; /* Set `background-repeat: no-repeat` to all elements and pseudo elements */
  box-sizing: inherit;
}

::before,
::after {
  text-decoration: inherit; /* Inherit text-decoration and vertical align to ::before and ::after pseudo elements */
  vertical-align: inherit;
}

* {
  padding: 0; /* Reset `padding` and `margin` of all elements */
  margin: 0;
}

/* # =================================================================
   # General elements
   # ================================================================= */
hr {
  overflow: visible; /* Show the overflow in Edge and IE */
  height: 0; /* Add the correct box sizing in Firefox */
}

details,
main {
  display: block; /* Render the `main` element consistently in IE. */
}

summary {
  display: list-item; /* Add the correct display in all browsers */
}

small {
  font-size: 80%; /* Set font-size to 80% in `small` elements */
}

[hidden] {
  display: none; /* Add the correct display in IE */
}

abbr[title] {
  border-bottom: none; /* Remove the bottom border in Chrome 57 */
  /* Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari */
  text-decoration: underline;
  text-decoration: underline dotted;
}

a {
  background-color: transparent; /* Remove the gray background on active links in IE 10 */
}

a:active,
a:hover {
  outline-width: 0; /* Remove the outline when hovering in all browsers */
}

code,
kbd,
pre,
samp {
  font-family: monospace, monospace; /* Specify the font family of code elements */
}

pre {
  font-size: 1em; /* Correct the odd `em` font sizing in all browsers */
}

b,
strong {
  font-weight: bolder; /* Add the correct font weight in Chrome, Edge, and Safari */
}

/* https://gist.github.com/unruthless/413930 */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

ul, li {
  list-style-type: none;
}

h1, h2, h3, h4, h5, h6 {
  font-size: 1em;
}

/* # =================================================================
   # Forms
   # ================================================================= */
input {
  border-radius: 0;
}

/* Replace pointer cursor in disabled elements */
[disabled] {
  cursor: default;
}

[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
  height: auto; /* Correct the cursor style of increment and decrement buttons in Chrome */
}

[type=search] {
  -webkit-appearance: textfield; /* Correct the odd appearance in Chrome and Safari */
  outline-offset: -2px; /* Correct the outline style in Safari */
}

[type=search]::-webkit-search-decoration {
  -webkit-appearance: none; /* Remove the inner padding in Chrome and Safari on macOS */
}

textarea {
  overflow: auto; /* Internet Explorer 11+ */
  resize: vertical; /* Specify textarea resizability */
}

button,
input,
optgroup,
select,
textarea {
  font: inherit; /* Specify font inheritance of form elements */
}

optgroup {
  font-weight: bold; /* Restore the font weight unset by the previous rule */
}

button {
  overflow: visible; /* Address `overflow` set to `hidden` in IE 8/9/10/11 */
}

button,
select {
  text-transform: none; /* Firefox 40+, Internet Explorer 11- */
}

/* Apply cursor pointer to button elements */
button,
[type=button],
[type=reset],
[type=submit],
[role=button] {
  cursor: pointer;
  color: inherit;
}

/* Remove inner padding and border in Firefox 4+ */
button::-moz-focus-inner,
[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/* Replace focus style removed in the border reset above */
button:-moz-focusring,
[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner {
  outline: 1px dotted ButtonText;
}

button,
html [type=button],
[type=reset],
[type=submit] {
  -webkit-appearance: button; /* Correct the inability to style clickable types in iOS */
}

/* Remove the default button styling in all browsers */
button,
input,
select,
textarea {
  background-color: transparent;
  border-style: none;
}

/* Style select like a standard input */
select {
  /* -moz-appearance: none; */
  /* -webkit-appearance: none; */
}

select::-ms-expand {
  display: none; /* Internet Explorer 11+ */
}

select::-ms-value {
  color: currentColor; /* Internet Explorer 11+ */
}

legend {
  border: 0; /* Correct `color` not being inherited in IE 8/9/10/11 */
  color: inherit; /* Correct the color inheritance from `fieldset` elements in IE */
  display: table; /* Correct the text wrapping in Edge and IE */
  max-width: 100%; /* Correct the text wrapping in Edge and IE */
  white-space: normal; /* Correct the text wrapping in Edge and IE */
  max-width: 100%; /* Correct the text wrapping in Edge 18- and IE */
}

::-webkit-file-upload-button {
  /* Correct the inability to style clickable types in iOS and Safari */
  -webkit-appearance: button;
  color: inherit;
  font: inherit; /* Change font properties to `inherit` in Chrome and Safari */
}

/* # =================================================================
   # Specify media element style
   # ================================================================= */
img {
  border-style: none; /* Remove border when inside `a` element in IE 8/9/10 */
}

/* Add the correct vertical alignment in Chrome, Firefox, and Opera */
progress {
  vertical-align: baseline;
}

/* # =================================================================
   # Accessibility
   # ================================================================= */
/* Hide content from screens but not screenreaders */
@media screen {
  [hidden~=screen] {
    display: inherit;
  }
  [hidden~=screen]:not(:active):not(:focus):not(:target) {
    position: absolute !important;
    clip: rect(0 0 0 0) !important;
  }
}
/* Specify the progress cursor of updating elements */
[aria-busy=true] {
  cursor: progress;
}

/* Specify the pointer cursor of trigger elements */
[aria-controls] {
  cursor: pointer;
}

/* Specify the unstyled cursor of disabled, not-editable, or otherwise inoperable elements */
[aria-disabled] {
  cursor: default;
}

html *,
html *:before,
html *:after {
  box-sizing: inherit;
}

/* =============================================================
   ここから下は案件共通の挙動（型5）。原則そのまま。
   ============================================================= */

/* 日本語組版の既定 */
:where(:root) {
  text-spacing-trim: trim-start;
  text-autospace: normal;
  line-break: strict;
}
:where(pre, code, input, textarea, [contenteditable], time) {
  text-autospace: no-autospace;
}

/* レイアウトシフト防止（※Chrome 145+ では dvi がSB幅を除く点に留意） */
:where(:root) {
  scrollbar-gutter: stable;
}

/* 本文の基礎 */
:where(body) {
  overflow-wrap: break-word;
}
:where(p) {
  text-wrap: pretty;
}

/* マーカー消し（list-style: none は VoiceOver 読み上げ事故） */
:where(ul, ol, menu) { list-style-type: ""; }
:where(summary) { list-style-type: ""; }
:where(summary)::-webkit-details-marker { display: none; }

/* 視覚的に隠す（読み上げは残す） */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* forced-colors 対策: 枠線を消すときは transparent（border: none 不可） */
:where(button, input, select, textarea) {
  border-color: transparent;
}

/* ===========================
   ゲーム本体
=========================== */
.digital {
  background: url(../images/bg.png) no-repeat center top / 100% auto;
  background-color: var(--color-bg);
  font-feature-settings: "palt" 1;
  font-family: var(--font-family-base);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  width: min(100%, 600px);
  margin: 0 auto;
}

.digital img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

@media (min-width: 600px) {
  .digital img {
    width: 100%;
  }
}

.digital .digital_inner {
  padding-bottom: min(calc(160 * var(--min-fluid-ratio)), calc(160 * var(--max-scale) * 1px));
}

.digital .digital_copy {
  width: min(calc(1100 * var(--min-fluid-ratio)), calc(1100 * var(--max-scale) * 1px));
  margin-inline: auto;
  margin-top: min(calc(31 * var(--min-fluid-ratio)), calc(31 * var(--max-scale) * 1px));
  text-align: right;
}

.digital .digital_copy img {
  width: min(calc(149 * var(--min-fluid-ratio)), calc(149 * var(--max-scale) * 1px));
  vertical-align: top;
}

.digital .digital_start {
  width: min(calc(1112 * var(--min-fluid-ratio)), calc(1112 * var(--max-scale) * 1px));
  margin-inline: auto;
  margin-top: max(calc(-93 * var(--min-fluid-ratio)), calc(-93 * var(--max-scale) * 1px));
}

.digital .digital_start img {
  transform: translateX(min(calc(25 * var(--min-fluid-ratio)), calc(25 * var(--max-scale) * 1px)));
}

.digital .controls {
  width: min(calc(600 * var(--min-fluid-ratio)), calc(600 * var(--max-scale) * 1px));
  height: min(calc(600 * var(--min-fluid-ratio)), calc(600 * var(--max-scale) * 1px));
  display: block grid;
  place-items: center;
  margin-inline: auto;
  margin-top: min(calc(50 * var(--min-fluid-ratio)), calc(50 * var(--max-scale) * 1px));
  padding: min(calc(40 * var(--min-fluid-ratio)), calc(40 * var(--max-scale) * 1px));
  background-color: #fff;
  border-radius: var(--radius-full);
}

.digital .start-btn {
  background-color: var(--color-button-bg);
  border-radius: var(--radius-full);
  display: block grid;
  place-items: center;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  width: 100%;
  height: 100%;
  position: relative;
  letter-spacing: 0.1em;
}

.digital .start-btn:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  border: min(calc(20 * var(--min-fluid-ratio)), calc(20 * var(--max-scale) * 1px)) solid transparent;
  background: linear-gradient(180deg, #ffffff, #231815) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.3;
}

/* ストップ状態（同ボタンの色替え） */
.digital .start-btn[data-state="running"] {
  background-color: var(--color-button-bg-stop);
}

/* 演出領域（スロットリール） */
.stage {
  --reel-frames: 6;            /* 画像内のコマ数。画像差し替え時はここを更新 */
  --reel-frame-duration: 0.15s;/* 等速時、1コマが流れる時間。定常ループ周期 = コマ数 × これ */
  --reel-spinup-ratio: 2;      /* 助走時間 = 定常周期 × これ。ease-in終端速度が定常速度に
                                  一致するのは ratio=2 のとき（切り替わりが最も滑らか）。
                                  値を大きくすると助走がゆっくりになるが、繋ぎに僅かな段差が出る。 */
  --shadow-offset: min(calc(3 * var(--min-fluid-ratio)), calc(3 * var(--max-scale) * 1px));
  --shadow-blur: min(calc(15 * var(--min-fluid-ratio)), calc(15 * var(--max-scale) * 1px));
  position: relative;
  width: min(calc(1000 * var(--min-fluid-ratio)), calc(1000 * var(--max-scale) * 1px));
  height: min(calc(563 * var(--min-fluid-ratio)), calc(563 * var(--max-scale) * 1px));
  margin-inline: auto;
  aspect-ratio: 1000 / 563;     /* 1コマ 1120:635 と同比率。画像差し替え時はここを更新 */
  box-shadow: var(--shadow-offset) var(--shadow-offset) var(--shadow-blur) rgba(0, 0, 0, 1);
  overflow: hidden;
}

/* 流れる帯（スロットリール）。
   定石の「画像2枚積み」でループ：帯の高さを画像2枚分(=コマ数×2)にし、
   画像1枚(=コマ数コマ)を repeat-y で上下に2枚並べる。1枚分を translateY で流して
   0 に戻すと、全コマを流しきってから継ぎ目なく先頭へループする。

   ちらつき対策：
   - 1コマの高さ(--frame-h)を JS が整数px で算出して渡す。% だと割り切れず
     -50% 位置と 0 位置の絵が 1px 弱ズレてループ境界でちらつくため、px固定で一致させる。
   - translateZ(0) / backface-visibility:hidden でGPUレイヤーを固定し、
     iOS Safari のループ境界での再合成フラッシュを抑える。 */
.stage_reel {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  /* --frame-h(1コマpx) が来ていればそれ基準、無ければ % にフォールバック */
  height: calc(var(--frame-h, 100%) * var(--reel-frames) * 2 / 1);
  background-image: url("../images/scroll.png");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% calc(var(--frame-h, 100%) * var(--reel-frames)); /* 画像1枚=コマ数コマ */
  will-change: transform;
  transform: translateZ(0);            /* GPUレイヤー固定 */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 回転・停止の見た目はすべて JS(requestAnimationFrame) が
   .stage_reel の transform を直接更新して表現する（CSSアニメは使わない）。
   iOS の CSSアニメ ループ境界フラッシュを根本回避するための方式。
   速度は --reel-frame-duration、助走は --reel-spinup-ratio で調整。 */

/* ===========================
   結果（成功 / 失敗 共通レイアウト）
=========================== */
/* 結果ページ（案3：success.html / fault.html）。カードを画面中央に配置 */

.resultpage .result_image {
  --shadow-offset: min(calc(3 * var(--min-fluid-ratio)), calc(3 * var(--max-scale) * 1px));
  --shadow-blur: min(calc(15 * var(--min-fluid-ratio)), calc(15 * var(--max-scale) * 1px));
  position: relative;
  width: min(calc(1000 * var(--min-fluid-ratio)), calc(1000 * var(--max-scale) * 1px));
  height: min(calc(563 * var(--min-fluid-ratio)), calc(563 * var(--max-scale) * 1px));
  margin-inline: auto;
  box-shadow: var(--shadow-offset) var(--shadow-offset) var(--shadow-blur) rgba(0, 0, 0, 1);
}

.resultpage .result_text {
  width: min(calc(820 * var(--min-fluid-ratio)), calc(820 * var(--max-scale) * 1px));
  margin-inline: auto;
  margin-top: max(calc(-81 * var(--min-fluid-ratio)), calc(-81 * var(--max-scale) * 1px));
}

.resultpage .result_time {
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  font-size: min(calc(169 * var(--min-fluid-ratio)), calc(169 * var(--max-scale) * 1px));
  line-height: 1;
  letter-spacing: 0.01em;
  color: #000000;
  background-color: #fff;
  width: min(calc(750 * var(--min-fluid-ratio)), calc(750 * var(--max-scale) * 1px));
  padding-top: min(calc(52 * var(--min-fluid-ratio)), calc(52 * var(--max-scale) * 1px));
  padding-bottom: min(calc(78 * var(--min-fluid-ratio)), calc(78 * var(--max-scale) * 1px));
  margin: max(calc(-9 * var(--min-fluid-ratio)), calc(-9 * var(--max-scale) * 1px)) auto 0;
  text-align: center;
  border-radius: min(calc(26 * var(--min-fluid-ratio)), calc(26 * var(--max-scale) * 1px));
}

.resultpage .result_title {
  margin-inline: auto;
}

.resultpage .result_title.failure2 {
  margin-top: min(calc(63 * var(--min-fluid-ratio)), calc(63 * var(--max-scale) * 1px));
  width: min(calc(1014 * var(--min-fluid-ratio)), calc(1014 * var(--max-scale) * 1px));
}

.resultpage .result_title.failure1 {
  margin-top: min(calc(23 * var(--min-fluid-ratio)), calc(23 * var(--max-scale) * 1px));
  width: min(calc(1078 * var(--min-fluid-ratio)), calc(1078 * var(--max-scale) * 1px));
}

.resultpage .result_title.success {
  margin-top: min(calc(15 * var(--min-fluid-ratio)), calc(15 * var(--max-scale) * 1px));
  width: min(calc(1111 * var(--min-fluid-ratio)), calc(1111 * var(--max-scale) * 1px));
}

.resultpage .result_title.success img {
  transform: translateX(min(calc(3 * var(--min-fluid-ratio)), calc(3 * var(--max-scale) * 1px)));
}

.resultpage .result_actions {
  width: min(calc(1000 * var(--min-fluid-ratio)), calc(1000 * var(--max-scale) * 1px));
  margin-inline: auto;
  margin-top: min(calc(172 * var(--min-fluid-ratio)), calc(172 * var(--max-scale) * 1px));
  display: block grid;
  row-gap: min(calc(90 * var(--min-fluid-ratio)), calc(90 * var(--max-scale) * 1px));
}

.resultpage .result_title.failure1 + .result_actions {
  margin-top: min(calc(70 * var(--min-fluid-ratio)), calc(70 * var(--max-scale) * 1px));
}

.resultpage .result_title.success + .result_actions {
  margin-top: min(calc(82 * var(--min-fluid-ratio)), calc(82 * var(--max-scale) * 1px));
}

.resultpage .btn {
  color: #fff;
  background-color: #1746ff;
  text-align: center;
  text-decoration: none;
  font-weight: var(--fw-bold);
  padding-top: min(calc(30 * var(--min-fluid-ratio)), calc(30 * var(--max-scale) * 1px));
  padding-bottom: min(calc(38 * var(--min-fluid-ratio)), calc(38 * var(--max-scale) * 1px));
  letter-spacing: 0.1em;
}

.resultpage .btn-primary {
  background-color: #d4b567;
  color: #000000;
}

.resultpage .btn-secondary {
  background-color: #0091ff;
}

.result_actions {
  display: block grid;
  row-gap: 10px;
  margin-top: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}