:root {
  --bg: #fff7e8;
  --panel: #ffffff;
  --ink: #43323a;
  --muted: #8c7b84;
  --accent: #ff6f91;
  --accent-2: #35c4b5;
  --font-display: 'Hiragino Maru Gothic ProN', 'Yu Gothic', 'Noto Sans JP', sans-serif;
  --ui-font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --line: color-mix(in srgb, var(--ink) 10%, transparent);
  --line-soft: color-mix(in srgb, var(--ink) 6%, transparent);
  --paper: #fffdf7;
  --shadow: 0 20px 50px rgba(255, 111, 145, 0.12);
  --shadow-soft: 0 10px 24px rgba(255, 111, 145, 0.1);
  --season: #ff8fab;
  --season-soft: color-mix(in srgb, var(--season) 14%, transparent);
  --gold: #ffb703;
  --ok: var(--accent-2);
  --pop-yellow: #ffd166;
  --pop-sky: #74c0fc;
  --pop-lav: #b197fc;
  --pop-peach: #ffa94d;
  --pop-mint: #8ce5d8;
  --pop-pink: #ffc2d1;
}

html[data-theme="night"] {
  --bg: #241f3a;
  --panel: #2f2947;
  --ink: #fff7e8;
  --muted: #c9bfe0;
  --line: rgba(255, 247, 232, 0.16);
  --line-soft: rgba(255, 247, 232, 0.08);
  --paper: #2a2440;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
  --season-soft: color-mix(in srgb, var(--season) 22%, transparent);
  --gold: #ffd166;
}

