/*
 * MASAYA POINT SERVICE: 共通スタイル
 * ロゴ (assets/logo-source.png) のテイストに合わせている:
 *   濃紺の地 / 黒に近い太い輪郭 / 金〜オレンジのグラデーション / 網点のテクスチャ
 */
:root {
  color-scheme: dark;
  --bg: #12294c;
  --bg-deep: #0b1c38;
  --panel: #1b3563;
  --panel-2: #162c53;
  --line: #0a0f19;        /* 輪郭と影 */
  --fg: #f6efdc;          /* クリーム */
  --muted: #9db1d2;

  --gold: #ffc61e;
  --gold-hi: #ffe07a;
  --orange: #ef8a1b;
  --orange-deep: #d4661a;
  --red: #d9481f;

  --ok: #5fd07a;
  --ng: #ff7a68;

  --radius: 16px;
  --lift: 4px;            /* 硬い影の落ち幅 */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  font-weight: 700;
  color: var(--fg);
  background-color: var(--bg-deep);
  /* ロゴと同じ網点。中心を少し明るくして奥行きを出す */
  background-image:
    radial-gradient(circle at 50% 32%, rgba(58, 106, 173, .45), transparent 62%),
    radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 100% 100%, 7px 7px;
  background-attachment: fixed, fixed;
  padding: max(14px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ ヘッダー */
.brand { text-align: center; margin-bottom: 16px; }
.brand .logo {
  display: block; width: min(230px, 64vw); height: auto; margin: 0 auto;
  border: 3px solid var(--line); border-radius: 14px;
  box-shadow: 0 var(--lift) 0 var(--line);
}
.brand h1 { font-size: 20px; margin: 12px 0 0; color: var(--gold); }

.brand-compact { display: flex; align-items: center; gap: 12px; text-align: left; }
.brand-compact .logo { width: 60px; margin: 0; box-shadow: 0 3px 0 var(--line); }
.brand-compact h1 { margin: 0; flex: 1; }


/* ------------------------------------------------------------------ カード */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 var(--lift) 0 var(--line);
  padding: 16px;
  margin-bottom: 18px;
}
.card h2 {
  font-size: 15px; font-weight: 800; margin: 0 0 12px; color: var(--gold);
  display: flex; align-items: center; gap: 8px; letter-spacing: .02em;
}
/* 見出しの前に金貨のしるし */
.card h2::before {
  content: ""; flex: 0 0 auto; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 45%, var(--orange-deep));
  border: 2px solid var(--line);
}

label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 5px; }
input, select {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 14px;
  border: 2.5px solid var(--line); border-radius: 12px;
  background: var(--bg-deep); color: var(--fg);
}
/* iOS の既定の見た目を消して、右端に矢印を描く */
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
                    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
select:disabled { opacity: .6; }
input::placeholder { color: #6f86ab; }
input:focus, select:focus { outline: 3px solid var(--gold); outline-offset: 1px; }

button {
  width: 100%; font: inherit; font-size: 17px; font-weight: 900; padding: 14px;
  color: #2a1602;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 40%, var(--orange) 100%);
  border: 3px solid var(--line); border-radius: 14px;
  box-shadow: 0 var(--lift) 0 var(--line);
  margin-top: 16px; -webkit-tap-highlight-color: transparent;
  letter-spacing: .03em;
}
button.secondary { background: var(--panel); color: var(--fg); }
button:active { transform: translateY(var(--lift)); box-shadow: none; }
button:disabled { opacity: .5; transform: none; box-shadow: 0 var(--lift) 0 var(--line); }
.row { display: flex; gap: 10px; }
.row button { flex: 1; }

.status { font-size: 14px; font-weight: 700; margin-top: 12px; min-height: 1.4em; }
.status.ok { color: var(--ok); }
.status.ng { color: var(--ng); }
.muted { color: var(--muted); font-size: 13px; font-weight: 600; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ メンバー切り替え */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 16px; }
.chips button {
  width: auto; flex: 0 0 auto; margin: 0; padding: 9px 18px; font-size: 16px;
  background: var(--panel); color: var(--fg); border-radius: 999px;
}
.chips button[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 40%, var(--orange));
  color: #2a1602;
}

/* ------------------------------------------------------------------ 残高 */
.balance { text-align: center; padding: 20px 16px; }
.balance .who { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.balance .points { margin: 0; line-height: 1; }
.balance strong {
  font-size: 62px; font-weight: 900; font-variant-numeric: tabular-nums;
  /* ロゴの文字と同じ金のグラデーション + 黒縁 */
  background: linear-gradient(180deg, var(--gold-hi) 10%, var(--gold) 45%, var(--orange-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 3px var(--line); paint-order: stroke fill;
  filter: drop-shadow(2px 3px 0 var(--red));
}
.balance .unit { font-size: 20px; font-weight: 900; color: var(--gold); margin-left: 8px; }

/* ------------------------------------------------------------------ 履歴 */
.history { list-style: none; padding: 0; margin: 0; }
.history li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 11px 0; border-bottom: 2px dotted rgba(157, 177, 210, .35);
}
.history li:last-child { border-bottom: 0; }
.history .reason { font-size: 15px; font-weight: 700; }
.history .at { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-top: 2px; }
.history .delta { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history .delta.plus { color: var(--gold); }
.history .delta.minus { color: var(--ng); }

/* ------------------------------------------------------------------ ポイント取得 (get.html) */
.badgeart { position: relative; container-type: inline-size; margin: 0 0 18px; }
.badgeart img {
  display: block; width: 100%; height: auto;
  border: 3px solid var(--line); border-radius: 14px;
  box-shadow: 0 var(--lift) 0 var(--line);
}
/* もらえる点数と「もらう」ボタンのカード。絵の上には重ねず、絵の下に置く。 */
.amount .chips { justify-content: center; margin-top: 16px; }
.amount .note { margin: 12px 0 0; line-height: 1.6; }

/* 使用済みのスタンプ */
.badgeart .stamp {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-11deg);
  font-size: 9cqw; font-weight: 900; color: #fff; white-space: nowrap;
  background: rgba(217, 72, 31, .93);
  border: 0.8cqw solid var(--line); border-radius: 2.5cqw; padding: 1.4cqw 4cqw;
  box-shadow: 0 0.6cqw 0 var(--line);
}

.got { margin: 0; font-size: 26px; font-weight: 900; text-align: center; color: var(--gold); }
