:root {
  color-scheme: dark;
  --bg: #0c101a;
  --bg-deep: #070a12;
  --surface: rgba(24, 31, 46, 0.72);
  --surface-strong: rgba(30, 38, 56, 0.85);
  --glass-border: rgba(255, 255, 255, 0.09);
  --ink: #f2ede2;
  --muted: #9aa3b5;
  --line: rgba(255, 255, 255, 0.1);
  --gold: #f3cf7a;
  --gold-deep: #d99a3d;
  --green: #57c99b;
  --green-soft: rgba(87, 201, 155, 0.16);
  --red: #e07856;
  --red-soft: rgba(224, 120, 86, 0.16);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: 0.01em;
}

body {
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---- 星空シェル ---- */

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(64, 84, 140, 0.4), transparent 60%),
    radial-gradient(800px 500px at 0% 30%, rgba(46, 84, 90, 0.28), transparent 60%),
    linear-gradient(180deg, #101627 0%, #0c101a 46%, #0a0d15 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 420px 420px;
  z-index: 0;
}

.app-shell::before {
  background-image:
    radial-gradient(1.4px 1.4px at 24px 60px, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(1px 1px at 120px 180px, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(1.6px 1.6px at 220px 40px, rgba(243, 207, 122, 0.85), transparent 55%),
    radial-gradient(1px 1px at 330px 130px, rgba(255, 255, 255, 0.6), transparent 55%),
    radial-gradient(1.2px 1.2px at 60px 300px, rgba(255, 255, 255, 0.75), transparent 55%),
    radial-gradient(1px 1px at 280px 280px, rgba(160, 200, 255, 0.7), transparent 55%),
    radial-gradient(1.4px 1.4px at 380px 360px, rgba(255, 255, 255, 0.8), transparent 55%);
  animation: twinkle 5.5s ease-in-out infinite;
}

.app-shell::after {
  background-image:
    radial-gradient(1px 1px at 80px 110px, rgba(255, 255, 255, 0.55), transparent 55%),
    radial-gradient(1.3px 1.3px at 180px 240px, rgba(243, 207, 122, 0.6), transparent 55%),
    radial-gradient(1px 1px at 300px 80px, rgba(255, 255, 255, 0.5), transparent 55%),
    radial-gradient(1.2px 1.2px at 400px 200px, rgba(160, 200, 255, 0.55), transparent 55%),
    radial-gradient(1px 1px at 140px 380px, rgba(255, 255, 255, 0.5), transparent 55%);
  animation: twinkle 7s ease-in-out 1.6s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.3; }
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: screen-in 0.35s ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-mark {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.12em;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid var(--glass-border);
  font-size: 19px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.icon-button:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.12);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.16;
  font-weight: 800;
  background: linear-gradient(120deg, #fdf6e4 20%, var(--gold) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 23px;
  line-height: 1.25;
}

h3 {
  font-size: 16px;
}

.counter {
  font-size: 14px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.lead {
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}

.optional {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: 2px;
}

/* ---- ランクカード ---- */

.rank-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(243, 207, 122, 0.14), rgba(87, 201, 155, 0.08)),
    var(--surface);
  border: 1px solid rgba(243, 207, 122, 0.28);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rank-icon {
  font-size: 34px;
  text-align: center;
  filter: drop-shadow(0 0 10px rgba(243, 207, 122, 0.5));
}

.rank-label {
  font-weight: 800;
  font-size: 16px;
  color: var(--gold);
}

.rank-stars {
  font-weight: 800;
  font-size: 14px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.rank-next {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
}

/* ---- サポーター ---- */

.supporter {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.supporter.compact {
  grid-template-columns: 64px 1fr;
  padding: 12px;
  box-shadow: none;
}

.supporter.mood-cheer .avatar {
  box-shadow: 0 0 0 2px rgba(243, 207, 122, 0.55), 0 0 22px rgba(243, 207, 122, 0.3);
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
}

/* 4ポーズのキャラシートを切り替えて動かす */
.avatar.sprite {
  background-repeat: no-repeat;
  background-size: 200% 200%;
  background-position: 0% 0%;
}

.supporter-sakuya .avatar.sprite {
  background-image: url("./assets/characters/sakuya-sprites.png");
}

.supporter-gokou .avatar.sprite {
  background-image: url("./assets/characters/gokou-sprites.png");
}

.mood-idle .avatar {
  animation: avatar-bob 3.4s ease-in-out infinite;
}

.mood-idle .avatar.sprite {
  animation: avatar-bob 3.4s ease-in-out infinite, sprite-idle 9s steps(1, end) infinite;
}

.mood-cheer .avatar {
  animation: avatar-bounce 1.1s ease-in-out infinite;
}

.mood-cheer .avatar.sprite {
  animation: avatar-bounce 1.1s ease-in-out infinite, sprite-cheer 2.2s steps(1, end) infinite;
}

@keyframes avatar-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes avatar-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-4px) scale(1.04); }
}

@keyframes sprite-idle {
  0% { background-position: 0% 0%; }
  80% { background-position: 100% 100%; }
  92% { background-position: 0% 0%; }
  100% { background-position: 0% 0%; }
}

@keyframes sprite-cheer {
  0% { background-position: 0% 100%; }
  25% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
  75% { background-position: 100% 0%; }
  100% { background-position: 0% 100%; }
}

.compact .avatar {
  width: 64px;
  height: 64px;
}

.supporter-name {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.supporter-line {
  line-height: 1.65;
  font-weight: 700;
  font-size: 14px;
}

/* ---- ボタン ---- */

.actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.actions-inline {
  display: grid;
  gap: 10px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.button-row .button {
  font-size: 13.5px;
  padding: 12px 8px;
  white-space: nowrap;
}

.button {
  min-height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-weight: 800;
  color: var(--ink);
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:active {
  transform: scale(0.97);
}

.button.primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #241a08;
  box-shadow: 0 8px 26px rgba(217, 154, 61, 0.35);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.button.warn {
  background: var(--red-soft);
  color: #f0a68c;
  border-color: rgba(224, 120, 86, 0.35);
}

.button.gold {
  background: rgba(243, 207, 122, 0.12);
  color: var(--gold);
  border-color: rgba(243, 207, 122, 0.35);
}

.button:disabled {
  opacity: 0.4;
  box-shadow: none;
}

/* ---- 選択肢 ---- */

.option-list {
  display: grid;
  gap: 10px;
}

.option {
  min-height: 56px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.option:active {
  transform: scale(0.98);
}

.option.selected {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 18px rgba(87, 201, 155, 0.15);
}

.option-icon {
  font-size: 18px;
  flex: 0 0 auto;
}

.radio-dot,
.check-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex: 0 0 auto;
  transition: border-color 0.2s ease;
}

.selected .radio-dot,
.selected .check-dot {
  border-color: var(--green);
  background: radial-gradient(circle at center, var(--green) 0 45%, transparent 46%);
}

/* ---- セグメント ---- */

.segment-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}

.segment {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  transition: all 0.2s ease;
}

.segment.selected {
  border-color: var(--gold);
  background: rgba(243, 207, 122, 0.14);
  color: var(--gold);
}

.hunger-hint {
  padding-top: 2px;
}

.chew-speed .segment {
  display: grid;
  gap: 1px;
  line-height: 1.3;
  min-height: 48px;
}

.chew-speed .segment small {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.75;
}

.strategy-review {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.strategy-review:last-of-type {
  border-bottom: 0;
}

.strategy-review-label {
  font-weight: 800;
  font-size: 14px;
}

/* ---- タイマーリング ---- */

.ring-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 6px 0;
}

.ring {
  width: min(72vw, 270px);
  height: auto;
  display: block;
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 14;
}

.ring-fill {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 10px rgba(243, 207, 122, 0.45));
}

.ring-wrap.is-achieved .ring-fill {
  filter: drop-shadow(0 0 18px rgba(87, 201, 155, 0.75));
}

.ring-wrap.is-paused .ring-fill {
  filter: grayscale(0.6) opacity(0.6);
}

.ring-wrap.is-paused .ring-center {
  opacity: 0.55;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 4px;
}

.time-main {
  font-variant-numeric: tabular-nums;
  font-size: 52px;
  font-weight: 850;
  line-height: 1;
  text-shadow: 0 0 24px rgba(243, 207, 122, 0.25);
}

.time-sub {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
}

/* ---- 満腹感メーター ---- */

.satiety {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--glass-border);
}

.satiety-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
}

