@charset "UTF-8";

/* =========================================================
   お店の共通 QR コードの「利用方法の選択」画面 (/q/<公開ID>)
   public/q/landing/index.html ・ public/q/error/index.html

   - スマートフォンを先に考える。文字は大きめ (本文 18px)、ボタンは指で押しやすい高さ (64px 以上)
   - 色は注文番のアイコンの 2 色: オレンジ (アプリ) と 青 (LINE・注文ページ)
   - 白い文字を載せるボタンの色は、白との差が 4.5:1 以上の濃さにする
   - ダークモードでも読める (背景と文字の役割の色を切り替える)
   - iPhone の画面の端 (ノッチ・ホームバー) に文字やボタンがかからないよう safe area の内側に置く
   ========================================================= */

:root {
  --q-page-bg: #fff8ec;
  --q-surface: #ffffff;
  --q-text: #33302c;
  --q-text-strong: #221f1b;
  --q-text-muted: #5f5850;
  --q-border: #eadfce;
  --q-app: #c2410c; /* 白と 5.2:1 */
  --q-app-dark: #9a3412;
  --q-app-soft: #fff1e6;
  --q-line: #1765cf; /* 白と 5.6:1 */
  --q-line-dark: #114fa6;
  --q-line-soft: #eaf1fc;
  --q-notice: #7a4300;
  --q-notice-soft: #fff4e0;
  --q-notice-border: #e08a00;
  --q-focus: #0b57c9;
  --q-icon-line-bg: #1765cf;
  --q-icon-line-fg: #ffffff;
  --q-radius: 16px;
  --q-font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", "Meiryo",
    system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --q-page-bg: #1c1814;
    --q-surface: #2a241e;
    --q-text: #ece5dc;
    --q-text-strong: #fbf6ef;
    --q-text-muted: #c8bfb4;
    --q-border: #463c32;
    --q-app-soft: #3a2a1f;
    --q-line-soft: #1e2a3d;
    --q-notice: #ffd8a0;
    --q-notice-soft: #3a2c16;
    --q-focus: #8ab4ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--q-page-bg);
  color: var(--q-text);
  font-family: var(--q-font);
  font-size: 18px;
  line-height: 1.7;
}

.q {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}

a {
  color: var(--q-line);
}

@media (prefers-color-scheme: dark) {
  a {
    color: #9cc2ff;
  }
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--q-focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- 上部: 注文番のロゴとお店 --- */

.q-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--q-text-muted);
  padding: 4px 0 8px;
}

.q-brand img {
  border-radius: 6px;
}

.q-store {
  text-align: center;
  padding: 8px 0 16px;
}

.q-store-name {
  margin: 0;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--q-text-strong);
  overflow-wrap: anywhere;
  /* 長い店名は行の長さをそろえ、対応するブラウザでは語の途中で折り返さない */
  text-wrap: balance;
  word-break: auto-phrase;
}

.q-lead {
  margin: 6px 0 0;
  font-size: 18px;
  color: var(--q-text);
}

.q-notice {
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--q-notice-border);
  border-radius: 10px;
  background: var(--q-notice-soft);
  color: var(--q-notice);
  font-size: 16px;
  text-align: left;
}

/* --- 選択肢のカード --- */

.q-card {
  background: var(--q-surface);
  border: 1px solid var(--q-border);
  border-radius: var(--q-radius);
  padding: 18px 18px 16px;
  margin: 0 0 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* 色付きの枠は上・左・右・下の 4 辺とも同じ太さ (6px)。
   枠が太くなった分だけ左右・下の padding を減らし、中の文字・ボタンの位置は 1px 枠のときと変えない
   (上は元から 6px の枠なので padding はそのまま)。 */
.q-card-app,
.q-card-line {
  border-width: 6px;
  padding: 18px 13px 11px;
}

.q-card-app {
  border-color: var(--q-app);
}

.q-card-line {
  border-color: var(--q-line);
}

.q-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.q-card-icon {
  flex: none;
  border-radius: 14px;
}

.q-icon-line-bg {
  fill: var(--q-icon-line-bg);
}

.q-icon-line-fg {
  fill: var(--q-icon-line-fg);
}

.q-card-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 800;
  color: var(--q-text-strong);
}

.q-card-text {
  margin: 10px 0 14px;
}

/* --- 大きなボタン --- */

.q-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 68px;
  padding: 12px 44px 12px 16px;
  border-radius: 14px;
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.06s ease, background-color 0.12s ease;
}

.q-button::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.q-button:active {
  transform: scale(0.985);
}

.q-button[hidden] {
  display: none;
}

.q-button-app {
  background: var(--q-app);
}

.q-button-app:hover {
  background: var(--q-app-dark);
}

.q-button-line {
  background: var(--q-line);
}

.q-button-line:hover {
  background: var(--q-line-dark);
}

.q-button-label {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
}

.q-button-sub {
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.95;
}

/* 押したあと、別のアプリへ移るまでの間 */
.q-button.is-busy {
  pointer-events: none;
}

.q-button.is-busy::after {
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  right: 14px;
  transform: translateY(-50%);
  animation: q-spin 0.8s linear infinite;
}

@keyframes q-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .q-button,
  .q-button.is-busy::after {
    transition: none;
    animation: none;
  }
}

/* --- 補足 --- */

.q-note {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--q-text-muted);
}

.q-return {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--q-app-soft);
  color: var(--q-text-strong);
  font-size: 16px;
}

.q-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: 16px;
}

.q-store-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* 端末の種類で出し分ける文 (body の data-platform は Worker が入れ、iPadOS だけ画面の JS が直す) */
.q-only-ios,
.q-only-android,
.q-only-other {
  display: none;
}

body[data-platform="ios"] .q-only-ios,
body[data-platform="android"] .q-only-android,
body[data-platform="other"] .q-only-other {
  display: block;
}

/* ストアへのリンクは、その端末のものだけ (パソコンは両方) */
body[data-platform="ios"] #app-store-android,
body[data-platform="android"] #app-store-ios {
  display: none;
}

.q-help {
  margin-top: 12px;
  font-size: 16px;
}

.q-help summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--q-text-muted);
  list-style: none;
}

.q-help summary::-webkit-details-marker {
  display: none;
}

.q-help summary::before {
  content: "▸";
  width: 1em;
  text-align: center;
}

.q-help[open] summary::before {
  content: "▾";
}

.q-help p {
  margin: 6px 0 0;
}

.q-error {
  text-align: center;
}

.q-error .q-button {
  margin-top: 12px;
}

/* --- 下部 --- */

.q-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--q-text-muted);
}

.q-footer p {
  margin: 0 0 6px;
}

.q-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}

.q-footer a {
  color: inherit;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