html[data-theme="night"] body {
  background:
    radial-gradient(circle at 50% -12%, color-mix(in srgb, var(--season) 18%, transparent), transparent 42%),
    radial-gradient(circle at 12% 14%, rgba(177, 151, 252, 0.14), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(53, 196, 181, 0.12), transparent 30%),
    linear-gradient(180deg, var(--bg), #1b1730);
}

html[data-theme="night"] .icon-btn,
html[data-theme="night"] .streak {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
}

body[data-season="spring"] { --season: #c96f86; }
body[data-season="summer"] { --season: #2e8b74; }
body[data-season="autumn"] { --season: #b5533c; }
body[data-season="winter"] { --season: #567c8d; }

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, #ffe3ec, transparent 42%),
    radial-gradient(circle at 8% 18%, #e3fbf7, transparent 30%),
    radial-gradient(circle at 94% 10%, #fff3c4, transparent 28%),
    radial-gradient(circle at 88% 78%, #f1eaff, transparent 30%),
    linear-gradient(180deg, #fffaf0, #fff1e2);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
  isolation: isolate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(#ffc2d1 1.6px, transparent 1.7px),
    radial-gradient(#b9f0e8 1.2px, transparent 1.3px);
  background-position: 0 0, 14px 14px;
  background-size: 34px 34px, 34px 34px;
  opacity: 0.42;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

button {
  font: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

.app {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 22px 46px;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: #fff;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent);
  font-size: 22px;
  line-height: 1;
  transform: rotate(-3deg);
}

.brand-text {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.streak {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  font-family: var(--ui-font);
  font-size: 11px;
  color: var(--muted);
  backdrop-filter: blur(10px);
}

.streak-flame {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
}

.streak strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.icon-btn[aria-pressed="false"] .icon-sound {
  opacity: 0.38;
  text-decoration: line-through;
}

.icon-btn-wide {
  padding: 0 12px;
}

.collection-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-2);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 26px 0 20px;
  text-align: center;
}

.enso {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(360px, 62vw);
  aspect-ratio: 1;
  transform: translate(-50%, -52%) rotate(-6deg);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.55;
}

.enso::before,
.enso::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.enso::before {
  background: conic-gradient(from 210deg, transparent 0 17%, var(--season) 40%, color-mix(in srgb, var(--season) 40%, transparent) 54%, transparent 72%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  opacity: 0.42;
}

.enso::after {
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--season) 26%, transparent);
  opacity: 0.5;
}

.kicker {
  position: relative;
  margin: 0 0 10px;
  color: var(--season);
  font-family: var(--ui-font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  position: relative;
  margin-bottom: 12px;
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0.04em;
  text-wrap: balance;
}

.subtitle {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.75;
  text-wrap: balance;
}

.daily-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.daily-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--season) 34%, transparent);
  border-radius: 999px;
  color: var(--season);
  background: color-mix(in srgb, var(--season) 9%, transparent);
  font-family: var(--ui-font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.daily-date {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.link-btn {
  padding: 2px 4px;
  border: 0;
  color: var(--accent-2);
  background: none;
  font-family: var(--ui-font);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.season-note {
  position: relative;
  margin: 10px 0 0;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  font-size: 13px;
  letter-spacing: 0.14em;
}

/* ---------- hud ---------- */

.hud {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 6px auto 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.progress-ring {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track,
.ring-fill {
  fill: none;
  stroke-width: 3.4;
}

.ring-track {
  stroke: color-mix(in srgb, var(--ink) 9%, transparent);
}

.ring-fill {
  stroke: var(--accent-2);
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transition: stroke-dashoffset 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: var(--ui-font);
}

.ring-label strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ring-label span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hud-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.hud-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 2px 8px;
  border-left: 1px solid var(--line-soft);
}

.hud-item:first-child {
  border-left: 0;
}

.hud-label {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hud-item strong {
  overflow: hidden;
  font-size: clamp(17px, 2.6vw, 23px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- hint ---------- */

.hint-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--season) 30%, transparent);
  border-left: 4px solid var(--season);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--season) 10%, var(--panel)), var(--panel));
  box-shadow: var(--shadow-soft);
  animation: hint-in 260ms ease both;
}

.hint-box[hidden] {
  display: none;
}

.hint-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--season);
  font-size: 15px;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--season) 30%, transparent);
}

.hint-body {
  min-width: 0;
  flex: 1;
}

.hint-title {
  margin: 0 0 3px;
  color: var(--season);
  font-family: var(--ui-font);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hint-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.hint-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.hint-close:hover {
  background: var(--line-soft);
}

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

/* ---------- panels ---------- */

.game {
  display: grid;
  gap: 18px;
}

.panel {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, #fff 2%), var(--paper));
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius-lg) - 10px);
  pointer-events: none;
}

.panel-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-family: var(--ui-font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.panel h2 {
  margin: 0;
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.instructions,
.legend {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  line-height: 1.65;
  text-align: right;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-box {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1.5px dashed var(--muted);
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
}

/* ---------- pool ---------- */

.pool {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 74px;
  padding: 2px;
}

.pool-tip {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.tile {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: clamp(56px, 7vw, 68px);
  height: clamp(56px, 7vw, 68px);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 15px;
  color: var(--ink);
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--panel) 98%, #fff), color-mix(in srgb, var(--panel) 84%, var(--bg)));
  box-shadow:
    0 5px 0 color-mix(in srgb, var(--ink) 7%, transparent),
    0 12px 24px rgba(58, 40, 22, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-family: var(--font-display);
  font-size: clamp(27px, 4vw, 34px);
  line-height: 1;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  animation: tile-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid color-mix(in srgb, var(--ink) 5%, transparent);
  border-radius: 10px;
  pointer-events: none;
}

.tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  box-shadow:
    0 8px 0 color-mix(in srgb, var(--ink) 7%, transparent),
    0 18px 30px rgba(58, 40, 22, 0.14);
}

.tile:active,
.tile.dragging {
  cursor: grabbing;
  transform: scale(0.95);
  opacity: 0.26;
}

.tile.selected {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent),
    0 8px 0 color-mix(in srgb, var(--ink) 6%, transparent),
    0 18px 32px color-mix(in srgb, var(--accent) 20%, transparent);
}

.tile.selected::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 20px;
  animation: select-ring 1.6s ease-in-out infinite;
}

.tile-ghost {
  position: fixed;
  z-index: 1000;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 15px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 22px 44px rgba(58, 40, 22, 0.28);
  font-family: var(--font-display);
  font-size: clamp(27px, 4vw, 34px);
  pointer-events: none;
  will-change: transform;
}

.pool-empty,
.error {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 13px;
}

@keyframes tile-in {
  from { opacity: 0; transform: translateY(8px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes select-ring {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

/* ---------- targets ---------- */

.targets {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.idiom-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 18px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 82%, transparent), color-mix(in srgb, var(--bg) 34%, var(--panel)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: border-color 300ms ease, background 300ms ease, transform 300ms ease, box-shadow 300ms ease;
}

.idiom-card.is-complete {
  border-color: color-mix(in srgb, var(--accent-2) 45%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 9%, var(--panel)), color-mix(in srgb, var(--accent-2) 4%, var(--panel)));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent-2) 14%, transparent),
    0 14px 34px color-mix(in srgb, var(--accent-2) 12%, transparent);
}

.idiom-index {
  position: absolute;
  top: 9px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border: 1px solid color-mix(in srgb, var(--muted) 34%, transparent);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.8;
}

.stamp {
  position: absolute;
  top: 8px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid color-mix(in srgb, var(--accent-2) 55%, transparent);
  border-radius: 50%;
  color: var(--accent-2);
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.4) rotate(-16deg);
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.idiom-card.is-complete .stamp {
  opacity: 0.9;
  transform: scale(1) rotate(-10deg);
}

.idiom-cells {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 10px);
  margin-top: 6px;
}

.cell {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(48px, 6vw, 62px);
  height: clamp(48px, 6vw, 62px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  border-radius: 13px;
  font-family: var(--font-display);
  font-size: clamp(23px, 3.4vw, 31px);
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cell.locked {
  color: var(--ink);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, #fff), color-mix(in srgb, var(--panel) 88%, var(--bg)));
  box-shadow:
    inset 0 -3px 0 color-mix(in srgb, var(--ink) 5%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.cell.hole {
  border-style: dashed;
  border-width: 1.6px;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--bg) 74%, transparent) 0 6px, color-mix(in srgb, var(--panel) 60%, transparent) 6px 12px);
  cursor: pointer;
}

.cell.hole:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.cell.hole.awaiting {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: color-mix(in srgb, var(--accent) 62%, transparent);
  animation: hole-pulse 1.5s ease-in-out infinite;
}

.cell.hole.over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--panel));
  transform: scale(1.05);
}

.cell.hole.filled {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent-2) 42%, transparent);
  color: #fff;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent-2) 88%, #fff), var(--accent-2));
  box-shadow:
    0 5px 12px color-mix(in srgb, var(--accent-2) 26%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  animation: pop-in 260ms cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

.cell.hole.wrong {
  border-color: var(--accent);
  animation: shake 360ms ease both;
}

.idiom-meta {
  min-height: 19px;
  margin: 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: center;
}

.idiom-card.is-complete .idiom-meta {
  color: var(--accent-2);
  font-weight: 700;
}

@keyframes hole-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 18%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent); }
}

@keyframes pop-in {
  0% { transform: scale(0.72); opacity: 0; }
  65% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* ---------- actions ---------- */

.actions {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 20px auto 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  box-shadow: 0 16px 40px rgba(58, 40, 22, 0.12);
  backdrop-filter: blur(16px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--ui-font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease, opacity 130ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.btn-primary {
  color: #fff;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 84%, #fff), var(--accent));
  box-shadow:
    0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
}

.btn-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 12px;
}

.hint-dots {
  display: inline-flex;
  gap: 3px;
}

.hint-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 40%, transparent);
}

.hint-dots i.on {
  background: var(--season);
}

.footnote {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-align: center;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 1100;
  max-width: min(86vw, 440px);
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  box-shadow: 0 14px 36px rgba(20, 12, 6, 0.28);
  font-family: var(--ui-font);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  backdrop-filter: blur(10px);
  transition: opacity 200ms ease, transform 200ms ease;
}

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

/* ---------- petals ---------- */

.petals {
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -24px;
  width: 10px;
  height: 14px;
  border-radius: 60% 40% 55% 45%;
  background: linear-gradient(160deg, var(--season), color-mix(in srgb, var(--season) 45%, #fff));
  opacity: 0.85;
  animation: petal-fall var(--duration, 2.4s) linear forwards;
}

@keyframes petal-fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.9; }
  100% { transform: translate3d(var(--drift, 30px), 105vh, 0) rotate(540deg); opacity: 0; }
}

/* ---------- modals ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--ink) 42%, transparent);
  backdrop-filter: blur(8px);
  animation: fade-in 220ms ease both;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(94vh, 780px);
  overflow: auto;
  padding: 24px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 98%, #fff), var(--paper));
  box-shadow: 0 34px 90px rgba(30, 18, 8, 0.36);
  text-align: center;
  animation: modal-in 300ms cubic-bezier(0.2, 1.1, 0.4, 1) both;
}

.modal-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius-lg) - 10px);
  pointer-events: none;
}

.modal-card h2 {
  position: relative;
  margin-bottom: 8px;
  font-size: clamp(26px, 4.6vw, 36px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.modal-card h2:focus,
.modal-card h2:focus-visible {
  outline: none;
}

.modal-summary {
  position: relative;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
  line-height: 1.7;
}

.modal-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--panel);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.result-seal {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 27px;
  line-height: 1;
  transform: rotate(-8deg);
  animation: seal-in 520ms cubic-bezier(0.2, 1.5, 0.4, 1) both;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent);
}

.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 26px;
  line-height: 1;
}

.stars span {
  display: inline-block;
  opacity: 0.22;
  transform: scale(0.8);
}

.stars span.on {
  opacity: 1;
  animation: star-pop 420ms cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.result-list {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
  text-align: left;
}

.result-item {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg) 34%, var(--panel));
}

.result-word {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 5px;
  font-size: 21px;
  letter-spacing: 0.1em;
}

.result-reading {
  color: var(--accent-2);
  font-family: var(--ui-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.result-meaning {
  margin: 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  line-height: 1.7;
}

.share-box {
  position: relative;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg) 28%, var(--panel));
}

.share-label {
  margin: 0 0 7px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.share-text {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  white-space: pre-wrap;
}

/* ---------- collection ---------- */

.collection-card {
  width: min(720px, 100%);
  text-align: left;
}

.collection-card h2,
.collection-card .modal-summary {
  text-align: center;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.collection-item {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg) 30%, var(--panel));
}