.satiety-note {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.satiety-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.satiety-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c9df0, #b28df5);
  transition: width 1s linear;
  box-shadow: 0 0 10px rgba(140, 150, 245, 0.55);
}

/* ---- ピル ---- */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--muted);
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(87, 201, 155, 0.3);
}

.pill.mini {
  padding: 3px 8px;
  font-size: 10px;
}

/* ---- 咀嚼ペーサー ---- */

.chew-panel {
  display: grid;
  gap: 8px;
}

.chew-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.chew-panel.chewing {
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(243, 207, 122, 0.08);
  border: 1px solid rgba(243, 207, 122, 0.3);
}

.chew-circle {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-content: center;
  text-align: center;
  background: radial-gradient(circle at 30% 25%, rgba(243, 207, 122, 0.35), rgba(243, 207, 122, 0.08));
  border: 2px solid rgba(243, 207, 122, 0.55);
  font-weight: 850;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  animation: chew-pulse 1s ease-in-out infinite;
  box-shadow: 0 0 22px rgba(243, 207, 122, 0.3);
}

.chew-circle small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

@keyframes chew-pulse {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.12); }
}

.chew-side {
  display: grid;
  gap: 8px;
}

.chew-label {
  font-weight: 800;
  font-size: 14px;
}

.chew-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.chew-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--green));
  border-radius: 999px;
  transition: width 0.9s linear;
}