.collection-word {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: 0.1em;
}

.collection-reading {
  color: var(--accent-2);
  font-family: var(--ui-font);
  font-size: 9px;
  font-weight: 700;
}

.collection-meaning {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 10px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collection-item.locked {
  border-style: dashed;
  opacity: 0.55;
}

.collection-item.locked .collection-word {
  color: var(--muted);
  letter-spacing: 0.3em;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes seal-in {
  from { opacity: 0; transform: scale(0.3) rotate(-40deg); }
  to { opacity: 1; transform: scale(1) rotate(-8deg); }
}

@keyframes star-pop {
  from { opacity: 0; transform: scale(0.4) rotate(-20deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

/* ---------- responsive ---------- */

@media (min-width: 900px) {
  .app {
    padding-top: 30px;
  }

  .targets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .idiom-card {
    min-height: 100%;
  }

  .panel-head {
    min-height: 56px;
  }

  .toast {
    bottom: max(28px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 620px) {
  .app {
    padding: 14px 14px 34px;
  }

  .brand-text {
    display: none;
  }

  .topbar {
    gap: 8px;
  }

  .streak {
    padding: 0 9px;
  }

  .icon-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 0 8px;
  }

  .hero {
    padding: 20px 0 16px;
  }

  .subtitle {
    max-width: 30em;
  }

  .hud {
    gap: 12px;
    padding: 11px 12px;
  }

  .progress-ring {
    width: 62px;
    height: 62px;
  }

  .hud-item {
    padding: 1px 4px;
  }

  .panel {
    padding: 18px 14px;
    border-radius: 22px;
  }

  .panel-head {
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
  }

  .instructions,
  .legend {
    max-width: none;
    text-align: left;
  }

  .cell {
    width: clamp(44px, 13vw, 58px);
    height: clamp(44px, 13vw, 58px);
  }

  .actions {
    gap: 6px;
    padding: 7px;
  }

  .btn {
    min-height: 43px;
    padding: 0 14px;
    font-size: 12px;
  }

  .modal-card {
    padding: 26px 18px 22px;
  }

  .result-seal {
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
    font-size: 24px;
  }

  .result-card {
    padding: 20px 16px 16px;
  }

  .result-card h2 {
    font-size: 26px;
  }

  .stars {
    min-height: 24px;
    margin-bottom: 6px;
    font-size: 22px;
  }

  .result-list {
    gap: 7px;
    margin: 12px 0 14px;
  }

  .result-item {
    padding: 10px 12px;
  }

  .result-word {
    font-size: 19px;
  }

  .result-meaning {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .share-box {
    padding: 10px;
  }

  .share-text {
    font-size: 11px;
    line-height: 1.55;
  }

  .modal-actions {
    margin-top: 14px;
  }

  .collection-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .streak-unit,
  .icon-btn-wide span:first-child {
    display: none;
  }

  .cell {
    width: 42px;
    height: 42px;
    font-size: 21px;
  }

  .idiom-cells {
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .petals {
    display: none;
  }
}

/* ===== POP THEME ===== */

/* 背景の飾り */
.deco {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  opacity: 0.75;
  font-size: 24px;
  line-height: 1;
  animation: deco-float 6s ease-in-out infinite;
}

.deco-star {
  top: 11%;
  left: 5%;
  color: var(--pop-yellow);
  text-shadow: 0 3px 0 rgba(255, 183, 3, 0.18);
}

.deco-flower {
  top: 30%;
  right: 4%;
  color: #ffb3c6;
  font-size: 30px;
  animation-delay: -2s;
}

.deco-dot {
  bottom: 17%;
  left: 7%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pop-mint);
  box-shadow: 0 4px 0 rgba(53, 196, 181, 0.22);
  animation-delay: -3s;
}

.deco-star-2 {
  top: 64%;
  right: 8%;
  color: var(--pop-lav);
  font-size: 16px;
  animation-delay: -4s;
}

@keyframes deco-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(12deg); }
}

/* マスコット */
.hero-art {
  position: absolute;
  top: -4px;
  right: 2px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.mascot {
  width: 96px;
  height: 104px;
  animation: mascot-bob 3.2s ease-in-out infinite;
}

.mascot svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 7px 0 rgba(255, 111, 145, 0.16));
}

.speech {
  position: relative;
  margin-bottom: 34px;
  padding: 9px 13px;
  border: 2px solid #ffd0dd;
  border-radius: 18px;
  color: #c2185b;
  background: #fff;
  box-shadow: 0 4px 0 #ffd0dd;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  transform: rotate(-3deg);
}

.speech::after {
  content: "";
  position: absolute;
  left: -8px;
  bottom: 9px;
  width: 13px;
  height: 13px;
  border-left: 2px solid #ffd0dd;
  border-bottom: 2px solid #ffd0dd;
  background: #fff;
  transform: rotate(45deg);
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

/* ヘッダー */
.seal {
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 14px;
  background: linear-gradient(160deg, #ff8fab, #ff6f91);
  box-shadow: 0 4px 0 #e85578, 0 8px 16px rgba(255, 111, 145, 0.24);
  font-size: 23px;
  transform: rotate(-6deg);
}

.brand-text {
  color: #c2185b;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.streak {
  border: 2px solid #ffe3ec;
  background: #fff;
  box-shadow: 0 3px 0 #ffe3ec;
  color: #c2185b;
  font-weight: 800;
}

.streak-flame {
  font-size: 14px;
}

.streak strong {
  color: #ff6f91;
  font-family: var(--ui-font);
  font-weight: 900;
}

.icon-btn {
  border: 2px solid #ffe3ec;
  background: #fff;
  box-shadow: 0 3px 0 #ffe3ec;
  font-size: 16px;
}

.icon-btn:hover {
  transform: translateY(-2px) rotate(-3deg);
}

.collection-count {
  background: #ff6f91;
  box-shadow: 0 2px 0 #e85578;
  font-weight: 800;
}

/* ヒーロー */
.hero {
  padding-top: 34px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 2px solid #ffe08a;
  border-radius: 999px;
  background: #fff3c4;
  box-shadow: 0 3px 0 #ffe08a;
  color: #8a5a00;
  font-family: var(--ui-font);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: none;
}

h1 {
  font-family: var(--ui-font);
  font-weight: 900;
  color: #43323a;
  letter-spacing: 0.02em;
  text-shadow: 0 3px 0 #fff, 0 6px 0 rgba(255, 111, 145, 0.13);
}

h1::after {
  content: "";
  display: block;
  width: 128px;
  height: 8px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd166, #ff8fab, #35c4b5);
  opacity: 0.75;
}

.subtitle {
  color: #7a5c68;
  font-family: var(--ui-font);
  font-weight: 600;
}

.daily-pill {
  border: 2px solid #ffe08a;
  background: #fff3c4;
  box-shadow: 0 3px 0 #ffe08a;
  color: #8a5a00;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.daily-date {
  color: #a08a94;
  font-weight: 700;
}

.link-btn {
  color: #1e6d63;
}

.season-note {
  color: #a08a94;
  font-weight: 600;
}

/* HUD */
.hud {
  border: 3px solid #fff0c2;
  background: #fffdf5;
  box-shadow: 0 6px 0 #fff0c2, 0 16px 30px rgba(255, 183, 3, 0.1);
}

.hud-stats {
  gap: 6px;
}

.hud-item {
  padding: 7px 9px;
  border-left: 0;
  border-radius: 14px;
}

.hud-item:nth-child(1) { background: #fff0f4; }
.hud-item:nth-child(2) { background: #ffe9ee; }
.hud-item:nth-child(3) { background: #e3fbf7; }
.hud-item:nth-child(4) { background: #fff3c4; }

.hud-label {
  color: #8c7b84;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hud-item strong {
  color: #43323a;
  font-family: var(--ui-font);
  font-weight: 900;
}

.ring-track {
  stroke: #ffe3ec;
}

.ring-fill {
  stroke: #ff6f91;
}

.ring-label strong {
  color: #ff6f91;
  font-family: var(--ui-font);
  font-weight: 900;
}

.ring-label span {
  color: #a08a94;
}

/* パネル */
.panel {
  border: 3px solid #ffe3ec;
  background: #fff;
  box-shadow: 0 8px 0 #ffe3ec, 0 20px 40px rgba(255, 111, 145, 0.1);
}

.panel::before {
  inset: 8px;
  border: 2px dashed #fff0f4;
  border-radius: calc(var(--radius-lg) - 10px);
}

.target-panel {
  border-color: #d9f8f1;
  box-shadow: 0 8px 0 #d9f8f1, 0 20px 40px rgba(53, 196, 181, 0.1);
}

.target-panel::before {
  border-color: #effcf9;
}

.panel-kicker {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e3fbf7;
  color: #1e6d63;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.target-panel .panel-kicker {
  background: #fff3c4;
  color: #8a5a00;
}

.panel h2 {
  font-family: var(--ui-font);
  font-weight: 900;
  color: #43323a;
}

.instructions,
.legend {
  color: #8c7b84;
  font-weight: 700;
}

.legend-box {
  border: 2px dashed #ffb3c6;
  border-radius: 10px;
  color: #ff6f91;
  background: #fff7fa;
}

/* ことばのブロック */
.tile {
  --tile-bg: #ffe0e9;
  --tile-border: #ffb3c6;
  --tile-shadow: #f48fb1;
  --tile-ink: #7a2e4a;
  --tilt: 0deg;
  border: 2px solid var(--tile-border);
  border-radius: 18px;
  color: var(--tile-ink);
  background: linear-gradient(180deg, #fff, var(--tile-bg));
  box-shadow: 0 5px 0 var(--tile-shadow), 0 12px 20px rgba(122, 46, 74, 0.12);
  font-family: var(--ui-font);
  font-weight: 900;
  transform: rotate(var(--tilt));
  animation: none;
}

.tile[data-tone="pink"] {
  --tile-bg: #ffe0e9;
  --tile-border: #ffb3c6;
  --tile-shadow: #f48fb1;
  --tile-ink: #7a2e4a;
}

.tile[data-tone="mint"] {
  --tile-bg: #dff9f4;
  --tile-border: #9be7db;
  --tile-shadow: #5bc9b8;
  --tile-ink: #1e6d63;
}

.tile[data-tone="yellow"] {
  --tile-bg: #fff3c4;
  --tile-border: #ffd166;
  --tile-shadow: #f2b705;
  --tile-ink: #7a5600;
}

.tile[data-tone="lav"] {
  --tile-bg: #ede7ff;
  --tile-border: #c9b8ff;
  --tile-shadow: #a78bfa;
  --tile-ink: #4c3a8a;
}

.tile[data-tone="sky"] {
  --tile-bg: #e3f2ff;
  --tile-border: #a5d8ff;
  --tile-shadow: #74c0fc;
  --tile-ink: #1e5a8a;
}

.tile:nth-child(4n + 1) { --tilt: -1.2deg; }
.tile:nth-child(4n + 2) { --tilt: 0.8deg; }
.tile:nth-child(4n + 3) { --tilt: -0.5deg; }
.tile:nth-child(4n + 4) { --tilt: 1.4deg; }

.tile::after {
  inset: 5px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 13px;
}

.tile:hover {
  transform: rotate(0deg) translateY(-5px) scale(1.05);
  border-color: var(--tile-border);
  box-shadow: 0 9px 0 var(--tile-shadow), 0 18px 28px rgba(122, 46, 74, 0.16);
}

.tile:active,
.tile.dragging {
  transform: rotate(0deg) scale(0.94);
  opacity: 0.28;
}

.tile.selected {
  border-color: #ff6f91;
  color: #ff6f91;
  transform: rotate(0deg) translateY(-4px) scale(1.06);
  box-shadow: 0 0 0 4px rgba(255, 111, 145, 0.18), 0 9px 0 var(--tile-shadow);
}

.tile.selected::before {
  border: 2px solid rgba(255, 111, 145, 0.4);
  border-radius: 22px;
}

.tile-ghost {
  border: 2px solid var(--tile-border, #ffb3c6);
  border-radius: 18px;
  color: var(--tile-ink, #7a2e4a);
  background: linear-gradient(180deg, #fff, var(--tile-bg, #ffe0e9));
  box-shadow: 0 8px 0 var(--tile-shadow, #f48fb1), 0 20px 32px rgba(122, 46, 74, 0.2);
  font-family: var(--ui-font);
  font-weight: 900;
}

@keyframes tile-pop-in {
  from { opacity: 0; transform: translateY(10px) scale(0.88) rotate(0deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(var(--tilt)); }
}

.pool-tip {
  color: #a08a94;
  font-weight: 700;
}

/* 四字熟語カード */
.idiom-card {
  border: 2px solid #ffe3ec;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 5px 0 #ffe3ec, 0 12px 24px rgba(255, 111, 145, 0.08);
  padding: 20px 12px 12px;
}

.idiom-card:nth-child(3n + 2) {
  border-color: #d9f8f1;
  box-shadow: 0 5px 0 #d9f8f1, 0 12px 24px rgba(53, 196, 181, 0.08);
}

.idiom-card:nth-child(3n + 3) {
  border-color: #fff0c2;
  box-shadow: 0 5px 0 #fff0c2, 0 12px 24px rgba(255, 183, 3, 0.08);
}

.idiom-card.is-complete {
  border-color: #9be7db;
  background: linear-gradient(180deg, #f0fffc, #e2fbf6);
  box-shadow: 0 5px 0 #9be7db, 0 14px 28px rgba(53, 196, 181, 0.16);
}

.idiom-index {
  border: 0;
  background: #ffe0e9;
  color: #c2185b;
  font-weight: 900;
  opacity: 1;
}

.idiom-card:nth-child(3n + 2) .idiom-index {
  background: #e3fbf7;
  color: #1e6d63;
}

.idiom-card:nth-child(3n + 3) .idiom-index {
  background: #fff3c4;
  color: #8a5a00;
}

.stamp {
  border: 2px solid #35c4b5;
  background: #fff;
  color: #35c4b5;
  font-weight: 900;
}

.idiom-meta {
  color: #a08a94;
  font-weight: 700;
}

.idiom-card.is-complete .idiom-meta {
  color: #1e6d63;
  background: #d9f8f1;
  padding: 2px 10px;
  border-radius: 999px;
}

.cell {
  border: 2px solid #ffe3ec;
  border-radius: 16px;
  font-family: var(--ui-font);
  font-weight: 900;
}

.cell.locked {
  color: #43323a;
  background: #fff;
  box-shadow: 0 3px 0 #ffe3ec, inset 0 1px 0 #fff;
}

.cell.hole {
  border: 2px dashed #ffb3c6;
  color: #ff8fab;
  background: #fff7fa;
  box-shadow: inset 0 -2px 0 #ffe3ec;
}

.cell.hole:nth-child(odd) {
  border-color: #ffb3c6;
  color: #ff8fab;
}

.cell.hole:nth-child(even) {
  border-color: #9be7db;
  color: #35c4b5;
}

.cell.hole:hover {
  border-color: #ff6f91;
  background: #fff0f4;
}

.cell.hole.over {
  border-color: #ff6f91;
  background: #ffe0e9;
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 0 0 5px rgba(255, 111, 145, 0.16);
}

.cell.hole.filled {
  border: 2px solid #2bb3a5;
  color: #fff;
  background: linear-gradient(160deg, #7ee0d2, #35c4b5);
  box-shadow: 0 4px 0 #2bb3a5, 0 8px 16px rgba(53, 196, 181, 0.24);
}

.cell.hole.wrong {
  border-color: #ff6f91;
  background: #ffe0e9;
}

/* ボタン */
.actions {
  border: 2px solid #ffe3ec;
  background: #fff;
  box-shadow: 0 5px 0 #ffe3ec, 0 16px 30px rgba(255, 111, 145, 0.12);
}

.btn {
  border: 2px solid #ffd0dd;
  background: #fff;
  box-shadow: 0 4px 0 #ffd0dd;
  color: #c2185b;
  font-weight: 900;
}

.btn:hover {
  transform: translateY(-2px) rotate(-1deg);
}

.btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 0 #ffd0dd;
}

.btn-primary {
  border-color: #ff6f91;
  color: #fff;
  background: linear-gradient(180deg, #ff8fab, #ff6f91);
  box-shadow: 0 5px 0 #e85578, 0 12px 20px rgba(255, 111, 145, 0.26);
}

.btn-primary:active {
  box-shadow: 0 2px 0 #e85578;
}

.btn-ghost {
  border-color: #ffd0dd;
  color: #c2185b;
  background: #fff;
}

.hint-dots i {
  width: 6px;
  height: 6px;
  background: #ffd0dd;
}

.hint-dots i.on {
  background: #ff6f91;
}

.footnote {
  color: #a08a94;
  font-weight: 700;
}

/* ヒント */
.hint-box {
  border: 2px dashed #ffd166;
  border-left: 5px solid #ffd166;
  background: #fffbe8;
  box-shadow: 0 5px 0 #ffe08a, 0 12px 24px rgba(255, 183, 3, 0.12);
}

.hint-mark {
  width: 36px;
  height: 36px;
  background: #ffd166;
  color: #7a5600;
  box-shadow: 0 4px 0 #f2b705;
  font-size: 18px;
}

.hint-title {
  color: #9a6700;
  font-weight: 900;
}

.hint-text {
  color: #5c4a00;
  font-weight: 600;
}

.hint-close {
  color: #9a6700;
}

/* トースト */
.toast {
  border: 2px solid #fff;
  background: #43323a;
  box-shadow: 0 6px 0 rgba(67, 50, 58, 0.2), 0 16px 30px rgba(67, 50, 58, 0.2);
  font-weight: 700;
}

/* モーダル */
.modal {
  background: rgba(67, 50, 58, 0.45);
}

.modal-card {
  border: 3px solid #ffe3ec;
  background: #fffdf7;
  box-shadow: 0 10px 0 #ffe3ec, 0 30px 60px rgba(67, 50, 58, 0.24);
}

.modal-card::before {
  border: 2px dashed #fff0f4;
}

.modal-close {
  border: 2px solid #ffe3ec;
  background: #fff;
  box-shadow: 0 3px 0 #ffe3ec;
  color: #c2185b;
  font-weight: 900;
}

.result-seal {
  border: 3px solid #ff6f91;
  background: #fff0f4;
  color: #ff6f91;
  box-shadow: 0 4px 0 #ffd0dd, inset 0 0 0 3px #fff;
}

.stars {
  color: #ffb703;
  text-shadow: 0 2px 0 #fff3c4;
}

.result-item {
  border: 2px solid #ffe3ec;
  background: #fff;
  box-shadow: 0 3px 0 #fff0f4;
}

.result-item:nth-child(2n) {
  border-color: #d9f8f1;
  box-shadow: 0 3px 0 #e3fbf7;
}

.result-word {
  color: #43323a;
  font-family: var(--ui-font);
  font-weight: 900;
}

.result-reading {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e3fbf7;
  color: #1e6d63;
}

.result-meaning {
  color: #7a5c68;
  font-weight: 600;
}

.share-box {
  border: 2px dashed #ffb3c6;
  background: #fff7fa;
}

.share-label {
  color: #c2185b;
}

.share-text {
  color: #43323a;
  font-weight: 600;
}

/* 図鑑 */
.collection-item {
  border: 2px solid #ffe3ec;
  background: #fff;
  box-shadow: 0 3px 0 #fff0f4;
}

.collection-item:nth-child(3n + 1) {
  border-color: #d9f8f1;
  box-shadow: 0 3px 0 #e3fbf7;
}

.collection-item:nth-child(3n + 2) {
  border-color: #fff0c2;
  box-shadow: 0 3px 0 #fff8dd;
}

.collection-word {
  color: #43323a;
  font-family: var(--ui-font);
  font-weight: 900;
}

.collection-reading {
  padding: 2px 7px;
  border-radius: 999px;
  background: #e3fbf7;
  color: #1e6d63;
}

.collection-meaning {
  color: #7a5c68;
  font-weight: 600;
}

.collection-item.locked {
  opacity: 0.62;
}

/* 花びら */
.petal:nth-child(3n + 1) {
  background: linear-gradient(160deg, #ff8fab, #ffd166);
}

.petal:nth-child(3n + 2) {
  background: linear-gradient(160deg, #8ce5d8, #74c0fc);
}

.petal:nth-child(3n + 3) {
  background: linear-gradient(160deg, #c9b8ff, #ffc2d1);
}

/* 夜 */
html[data-theme="night"] .panel {
  background: #2f2947;
  border-color: #4a3f6b;
  box-shadow: 0 8px 0 #241f3a, 0 20px 40px rgba(0, 0, 0, 0.3);
}

html[data-theme="night"] .panel::before {
  border-color: #3a3357;
}

html[data-theme="night"] .hud {
  background: #2f2947;
  border-color: #4a3f6b;
  box-shadow: 0 6px 0 #241f3a, 0 16px 30px rgba(0, 0, 0, 0.26);
}

html[data-theme="night"] .hud-item {
  background: #3a3357;
}

html[data-theme="night"] .idiom-card {
  background: #2f2947;
  border-color: #4a3f6b;
  box-shadow: 0 5px 0 #241f3a, 0 12px 24px rgba(0, 0, 0, 0.2);
}

html[data-theme="night"] .idiom-card.is-complete {
  background: #294a46;
  border-color: #35c4b5;
  box-shadow: 0 5px 0 #1f3834, 0 14px 28px rgba(53, 196, 181, 0.18);
}

html[data-theme="night"] .idiom-card:nth-child(3n + 2) {
  border-color: #4a3f6b;
}

html[data-theme="night"] .idiom-card:nth-child(3n + 3) {
  border-color: #4a3f6b;
}

html[data-theme="night"] .cell.locked {
  background: #3a3357;
  border-color: #4a3f6b;
  color: #fff7e8;
  box-shadow: 0 3px 0 #241f3a;
}

html[data-theme="night"] .cell.hole {
  background: #2a2440;
  border-color: #6b5b95;
}

html[data-theme="night"] .cell.hole.over {
  background: #4a3f6b;
}

html[data-theme="night"] .tile,
html[data-theme="night"] .tile-ghost {
  --tile-bg: #4a3f6b;
  --tile-border: #6b5b95;
  --tile-shadow: #241f3a;
  --tile-ink: #fff7e8;
}

html[data-theme="night"] .tile[data-tone="pink"],
html[data-theme="night"] .tile-ghost[data-tone="pink"] {
  --tile-bg: #5a3b4d;
  --tile-border: #ff8fab;
  --tile-shadow: #3d2433;
  --tile-ink: #ffe0e9;
}

html[data-theme="night"] .tile[data-tone="mint"],
html[data-theme="night"] .tile-ghost[data-tone="mint"] {
  --tile-bg: #2f4f4a;
  --tile-border: #8ce5d8;
  --tile-shadow: #1f3834;
  --tile-ink: #e3fbf7;
}

html[data-theme="night"] .tile[data-tone="yellow"],
html[data-theme="night"] .tile-ghost[data-tone="yellow"] {
  --tile-bg: #5a4b2a;
  --tile-border: #ffd166;
  --tile-shadow: #3d3218;
  --tile-ink: #fff3c4;
}

html[data-theme="night"] .tile[data-tone="lav"],
html[data-theme="night"] .tile-ghost[data-tone="lav"] {
  --tile-bg: #443a66;
  --tile-border: #b197fc;
  --tile-shadow: #2d2547;
  --tile-ink: #ede7ff;
}

html[data-theme="night"] .tile[data-tone="sky"],
html[data-theme="night"] .tile-ghost[data-tone="sky"] {
  --tile-bg: #2f4560;
  --tile-border: #74c0fc;
  --tile-shadow: #1f3046;
  --tile-ink: #e3f2ff;
}

html[data-theme="night"] .btn-ghost,
html[data-theme="night"] .actions,
html[data-theme="night"] .modal-close {
  background: #3a3357;
  border-color: #4a3f6b;
  color: #fff7e8;
}

html[data-theme="night"] .actions {
  box-shadow: 0 5px 0 #241f3a;
}

html[data-theme="night"] .modal-card {
  background: #2f2947;
  border-color: #4a3f6b;
  box-shadow: 0 10px 0 #241f3a, 0 30px 60px rgba(0, 0, 0, 0.4);
}

html[data-theme="night"] .modal-card::before {
  border-color: #3a3357;
}

html[data-theme="night"] .result-item,
html[data-theme="night"] .collection-item {
  background: #3a3357;
  border-color: #4a3f6b;
  box-shadow: 0 3px 0 #241f3a;
}

html[data-theme="night"] .share-box {
  background: #2a2440;
  border-color: #6b5b95;
}

html[data-theme="night"] .hint-box {
  background: #3a3357;
  border-color: #ffd166;
  box-shadow: 0 5px 0 #241f3a;
}

html[data-theme="night"] .hint-text {
  color: #fff3c4;
}

html[data-theme="night"] .hint-close {
  color: #fff3c4;
}

html[data-theme="night"] .streak,
html[data-theme="night"] .icon-btn {
  border-color: #4a3f6b;
  box-shadow: 0 3px 0 #241f3a;
}

html[data-theme="night"] .kicker,
html[data-theme="night"] .daily-pill {
  border-color: #6b5b95;
  box-shadow: 0 3px 0 #241f3a;
}

/* レスポンシブ */
@media (max-width: 900px) {
  .hero-art {
    right: -2px;
  }

  .mascot {
    width: 84px;
    height: 92px;
  }

  .speech {
    font-size: 11px;
    padding: 7px 10px;
  }
}

@media (max-width: 620px) {
  .hero {
    padding-top: 8px;
  }

  .hero-art {
    position: static;
    justify-content: center;
    margin: 0 auto 2px;
  }

  .mascot {
    width: 72px;
    height: 78px;
  }

  .speech {
    margin-bottom: 0;
    padding: 6px 9px;
    font-size: 10px;
  }

  .speech::after {
    display: none;
  }

  .deco {
    display: none;
  }

  .hud-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hud-item {
    padding: 6px 8px;
  }

  .hud-label {
    font-size: 8px;
  }

  .panel {
    border-width: 2px;
    box-shadow: 0 6px 0 #ffe3ec, 0 16px 30px rgba(255, 111, 145, 0.09);
  }

  .target-panel {
    box-shadow: 0 6px 0 #d9f8f1, 0 16px 30px rgba(53, 196, 181, 0.09);
  }

  h1 {
    font-size: clamp(30px, 9vw, 44px);
  }

  h1::after {
    width: 96px;
    height: 6px;
    margin-top: 9px;
  }

  .tile {
    width: clamp(52px, 15vw, 62px);
    height: clamp(52px, 15vw, 62px);
    font-size: clamp(25px, 7vw, 30px);
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    border-radius: 22px;
  }

  .actions .btn {
    padding: 0 8px;
  }

  #new-btn {
    grid-column: 1 / -1;
  }

  .btn {
    padding: 0 12px;
  }

  .modal-card {
    border-width: 2px;
    box-shadow: 0 7px 0 #ffe3ec, 0 24px 50px rgba(67, 50, 58, 0.22);
  }
}

@media (max-width: 380px) {
  .speech {
    display: none;
  }

  .mascot {
    width: 58px;
    height: 64px;
  }

  .hud-item strong {
    font-size: 16px;
  }

  .tile {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}


body.is-dragging {
  cursor: grabbing;
}

body.is-dragging .tile {
  cursor: grabbing;
}

.icon-btn[aria-pressed="false"] .icon-sound {
  opacity: 1;
  text-decoration: none;
}

.idiom-card.hint-focus {
  outline: 5px solid rgba(255, 209, 102, 0.55);
  outline-offset: 4px;
  animation: card-hint 0.7s ease 2;
}

@keyframes card-hint {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-1deg); }
}

/* スライドしやすいように、ブロック置き場を画面上部に固定 */
.pool-panel {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 20;
  background: #fff;
  box-shadow: 0 8px 0 #ffe3ec, 0 18px 36px rgba(255, 111, 145, 0.16);
}

html[data-theme="night"] .pool-panel {
  background: #2f2947;
  box-shadow: 0 8px 0 #241f3a, 0 18px 36px rgba(0, 0, 0, 0.3);
}

@media (max-width: 620px) {
  .pool-panel {
    top: 6px;
    padding: 12px 12px 10px;
  }

  .pool-panel .panel-head {
    margin-bottom: 8px;
  }

  .pool-panel .panel-kicker,
  .pool-panel .instructions {
    display: none;
  }

  .pool-panel .panel h2 {
    font-size: 16px;
  }

  .pool {
    justify-content: center;
    gap: 8px;
    padding: 2px 0 6px;
  }

  .pool-tip {
    margin-top: 4px;
    font-size: 10px;
  }
}

/* 横スクロールのブロック置き場がグリッドを押し広げないようにする */
.game,
.panel,
.pool-panel,
.target-panel {
  min-width: 0;
}

.pool-panel {
  overflow: hidden;
}

.pool {
  width: 100%;
}

/* 夜は文字色を必ず明るくする */
html[data-theme="night"] h1,
html[data-theme="night"] .panel h2,
html[data-theme="night"] .hud-item strong,
html[data-theme="night"] .modal-card h2,
html[data-theme="night"] .result-word,
html[data-theme="night"] .collection-word,
html[data-theme="night"] .share-text {
  color: var(--ink);
}

html[data-theme="night"] h1 {
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

html[data-theme="night"] .subtitle,
html[data-theme="night"] .hud-label,
html[data-theme="night"] .instructions,
html[data-theme="night"] .legend,
html[data-theme="night"] .idiom-meta,
html[data-theme="night"] .pool-tip,
html[data-theme="night"] .season-note,
html[data-theme="night"] .daily-date,
html[data-theme="night"] .ring-label span,
html[data-theme="night"] .footnote,
html[data-theme="night"] .modal-summary,
html[data-theme="night"] .result-meaning,
html[data-theme="night"] .collection-meaning {
  color: var(--muted);
}

html[data-theme="night"] .hint-title {
  color: #ffd166;
}

/* 回答画面の例文とひとこと */
.result-card {
  overflow: auto;
}

.result-list {
  max-height: none;
  overflow: visible;
  gap: 5px;
  margin: 8px 0 10px;
}

.result-item {
  padding: 8px 12px;
}

.result-word {
  font-size: 19px;
  margin-bottom: 3px;
}

.result-meaning {
  font-size: 10px;
}

.result-example {
  margin: 4px 0 0;
  padding: 5px 8px;
  border-left: 3px solid #ffd166;
  border-radius: 10px;
  background: #fffbe8;
  color: #5c4a00;
  font-family: var(--ui-font);
  font-size: 10px;
  line-height: 1.5;
}

.result-example-label {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #ffd166;
  color: #7a5600;
  font-size: 8px;
  font-weight: 900;
}

.result-note {
  margin: 3px 0 0;
  color: #8c7b84;
  font-family: var(--ui-font);
  font-size: 9px;
  line-height: 1.5;
}

.result-seal {
  width: 50px;
  height: 50px;
  margin-bottom: 6px;
  font-size: 23px;
}

.result-card h2 {
  margin-bottom: 6px;
}

.result-card .stars {
  min-height: 24px;
  margin-bottom: 4px;
  font-size: 23px;
}

.result-card .modal-summary {
  margin-bottom: 8px;
}

.result-card .share-box {
  padding: 10px;
}

.result-card .share-text {
  font-size: 11px;
  line-height: 1.55;
}

.result-card .modal-actions {
  margin-top: 10px;
}

.collection-example {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: #9a6700;
  font-family: var(--ui-font);
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

html[data-theme="night"] .result-example {
  border-color: #ffd166;
  background: #3a3357;
  color: #fff3c4;
}

html[data-theme="night"] .result-note {
  color: var(--muted);
}

html[data-theme="night"] .collection-example {
  color: #ffd166;
}

/* 回答画面の操作ボタンは常に見えるように */
.result-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.result-card > .result-seal,
.result-card > h2,
.result-card > .stars,
.result-card > .modal-summary,
.result-card > .modal-actions {
  flex: 0 0 auto;
}

.result-card .result-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.result-card .modal-actions {
  position: static;
  padding: 8px 0 0;
  background: none;
}

/* 共有文はコピー用に保持し、画面では省略してカードを読みやすくする */
.result-card .share-box {
  display: none;
}

html[data-theme="night"] .result-card .modal-actions {
  background: none;
}

/* ことばの詳細 */
.word-detail-btn,
.collection-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 4px 10px;
  border: 1px solid #ffd0dd;
  border-radius: 999px;
  color: #c2185b;
  background: #fff;
  box-shadow: 0 2px 0 #ffd0dd;
  font-family: var(--ui-font);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.result-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.word-detail-btn-inline {
  margin-top: 0;
  padding: 3px 8px;
  font-size: 9px;
}

.word-detail-btn:hover,
.collection-detail-btn:hover {
  transform: translateY(-1px);
}

.word-detail-card {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  text-align: left;
}

.word-detail-card h2 {
  margin-bottom: 2px;
  text-align: left;
  font-size: clamp(24px, 4vw, 30px);
}

.word-detail-reading {
  margin: 0 0 12px;
  color: #1e6d63;
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 800;
}

.word-detail-body {
  display: grid;
  gap: 8px;
}

.word-detail-section {
  padding: 9px 12px;
  border: 1px solid #ffe3ec;
  border-radius: 12px;
  background: #fff7fa;
}

.word-detail-label {
  margin: 0 0 3px;
  color: #c2185b;
  font-family: var(--ui-font);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.word-detail-text {
  margin: 0;
  color: #43323a;
  font-family: var(--ui-font);
  font-size: 12px;
  line-height: 1.7;
}

html[data-theme="night"] .word-detail-section {
  background: #3a3357;
  border-color: #4a3f6b;
}

html[data-theme="night"] .word-detail-text {
  color: var(--ink);
}

html[data-theme="night"] .word-detail-btn,
html[data-theme="night"] .collection-detail-btn {
  background: #3a3357;
  border-color: #4a3f6b;
  color: #fff7e8;
  box-shadow: 0 2px 0 #241f3a;
}

/* ===== 全体の文字を大きく ===== */
.brand-text { font-size: 14px; }
.streak {
  min-height: 42px;
  padding: 0 13px;
  font-size: 13px;
}
.streak strong { font-size: 18px; }
.streak-flame { font-size: 16px; }
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  font-size: 18px;
}
.collection-count {
  min-width: 24px;
  height: 24px;
  font-size: 12px;
}
.kicker {
  padding: 6px 14px;
  font-size: 12px;
}
.subtitle { font-size: clamp(16px, 2vw, 19px); }
.daily-pill {
  min-height: 30px;
  padding: 0 14px;
  font-size: 13px;
}
.daily-date,
.link-btn { font-size: 13px; }
.season-note { font-size: 15px; }
.hud-label { font-size: 11px; }
.hud-item strong { font-size: clamp(20px, 3vw, 27px); }
.ring-label strong { font-size: 15px; }
.ring-label span { font-size: 10px; }
.panel-kicker { font-size: 11px; }
.panel h2 { font-size: clamp(20px, 2.5vw, 25px); }
.instructions,
.legend { font-size: 13px; }
.legend-box {
  width: 28px;
  height: 28px;
  font-size: 16px;
}
.tile {
  width: clamp(60px, 7vw, 66px);
  height: clamp(60px, 7vw, 66px);
  font-size: clamp(31px, 4.2vw, 37px);
}
.pool-tip { font-size: 13px; }
.idiom-index {
  min-width: 26px;
  height: 26px;
  font-size: 12px;
}
.cell {
  width: clamp(54px, 6.6vw, 70px);
  height: clamp(54px, 6.6vw, 70px);
  font-size: clamp(27px, 3.8vw, 35px);
}
.idiom-meta { font-size: 13px; }
.btn {
  min-height: 50px;
  padding: 0 22px;
  font-size: 15px;
}
.btn-small {
  min-height: 42px;
  font-size: 13px;
}
.hint-title { font-size: 12px; }
.hint-text { font-size: 16px; }
.footnote { font-size: 12px; }
.toast {
  padding: 12px 20px;
  font-size: 14px;
}
.modal-summary { font-size: 14px; }
.result-word { font-size: 22px; }
.result-reading { font-size: 12px; }
.result-meaning { font-size: 12px; }
.result-example { font-size: 12px; }
.result-example-label { font-size: 10px; }
.result-note { font-size: 11px; }
.share-text { font-size: 12px; }
.word-detail-btn,
.collection-detail-btn {
  padding: 5px 12px;
  font-size: 11px;
}
.word-detail-reading { font-size: 14px; }
.word-detail-label { font-size: 11px; }
.word-detail-text { font-size: 14px; }
.collection-word { font-size: 22px; }
.collection-reading { font-size: 11px; }
.collection-meaning { font-size: 12px; }
.collection-example { font-size: 11px; }

@media (max-width: 620px) {
  .tile {
    width: 60px;
    height: 60px;
    font-size: 31px;
  }

  .cell {
    width: 54px;
    height: 54px;
    font-size: 27px;
  }

  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #new-btn {
    grid-column: auto;
  }

  .hud-label { font-size: 10px; }
  .hud-item strong { font-size: 20px; }
  .btn { font-size: 14px; }
  .panel h2 { font-size: 20px; }
  .result-word {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .result-meta { gap: 6px; }
  .result-word > span:first-child,
  .result-reading,
  .word-detail-btn-inline {
    white-space: nowrap;
  }
  .result-word { font-size: 20px; }
  .result-example,
  .result-meaning { font-size: 11px; }
  .result-note { font-size: 10px; }
}

/* タップ時にタイルを消さない（ドラッグ中だけ薄くする） */
.tile:active {
  opacity: 1;
}

.tile.dragging {
  opacity: 0.28;
}