.chew-cancel {
  justify-self: start;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  padding: 4px 0;
}

/* ---- パネル・フォーム ---- */

.panel {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.field {
  display: grid;
  gap: 8px;
}

.label {
  font-weight: 800;
  font-size: 14px;
}

textarea,
select,
input[type="datetime-local"] {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  padding: 12px;
  min-height: 48px;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

select option {
  background: #1a2233;
  color: var(--ink);
}

/* ---- 統計 ---- */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  min-height: 84px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--surface);
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat-value {
  font-size: 27px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

.stat-unit {
  font-size: 13px;
  color: var(--muted);
  margin-left: 3px;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* ---- 週間チャート ---- */

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.chart-legend {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  height: 130px;
  padding-top: 6px;
}

.chart::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(20px + var(--target-line, 60%) * 1);
  border-top: 1px dashed rgba(243, 207, 122, 0.5);
  transform: translateY(0.5px);
  pointer-events: none;
}

.chart-col {
  display: grid;
  grid-template-rows: 1fr 20px;
  gap: 4px;
}

.chart-bar-area {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: 70%;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, rgba(154, 163, 181, 0.7), rgba(154, 163, 181, 0.25));
  position: relative;
  animation: bar-grow 0.6s ease both;
}

.chart-bar.hit {
  background: linear-gradient(180deg, var(--gold), rgba(217, 154, 61, 0.4));
  box-shadow: 0 0 14px rgba(243, 207, 122, 0.35);
}

@keyframes bar-grow {
  from { transform: scaleY(0); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

.chart-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chart-day {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  align-self: center;
}

.chart-day.today {
  color: var(--gold);
}

/* ---- 記録 ---- */

.record-list {
  display: grid;
  gap: 10px;
}

.record {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.record-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  font-size: 13px;
}

.record-stars {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: -1px;
}

.record-meta {
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px;
  z-index: 20;
}

.modal {
  width: min(100%, 448px);
  background: #171e2e;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 18px;
  display: grid;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: screen-in 0.28s ease both;
}

.empty {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}

/* ---- 設定 ---- */

.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.switch {
  width: 58px;
  height: 34px;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: flex-start;
  flex: 0 0 auto;
  transition: background 0.2s ease;
}

.switch.on {
  background: var(--green);
  justify-content: flex-end;
}

.switch-knob {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
}

.setting-character {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.setting-character img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center 20%;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---- 呼吸ガイド ---- */

.breath-panel {
  text-align: center;
}

.breath-stage {
  display: grid;
  place-items: center;
  padding: 12px 0;
}

.breath-circle {
  width: 130px;
  height: 130px;
  border-radius: 999px;
  display: grid;
  place-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.7;
  background: radial-gradient(circle at 32% 28%, rgba(124, 157, 240, 0.4), rgba(124, 157, 240, 0.08));
  border: 2px solid rgba(124, 157, 240, 0.5);
  box-shadow: 0 0 30px rgba(124, 157, 240, 0.3);
  animation: breathe 14s ease-in-out infinite;
}

@keyframes breathe {
  0% { transform: scale(0.82); }
  29% { transform: scale(1.12); }  /* 吸う 4s */
  57% { transform: scale(1.12); }  /* 止める 4s */
  100% { transform: scale(0.82); } /* 吐く 6s */
}

/* ---- トースト・スターバースト ---- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  background: rgba(23, 30, 46, 0.95);
  border: 1px solid rgba(243, 207, 122, 0.4);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 40;
  max-width: min(88vw, 420px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.star-burst {
  position: fixed;
  left: 50%;
  top: 42%;
  z-index: 30;
  pointer-events: none;
}

.star-burst span {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  animation: burst 1.25s cubic-bezier(0.12, 0.72, 0.36, 1) both;
  text-shadow: 0 0 12px rgba(243, 207, 122, 0.8);
}

@keyframes burst {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.15); opacity: 0; }
}

/* ---- レスポンシブ ---- */

@media (max-width: 360px) {
  .screen {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: 29px;
  }

  .time-main {
    font-size: 44px;
  }

  .supporter {
    grid-template-columns: 78px 1fr;
  }

  .avatar {
    width: 78px;
    height: 78px;
  }

  .supporter.compact {
    grid-template-columns: 58px 1fr;
  }

  .compact .avatar {
    width: 58px;
    height: 58px;
  }

  .chew-panel.chewing {
    grid-template-columns: 74px 1fr;
  }

  .chew-circle {
    width: 74px;
    height: 74px;
    font-size: 22px;
  }
}
