:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #66717f;
  --paper: #fffaf1;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(42, 48, 56, 0.14);
  --accent: #f8b84d;
  --accent-2: #2fa36b;
  --accent-3: #3b7bd8;
  --danger: #c84f4f;
  --shadow: 0 18px 60px rgba(33, 25, 12, 0.18);
  --font-rounded: "M PLUS Rounded 1c", "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Yu Gothic", ui-rounded, system-ui, sans-serif;
  --font-system: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: var(--font-system);
  font-family: var(--font-body);
}

html[lang="en"],
html[lang="de"],
html[lang="es"],
html[lang="fr"],
html[lang="ja"] {
  --font-body: var(--font-rounded);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #f9e8b5 0%, #a8d8cf 48%, #f5f0e8 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  appearance: none;
}

.app {
  width: 100%;
  max-width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  overflow: hidden;
  overflow-x: clip;
}

.topbar {
  min-width: 0;
  max-width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(242,249,245,0.9)),
    linear-gradient(90deg, rgba(248,184,77,0.22), rgba(59,123,216,0.16));
  box-shadow: var(--shadow), inset 0 -4px 0 rgba(47, 163, 107, 0.22);
  backdrop-filter: blur(18px);
}

.titleBlock {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.titleBlock > div {
  min-width: 0;
  max-width: 100%;
}

.appMark {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #f8b84d, #d8703f);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.appMark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

#lifeSummary {
  margin-top: 4px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.topActions {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.iconButton {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(238,246,255,0.95) 52%, rgba(206,225,249,0.98)),
    linear-gradient(135deg, rgba(248,184,77,0.36), rgba(59,123,216,0.26));
  color: var(--ink);
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 8px 0 rgba(44, 72, 104, 0.16),
    0 16px 28px rgba(36, 35, 31, 0.16),
    inset 0 2px 0 rgba(255,255,255,0.9),
    inset 0 -5px 0 rgba(59,123,216,0.16);
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255,255,255,0.85);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.iconButton::before {
  content: "";
  position: absolute;
  inset: 5px 7px auto;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0));
  z-index: 0;
  pointer-events: none;
}

.iconButton span {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.iconButton:not(:disabled):hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.iconButton:active {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 rgba(44, 72, 104, 0.16),
    0 9px 18px rgba(36, 35, 31, 0.14),
    inset 0 2px 0 rgba(255,255,255,0.85),
    inset 0 -3px 0 rgba(59,123,216,0.18);
}

.iconButton strong {
  position: absolute;
  z-index: 2;
  top: -6px;
  right: -6px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 14px;
  font-weight: 900;
  border: 2px solid white;
}

#noticeButton {
  z-index: 1;
  overflow: visible;
}

.iconButton strong[hidden] {
  display: none;
}

.selectWrap {
  min-width: 0;
  max-width: 100%;
  display: block;
}

.selectWrap select {
  width: clamp(104px, 24vw, 190px);
  max-width: 100%;
  min-width: 0;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 38px 0 14px;
  font-size: 18px;
  font-weight: 800;
}

.gameShell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, var(--stage-panel-width, 1fr)) minmax(320px, 1fr);
  gap: 12px;
  overflow: hidden;
}

.stagePanel,
.sidePanel {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stagePanel {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.stageCanvasSlot {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: stretch;
  overflow: hidden;
  container-type: size;
}

#stage {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  position: relative;
  z-index: 0;
  display: block;
  touch-action: none;
  pointer-events: none;
}

.stageTouchSurface {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  background: transparent;
  touch-action: none;
}

@media (max-width: 720px), (pointer: coarse) {
  .stageTouchSurface {
    left: 15%;
    right: 15%;
  }
}

.stageFoodTray {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(42, 48, 56, 0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(244,236,222,0.94)),
    linear-gradient(90deg, rgba(248,184,77,0.14), rgba(47,163,107,0.14), rgba(59,123,216,0.12));
  box-shadow: 0 -10px 26px rgba(32, 26, 18, 0.08);
  transform: none;
  pointer-events: auto;
}

.foodToken {
  min-width: 0;
  height: 82px;
  display: grid;
  grid-template-rows: 42px 1fr;
  place-items: center;
  gap: 2px;
  padding: 6px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 239, 226, 0.82));
  box-shadow: 0 10px 24px rgba(29, 25, 18, 0.16);
  color: var(--ink);
  cursor: default;
  touch-action: manipulation;
}

.foodToken .foodOrb {
  cursor: grab;
  touch-action: none;
}

.foodToken .foodOrb:active {
  cursor: grabbing;
}

.app.isStageTraySide .stagePanel {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr);
}

.app.isStageTraySide .stageFoodTray {
  width: clamp(52px, 16vw, 70px);
  height: 100%;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(8, minmax(0, 1fr));
  align-content: stretch;
  gap: 4px;
  padding: 5px;
  border-top: 0;
  border-left: 1px solid rgba(42, 48, 56, 0.16);
  box-shadow: -10px 0 26px rgba(32, 26, 18, 0.08);
}

.app.isStageTraySide .stageFoodTray .foodToken {
  height: auto;
  min-height: 0;
  grid-template-rows: minmax(28px, 1fr) auto;
  gap: 1px;
  padding: 3px;
}

.app.isStageTraySide .stageFoodTray .foodOrb {
  width: min(28px, 100%);
  height: min(28px, 100%);
}

.app.isStageTraySide .stageFoodTray .foodName {
  display: block;
}

.foodOrb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background-color: var(--food-color);
  background-image: url("assets/generated/food-icon-atlas.png");
  background-size: 400% 200%;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 4px 8px rgba(40, 30, 18, 0.18);
}

.foodToken[data-food-index="0"] .foodOrb,
.foodDragGhost[data-food-index="0"] .foodOrb { background-position: 0% 0%; }
.foodToken[data-food-index="1"] .foodOrb,
.foodDragGhost[data-food-index="1"] .foodOrb { background-position: 33.333% 0%; }
.foodToken[data-food-index="2"] .foodOrb,
.foodDragGhost[data-food-index="2"] .foodOrb { background-position: 66.666% 0%; }
.foodToken[data-food-index="3"] .foodOrb,
.foodDragGhost[data-food-index="3"] .foodOrb { background-position: 100% 0%; }
.foodToken[data-food-index="4"] .foodOrb,
.foodDragGhost[data-food-index="4"] .foodOrb { background-position: 0% 100%; }
.foodToken[data-food-index="5"] .foodOrb,
.foodDragGhost[data-food-index="5"] .foodOrb { background-position: 33.333% 100%; }
.foodToken[data-food-index="6"] .foodOrb,
.foodDragGhost[data-food-index="6"] .foodOrb { background-position: 66.666% 100%; }
.foodToken[data-food-index="7"] .foodOrb,
.foodDragGhost[data-food-index="7"] .foodOrb { background-position: 100% 100%; }

.foodName {
  display: block;
  max-width: 100%;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foodDragGhost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 12;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 18px 18px rgba(22, 18, 14, 0.26));
  pointer-events: none;
  transform-origin: 0 0;
}

.foodDragGhost .foodOrb {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.foodDragGhost[hidden] {
  display: none;
}

.toast,
.gestureHint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast {
  top: 18px;
  z-index: 30;
  width: min(88%, 620px);
  padding: 16px 20px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,247,231,0.56)),
    linear-gradient(90deg, rgba(248,184,77,0.16), rgba(47,163,107,0.12));
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.78);
  text-shadow: 0 1px 2px rgba(255,255,255,0.82);
  box-shadow: 0 18px 46px rgba(30, 30, 30, 0.18), inset 0 -3px 0 rgba(248,184,77,0.22);
}

.stageCanvasSlot > .toast {
  z-index: 30;
}

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

.gestureHint {
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(24, 32, 42, 0.72);
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.gestureHint.isVisible {
  opacity: 1;
}

.photoPreview {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.photoPreview[hidden] {
  display: none;
}

.photoPreview.isVisible {
  opacity: 1;
}

.photoPreview img {
  width: min(90%, 520px);
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  padding: 2.4%;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(20, 24, 30, 0.26);
  animation: photoPop 2800ms ease both;
}

@keyframes photoPop {
  0% {
    opacity: 0;
    transform: scale(0.18);
  }
  10% {
    opacity: 1;
    transform: scale(1);
  }
  88% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.96);
  }
}

.sidePanel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  min-width: 0;
}

.meterGrid {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.meter {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,250,246,0.82));
  border: 1px solid var(--line);
  box-shadow: inset 0 -3px 0 rgba(59, 123, 216, 0.08);
}

.meter span {
  display: block;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.meter strong {
  display: block;
  margin-top: 3px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.conditionCard {
  min-height: 68px;
  display: grid;
  align-content: start;
  gap: 4px;
}

.tabBar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.tabButton {
  position: relative;
  min-width: 0;
  min-height: 68px;
  padding: 10px 8px;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(238,241,247,0.82)),
    linear-gradient(90deg, rgba(248,184,77,0.12), rgba(59,123,216,0.1));
  color: var(--muted);
  border-right: 1px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.86), inset 0 -4px 0 rgba(73,82,94,0.08);
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255,255,255,0.85);
  transition: transform 120ms ease, filter 120ms ease, color 120ms ease;
}

.tabButton::before {
  content: "";
  position: absolute;
  inset: 6px 10px auto;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0));
  z-index: 0;
  pointer-events: none;
}

.tabButton:not(.isActive):hover {
  color: var(--ink);
  filter: saturate(1.08);
}

.tabButton:last-child {
  border-right: 0;
}

.tabButton.isActive {
  background:
    linear-gradient(180deg, #fff, #fff6dd 58%, #f6d787),
    linear-gradient(90deg, rgba(248,184,77,0.26), rgba(47,163,107,0.14));
  color: var(--ink);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.92),
    inset 0 -6px 0 var(--accent),
    0 8px 18px rgba(180, 125, 36, 0.12);
}

.panelContent {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.actionGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.actionCard {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  isolation: isolate;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(242,248,255,0.94)),
    radial-gradient(circle at 100% 0%, rgba(59,123,216,0.18), transparent 42%),
    linear-gradient(90deg, rgba(248,184,77,0.18), rgba(47,163,107,0.12));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 7px 0 rgba(42, 70, 95, 0.12),
    0 16px 30px rgba(34, 31, 24, 0.14),
    inset 0 2px 0 rgba(255,255,255,0.92),
    inset 0 -5px 0 rgba(59, 123, 216, 0.12);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.actionCard::before {
  content: "";
  position: absolute;
  inset: 7px 10px auto;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0));
  z-index: 0;
  pointer-events: none;
}

.actionCard:not(:disabled):hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
}

.actionCard:not(:disabled):active {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 rgba(42, 70, 95, 0.12),
    0 10px 20px rgba(34, 31, 24, 0.12),
    inset 0 2px 0 rgba(255,255,255,0.88),
    inset 0 -3px 0 rgba(59, 123, 216, 0.12);
}

.actionCard:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.actionCard.isSelected {
  outline: 3px solid rgba(248, 184, 77, 0.45);
}

.actionIcon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4efe6;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.atlasIcon {
  background-image: url("assets/generated/ui-icon-atlas.png");
  /* ui-icon-atlas.png tile bounds are R>200 threshold-detected; the atlas is not an exact 4x4 grid. */
  background-size: 399.363% 399.363%;
  background-repeat: no-repeat;
  color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 5px 14px rgba(34, 27, 18, 0.11);
}

.icon-food { background-position: 1.064% 1.064%; }
.icon-observe { background-position: 33.723% 1.064%; }
.icon-examine { background-position: 66.277% 1.064%; }
.icon-photo { background-position: 98.723% 1.064%; }
.icon-outdoor { background-position: 1.170% 34.468%; }
.icon-indoor { background-position: 33.723% 34.468%; }
.icon-shop { background-position: 66.277% 34.468%; }
.icon-share { background-position: 98.723% 34.468%; }
.icon-help { background-position: 1.064% 67.553%; }
.icon-about { background-position: 33.723% 67.553%; }
.icon-notice { background-position: 66.277% 67.553%; }
.icon-reset { background-position: 98.723% 67.447%; }
.icon-touch { background-position: 1.170% 100%; }
.icon-reward { background-position: 33.723% 100%; }
.icon-clothes { background-position: 66.277% 100%; }
.icon-gift { background-position: 98.723% 100%; }

.actionText {
  min-width: 0;
}

.actionText strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.actionText span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.feedPanel {
  display: grid;
  gap: 12px;
}

.touchCard {
  min-height: 74px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.touchCard p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.statRow {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff, #fff8eb);
  padding: 14px;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(32, 26, 18, 0.08);
}

.noticeList {
  display: grid;
  gap: 12px;
  white-space: normal;
}

.noticeItem {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(42,48,56,0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.97), rgba(244,248,251,0.93)),
    radial-gradient(circle at 100% 0%, rgba(59,123,216,0.13), transparent 42%);
  box-shadow: 0 12px 30px rgba(21, 25, 31, 0.1);
}

.noticeItem::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(59,123,216,0.56);
}

.noticeItem.isUnread {
  border-color: rgba(248,184,77,0.5);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,249,234,0.95)),
    radial-gradient(circle at 100% 0%, rgba(248,184,77,0.22), transparent 44%);
  box-shadow: 0 14px 34px rgba(56, 43, 18, 0.13);
}

.noticeItem.isUnread::before {
  background: var(--accent);
}

.noticeIcon {
  width: 46px;
  height: 46px;
  display: block;
  border-radius: 8px;
  background-color: #f8f2e7;
}

.noticeContent {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.noticeMeta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.noticeTime,
.noticeNewBadge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(42,48,56,0.1);
  background: rgba(255,255,255,0.72);
  overflow-wrap: anywhere;
}

.noticeNewBadge {
  border-color: rgba(200,79,79,0.22);
  background: rgba(200,79,79,0.1);
  color: #9b3535;
}

.noticeMessage {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.noticeEmpty {
  align-items: center;
}

.noticeEmpty .noticeMessage {
  color: var(--muted);
}

.shopTop {
  display: grid;
  gap: 18px;
  white-space: normal;
}

.shopTabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(42, 48, 56, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(246,249,250,0.86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 8px 18px rgba(21, 25, 31, 0.08);
}

.shopTabButton {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(42,48,56,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.shopTabButton:not(.isActive):hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow: 0 8px 18px rgba(21, 25, 31, 0.1);
}

.shopTabButton.isActive {
  border-color: rgba(59, 123, 216, 0.44);
  background:
    linear-gradient(180deg, #6fc6ff 0%, #367dde 100%);
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.34), 0 8px 18px rgba(59, 123, 216, 0.20);
}

.shopFilter {
  --shop-filter-columns: 3;
  display: grid;
  grid-template-columns: repeat(var(--shop-filter-columns), minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(42, 48, 56, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(245,250,247,0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 8px 20px rgba(21, 25, 31, 0.08);
}

.shopFilterButton {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(42,48,56,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.shopFilter.isTextWrapNeeded .shopFilterButton {
  white-space: normal;
  overflow-wrap: anywhere;
}

.shopFilterButton:not(.isActive):hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow: 0 8px 18px rgba(21, 25, 31, 0.1);
}

.shopFilterButton.isActive {
  border-color: rgba(47, 163, 107, 0.52);
  background:
    linear-gradient(180deg, #54d98f 0%, #2fa36b 100%);
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.34), 0 8px 18px rgba(47, 163, 107, 0.22);
}

.shopSection {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.shopSectionTitle {
  margin: 0;
  padding: 0 2px 8px;
  border-bottom: 2px solid rgba(47, 163, 107, 0.22);
  color: #24553d;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.shopEmpty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 800;
}

.shopList {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 12px;
  white-space: normal;
}

.shopItem {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 164px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(42, 48, 56, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(244,247,251,0.92)),
    radial-gradient(circle at 100% 0%, rgba(59, 123, 216, 0.12), transparent 42%);
  box-shadow: 0 12px 32px rgba(21, 25, 31, 0.11);
}

.shopItem::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent-3);
}

.shopItem.isOwned::before {
  background: var(--accent-2);
}

.shopItem.isEquipped {
  outline: 2px solid rgba(47, 163, 107, 0.28);
}

.shopIcon,
.shopHeroIcon {
  display: block;
  border-radius: 8px;
  background-image: url("assets/generated/shop-icon-atlas.png");
  background-size: 832.8638498% 416.4319249%;
  background-repeat: no-repeat;
  background-color: #f8f2e7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 9px 24px rgba(28, 26, 22, 0.15);
}

.shopIcon {
  width: 76px;
  height: 76px;
}

.shopItemBody {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.shopItem h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.shopItem p,
.statRow p {
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.shopItem p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shopItem p span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(42,48,56,0.1);
}

.shopUsageMeter {
  --usage: 1;
  position: relative;
  min-width: 0;
  width: 100%;
  height: 24px;
  overflow: hidden;
  border: 1px solid rgba(42,48,56,0.14);
  border-radius: 8px;
  background: rgba(18, 24, 32, 0.11);
  box-shadow: inset 0 1px 2px rgba(18, 24, 32, 0.16), 0 1px 0 rgba(255,255,255,0.76);
}

.shopUsageMeter::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleX(var(--usage));
  transform-origin: left center;
  background: linear-gradient(90deg, #36b477, #f0c84b);
}

.shopUsageText {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: #192018;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.previewCanvas {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 28px rgba(21, 25, 31, 0.12);
}

.shopModal {
  width: min(980px, 100%);
}

.achievementModal {
  width: min(980px, 100%);
}

.helpModal {
  width: min(760px, 100%);
}

.noticeModal {
  width: min(760px, 100%);
}

.settingsModal {
  width: min(620px, 100%);
}

.achievementModal .modalBody,
.helpModal .modalBody,
.noticeModal .modalBody,
.settingsModal .modalBody,
.shopModal .modalBody {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(241,246,249,0.62)),
    var(--paper);
  white-space: normal;
}

.settingsBody {
  display: grid;
  gap: 14px;
}

.settingsSection {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(42,48,56,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 10px 22px rgba(34, 31, 24, 0.08);
}

.settingsSection h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 900;
}

.settingsDescription,
.settingsLabel {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.settingsSelectWrap {
  display: grid;
  gap: 7px;
}

.settingsSelectWrap select {
  width: 100%;
}

.shopCurrencySection {
  display: grid;
  min-width: 0;
}

.coinCheckoutBody {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.coinPackMedia {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 4 / 3;
  justify-self: center;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 26px rgba(34, 31, 24, 0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.84), rgba(238, 248, 235, 0.72));
}

.coinProductGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.coinProductCard {
  position: relative;
  min-height: 236px;
  display: grid;
  gap: 7px;
  align-content: center;
  justify-items: center;
  padding: 12px 10px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff 0%, #fff4d8 55%, #efd69a 100%),
    linear-gradient(90deg, rgba(83, 192, 128, 0.14), rgba(59, 123, 216, 0.10));
  box-shadow:
    0 7px 0 rgba(132, 101, 49, 0.32),
    0 14px 24px rgba(34, 31, 24, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.86),
    inset 0 -4px 0 rgba(190, 143, 54, 0.13);
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.coinProductIcon {
  width: min(100%, 116px);
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 18px rgba(34, 31, 24, 0.13);
}

.coinProductCard::before {
  content: "";
  position: absolute;
  inset: 6px 9px auto;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.coinProductCard.isRecommended {
  background:
    linear-gradient(180deg, #f6fff8 0%, #dff8ba 48%, #9fd474 100%),
    linear-gradient(90deg, rgba(83, 192, 128, 0.2), rgba(248, 184, 77, 0.12));
  box-shadow:
    0 7px 0 rgba(62, 122, 63, 0.34),
    0 14px 24px rgba(47, 163, 107, 0.20),
    inset 0 2px 0 rgba(255, 255, 255, 0.88),
    inset 0 -4px 0 rgba(58, 117, 62, 0.16);
}

.coinProductCard:not(:disabled):hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.coinProductCard:not(:disabled):active {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 rgba(78, 96, 46, 0.26),
    0 8px 16px rgba(34, 31, 24, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.66),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.coinProductBadge,
.coinProductBonus {
  min-width: 0;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(37, 31, 26, 0.10);
  font-size: 13px;
  line-height: 1.15;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.coinProductAmount {
  min-width: 0;
  max-width: 100%;
  font-size: 24px;
  line-height: 1.06;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.coinProductPrice {
  min-width: 0;
  max-width: 100%;
  color: #4d453c;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.coinProductBonus {
  background: rgba(47, 163, 107, 0.18);
  color: #20583f;
}

@media (max-width: 620px) {
  .coinProductGrid {
    grid-template-columns: 1fr;
  }

  .coinProductCard {
    min-height: 126px;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .coinProductIcon {
    grid-row: span 4;
    width: 76px;
  }
}

.settingsResetButton {
  width: 100%;
}

.helpBody {
  display: grid;
  gap: 12px;
  color: var(--ink);
}

.helpBody h3 {
  margin: 18px 0 2px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(47, 163, 107, 0.22);
  font-size: 23px;
  line-height: 1.22;
  font-weight: 900;
}

.helpBody h3:first-child {
  margin-top: 0;
}

.helpBody h4 {
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 900;
  color: #24553d;
}

.helpBody p {
  margin: 0;
  font-size: 18px;
  line-height: 1.68;
  font-weight: 700;
}

.helpTitle {
  color: #1b4632;
}

.helpMetaLine {
  color: var(--muted);
  line-height: 1.35;
}

.helpIntro {
  font-size: 19px;
}

.helpNote {
  padding: 10px 12px;
  border-left: 4px solid rgba(248, 184, 77, 0.8);
  border-radius: 0 8px 8px 0;
  background: rgba(248, 184, 77, 0.12);
}

.helpList {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.25em;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 800;
}

.achievementList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 12px;
  white-space: normal;
}

.achievementItem,
.achievementEmpty {
  border: 1px solid rgba(42, 48, 56, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(244,247,251,0.92)),
    radial-gradient(circle at 100% 0%, rgba(248, 184, 77, 0.16), transparent 42%);
  box-shadow: 0 12px 32px rgba(21, 25, 31, 0.11);
}

.achievementItem {
  min-height: 118px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.achievementEmpty {
  padding: 16px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.achievementIcon {
  width: 76px;
  height: 76px;
  display: block;
  border-radius: 8px;
  background-image: url("assets/generated/achievement-icon-atlas.png");
  background-size: 500% 400%;
  background-repeat: no-repeat;
  background-color: #fff6df;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 9px 24px rgba(28, 26, 22, 0.15);
}

.achievementItemBody {
  min-width: 0;
}

.achievementItem h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.achievementReward {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(248, 184, 77, 0.16);
  color: #7a4f12;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.achievementDate {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.shopDetail {
  display: grid;
  gap: 16px;
}

.shopDetailHero {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.shopHeroIcon {
  width: 132px;
  height: 132px;
}

.detailBody {
  display: grid;
  gap: 16px;
  font-size: 19px;
  font-weight: 700;
}

.aboutBody {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 14px;
  font-size: 19px;
  font-weight: 700;
  overflow-x: clip;
}

.aboutLogo {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: clamp(250px, 42vw, 360px);
  min-height: 0;
  max-height: min(46dvh, 380px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(248,184,77,0.08), rgba(47,163,107,0.08), rgba(59,123,216,0.08)),
    #05070b;
  color: #fff;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(255,255,255,0.08),
    inset 0 -18px 46px rgba(0,0,0,0.28);
}

.aboutLogo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0) 20%),
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12), rgba(255,255,255,0) 58%);
  mix-blend-mode: screen;
}

.aboutCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
}

.aboutModal {
  width: min(640px, calc(100vw - 32px));
  min-width: 0;
  border-color: rgba(255,255,255,0.36);
  background:
    linear-gradient(180deg, #151b22 0%, #070a0d 100%),
    #070a0d;
}

.aboutModal .modalHeader {
  color: #f8fbff;
  border-bottom-color: rgba(255,255,255,0.12);
  background:
    linear-gradient(90deg, rgba(248,184,77,0.22), rgba(47,163,107,0.16), rgba(59,123,216,0.22)),
    #0d1218;
  box-shadow: inset 0 -4px 0 rgba(22, 223, 255, 0.14);
}

.aboutModal .modalHeader h2 {
  text-shadow: 0 2px 18px rgba(22, 223, 255, 0.22);
}

.aboutModal .modalBody {
  overflow-x: hidden;
  white-space: normal;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
    #090d11;
}

.aboutModal .modalActions {
  border-top-color: rgba(255,255,255,0.12);
  background: #080b0f;
}

.aboutMeta {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  color: rgba(255,255,255,0.82);
  line-height: 1.25;
}

.aboutMeta span {
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.aboutMeta span:nth-child(2) {
  justify-content: center;
  color: #f8d48c;
}

.aboutMeta span:nth-child(3) {
  justify-content: flex-end;
  color: #9ee7ff;
  text-align: right;
}

.buttonRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.primaryButton,
.secondaryButton,
.dangerButton {
  position: relative;
  min-width: 44px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.78);
  line-height: 1.15;
  font-size: 19px;
  font-weight: 900;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(0,0,0,0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.primaryButton::before,
.secondaryButton::before,
.dangerButton::before {
  content: "";
  position: absolute;
  inset: 5px 8px auto;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0));
  z-index: 0;
  pointer-events: none;
}

.primaryButton {
  background:
    linear-gradient(180deg, #54d98f 0%, #2fa36b 54%, #1d724d 100%),
    linear-gradient(90deg, rgba(248,184,77,0.22), rgba(59,123,216,0.14));
  color: #fff;
  box-shadow:
    0 7px 0 #176341,
    0 14px 24px rgba(47, 163, 107, 0.26),
    inset 0 2px 0 rgba(255,255,255,0.38),
    inset 0 -4px 0 rgba(0,0,0,0.14);
}

.secondaryButton {
  background:
    linear-gradient(180deg, #fff 0%, #eef6ff 58%, #dbe8f6 100%),
    linear-gradient(90deg, rgba(248,184,77,0.18), rgba(59,123,216,0.12));
  color: var(--ink);
  border-color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 0 rgba(255,255,255,0.9);
  box-shadow:
    0 7px 0 rgba(91, 116, 145, 0.28),
    0 14px 24px rgba(34, 31, 24, 0.13),
    inset 0 2px 0 rgba(255,255,255,0.9),
    inset 0 -4px 0 rgba(59,123,216,0.12);
}

.dangerButton {
  background:
    linear-gradient(180deg, #f07d7d 0%, #c84f4f 56%, #983232 100%),
    linear-gradient(90deg, rgba(248,184,77,0.18), rgba(59,123,216,0.08));
  color: #fff;
  box-shadow:
    0 7px 0 #7e2828,
    0 14px 24px rgba(200, 79, 79, 0.24),
    inset 0 2px 0 rgba(255,255,255,0.34),
    inset 0 -4px 0 rgba(0,0,0,0.16);
}

.shopWearButton {
  background:
    linear-gradient(180deg, #70b8ff 0%, #3b7bd8 55%, #2457a8 100%),
    linear-gradient(90deg, rgba(91, 207, 242, 0.2), rgba(248,184,77,0.12));
  box-shadow:
    0 7px 0 #1d477f,
    0 14px 24px rgba(59, 123, 216, 0.26),
    inset 0 2px 0 rgba(255,255,255,0.38),
    inset 0 -4px 0 rgba(0,0,0,0.14);
}

.shopRemoveButton {
  background:
    linear-gradient(180deg, #ff8a74 0%, #d95745 55%, #963527 100%),
    linear-gradient(90deg, rgba(248,184,77,0.14), rgba(200,79,79,0.12));
  box-shadow:
    0 7px 0 #7c2a1f,
    0 14px 24px rgba(200, 79, 79, 0.24),
    inset 0 2px 0 rgba(255,255,255,0.34),
    inset 0 -4px 0 rgba(0,0,0,0.16);
}

.primaryButton:not(:disabled):hover,
.secondaryButton:not(:disabled):hover,
.dangerButton:not(:disabled):hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.primaryButton:not(:disabled):active,
.secondaryButton:not(:disabled):active,
.dangerButton:not(:disabled):active {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 rgba(44, 62, 74, 0.26),
    0 8px 16px rgba(34, 31, 24, 0.14),
    inset 0 2px 0 rgba(255,255,255,0.66),
    inset 0 -2px 0 rgba(0,0,0,0.12);
}

.shopBackButton {
  padding-inline: 22px;
}

.legalLink {
  text-decoration: none;
  flex: 1 1 180px;
}

.primaryButton:disabled,
.secondaryButton:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.modalLayer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background:
    linear-gradient(135deg, rgba(24, 32, 42, 0.42), rgba(47, 163, 107, 0.18)),
    rgba(20, 22, 26, 0.42);
  backdrop-filter: blur(10px);
}

.modalLayer[hidden] {
  display: none;
}

.modal {
  width: min(680px, 100%);
  max-height: min(760px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.78);
  background:
    linear-gradient(180deg, #fffdf8, #f6fff8),
    var(--paper);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(42,48,56,0.08);
  overflow: hidden;
}

.modalHeader,
.modalActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modalHeader {
  justify-content: space-between;
  background:
    linear-gradient(90deg, rgba(248,184,77,0.28), rgba(47,163,107,0.18), rgba(59,123,216,0.14)),
    rgba(255,255,255,0.86);
  box-shadow: inset 0 -5px 0 rgba(248, 184, 77, 0.24);
}

.modalHeader h2 {
  max-width: calc(100% - 72px);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.modalActions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(245,250,247,0.9));
}

.modalActionBalance {
  min-width: 0;
  min-height: 44px;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(42,48,56,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  color: #24553d;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.modalBody {
  min-height: 0;
  overflow: auto;
  padding: 20px;
  white-space: pre-wrap;
  line-height: 1.62;
  font-size: 20px;
  font-weight: 700;
}

.observeModal,
.examineModal {
  width: min(900px, 100%);
}

.observeModal .modalBody,
.examineModal .modalBody {
  white-space: normal;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(241,246,249,0.62)),
    var(--paper);
}

.careReport {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reportStatusCard,
.reportCard {
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(42,48,56,0.13);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 12px 30px rgba(21, 25, 31, 0.1);
}

.reportStatusCard {
  grid-column: 1 / -1;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(47,163,107,0.18), rgba(59,123,216,0.14)),
    rgba(255,255,255,0.94);
}

.reportEyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.reportStatusCard p {
  margin: 0;
  font-size: 24px;
  line-height: 1.34;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.reportCard {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.reportCard h3 {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(47, 163, 107, 0.18);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 900;
}

.profileCard {
  grid-column: span 1;
}

.gaugeCard {
  grid-column: span 1;
}

.meterOnlyCard {
  align-content: center;
  gap: 0;
}

.listCard {
  min-height: 128px;
}

.examineReport .profileCard,
.examineReport .gaugeCard,
.adviceSection {
  grid-column: 1 / -1;
}

.adviceSection {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.reportTable {
  display: grid;
  grid-template-columns: minmax(112px, max-content) minmax(0, 1fr);
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(42,48,56,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.8);
}

.reportTable dt,
.reportTable dd {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(42,48,56,0.08);
  overflow-wrap: anywhere;
}

.reportTable dt {
  color: var(--muted);
  background: rgba(47,163,107,0.08);
  font-size: 16px;
  font-weight: 900;
}

.reportTable dd {
  justify-content: flex-end;
  background: rgba(255,255,255,0.72);
  font-size: 18px;
  font-weight: 800;
}

.reportTable dt:nth-last-child(2),
.reportTable dd:last-child {
  border-bottom: 0;
}

.reportValueStrong {
  color: #17583a;
  font-size: 20px;
  font-weight: 900;
}

.reportMeter {
  --meter: 0%;
  --meter-color: #2fa36b;
  display: grid;
  gap: 7px;
}

.reportMeter + .reportMeter {
  margin-top: 11px;
}

.reportMeterHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.reportMeterHead strong {
  color: #17202a;
  font-size: 17px;
  font-weight: 900;
}

.reportMeterTrack {
  height: 18px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(42,48,56,0.12);
  background: rgba(230,236,239,0.92);
}

.reportMeterTrack::before {
  content: "";
  display: block;
  width: var(--meter);
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.38), rgba(255,255,255,0)),
    var(--meter-color);
  transition: width 620ms cubic-bezier(0.18, 0.86, 0.32, 1);
}

.tone-water { --meter-color: #3b7bd8; }
.tone-smell { --meter-color: #8c6c2f; }
.tone-sad { --meter-color: #5d78b8; }
.tone-angry { --meter-color: #d95d45; }
.tone-happy { --meter-color: #f2b64d; }
.tone-health { --meter-color: #2fa36b; }
.tone-ill { --meter-color: #9d5bb7; }

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

.reportItemList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reportItemList li {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(42,48,56,0.1);
  background: rgba(248, 184, 77, 0.13);
  color: #65440e;
  font-size: 16px;
  font-weight: 900;
}

.adviceCards {
  display: grid;
  gap: 12px;
}

.adviceCard {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(42,48,56,0.12);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(244,248,251,0.92));
  box-shadow: 0 10px 24px rgba(21, 25, 31, 0.09);
}

.adviceCard p {
  margin: 0;
  font-size: 17px;
  line-height: 1.58;
  font-weight: 750;
}

.adviceCard p + p {
  margin-top: 7px;
}

@media (max-width: 680px) {
  .careReport {
    grid-template-columns: 1fr;
  }

  .profileCard,
  .gaugeCard,
  .listCard {
    grid-column: 1 / -1;
  }

  .reportStatusCard p {
    font-size: 21px;
  }

  .reportTable {
    grid-template-columns: minmax(92px, max-content) minmax(0, 1fr);
  }

  .reportTable dt,
  .reportTable dd {
    min-height: 40px;
    padding: 7px 9px;
    font-size: 15px;
  }

  .reportTable dd,
  .reportValueStrong {
    font-size: 17px;
  }
}

.nameForm {
  display: grid;
  gap: 12px;
}

.nameForm input {
  width: 100%;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  font-size: 22px;
  font-weight: 800;
}

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

@media (max-width: 920px), (max-aspect-ratio: 3 / 4) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto auto;
    overflow: visible;
    overflow-x: clip;
  }

  .topbar {
    min-height: 0;
    height: auto;
  }

  .gameShell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    overflow: visible;
    overflow-x: clip;
  }

  .stagePanel {
    height: auto;
    max-height: none;
    grid-template-rows: auto auto;
  }

  .stageCanvasSlot {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .sidePanel {
    min-height: 0;
    max-height: none;
    overflow-y: visible;
    overflow-x: clip;
    grid-template-rows: auto auto auto;
  }

  .panelContent {
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .app {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    gap: 8px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: 8px;
    gap: 8px;
  }

  .titleBlock {
    gap: 8px;
  }

  .appMark {
    width: 38px;
    height: 38px;
  }

  h1 {
    font-size: 22px;
  }

  #lifeSummary {
    font-size: 15px;
  }

  .topActions {
    width: 100%;
    justify-content: flex-end;
  }

  .selectWrap {
    flex: 1 1 0;
  }

  .selectWrap select {
    width: 100%;
    height: 48px;
    padding-inline: 10px 28px;
  }

  .gameShell {
    gap: 8px;
  }

  .meterGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
    gap: 6px;
  }

  .meter {
    padding: 7px 8px;
  }

  .stageFoodTray {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    bottom: auto;
    gap: 6px;
    padding: 8px;
  }

  .stageFoodTray .foodToken {
    height: 82px;
    grid-template-rows: 42px 1fr;
  }

  .stageFoodTray .foodName {
    display: block;
  }

  .tabButton {
    min-height: 54px;
    font-size: 17px;
  }

  .panelContent {
    padding: 8px;
  }

  .actionGrid {
    gap: 8px;
  }

  .actionCard {
    min-height: 92px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .actionIcon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .achievementList,
  .shopList {
    grid-template-columns: 1fr;
  }

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

  .shopHeroIcon {
    width: 104px;
    height: 104px;
  }
}

@media (max-width: 380px) {
  .app {
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    gap: 6px;
  }

  .topbar {
    padding: 6px;
    gap: 6px;
  }

  .appMark {
    width: 34px;
    height: 34px;
  }

  h1 {
    font-size: 19px;
  }

  #lifeSummary {
    font-size: 13px;
  }

  .iconButton {
    width: 44px;
    height: 44px;
  }

  .selectWrap select {
    height: 44px;
    font-size: 15px;
  }
}

@media (max-width: 920px) and (max-height: 520px) {
  .stagePanel {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr);
  }

  .stageFoodTray {
    width: clamp(52px, 16vw, 70px);
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, minmax(0, 1fr));
    align-content: stretch;
    gap: 4px;
    padding: 5px;
    border-top: 0;
    border-left: 1px solid rgba(42, 48, 56, 0.16);
    box-shadow: -10px 0 26px rgba(32, 26, 18, 0.08);
  }

  .stageFoodTray .foodToken {
    height: auto;
    min-height: 0;
    grid-template-rows: minmax(28px, 1fr) auto;
    gap: 1px;
    padding: 3px;
  }

  .stageFoodTray .foodOrb {
    width: min(28px, 100%);
    height: min(28px, 100%);
  }

  .stageFoodTray .foodName {
    display: block;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  body {
    overflow: hidden;
  }

  .app {
    height: 100dvh;
    min-height: 0;
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    gap: 6px;
    overflow: hidden;
  }

  .topbar {
    min-height: 0;
    height: auto;
    padding: 5px 8px;
    gap: 8px;
  }

  .titleBlock {
    gap: 8px;
  }

  .appMark {
    width: 34px;
    height: 34px;
  }

  h1 {
    font-size: 18px;
  }

  #lifeSummary {
    margin-top: 0;
    font-size: 13px;
  }

  .topActions {
    gap: 6px;
  }

  .iconButton {
    width: 36px;
    height: 36px;
  }

  .selectWrap select {
    max-width: 116px;
    height: 36px;
    padding: 0 24px 0 8px;
  }

  .gameShell {
    height: 100%;
    grid-template-columns: minmax(0, var(--stage-panel-width, 1fr)) minmax(236px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 6px;
    overflow: hidden;
  }

  .stagePanel,
  .sidePanel {
    min-height: 0;
    max-height: 100%;
  }

  .stagePanel {
    height: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr);
  }

  .stageFoodTray {
    width: 70px;
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, minmax(0, 1fr));
    align-content: stretch;
    gap: 4px;
    padding: 5px;
    border-top: 0;
    border-left: 1px solid rgba(42, 48, 56, 0.16);
    box-shadow: -10px 0 26px rgba(32, 26, 18, 0.08);
  }

  .sidePanel {
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow-y: auto;
    overflow-x: clip;
  }

  .panelContent {
    overflow: visible;
  }

  .meterGrid {
    padding: 6px;
    gap: 5px;
  }

  .meter {
    padding: 5px 6px;
  }

  .meter span {
    font-size: 10px;
  }

  .meter strong {
    font-size: 12px;
  }

  .conditionCard {
    min-height: 48px;
  }

  .tabButton {
    min-height: 42px;
    padding: 5px 4px;
    font-size: 14px;
  }

  .panelContent {
    padding: 6px;
  }

  .stageFoodTray {
    bottom: auto;
    width: 70px;
    gap: 5px;
    padding: 5px 6px;
  }

  .foodToken {
    height: auto;
    min-height: 0;
    grid-template-rows: minmax(28px, 1fr) auto;
    gap: 1px;
    padding: 3px;
  }

  .foodOrb {
    width: min(28px, 100%);
    height: min(28px, 100%);
  }

  .foodName {
    display: block;
  }

  .actionGrid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .actionCard {
    min-height: 66px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .actionIcon {
    width: 34px;
    height: 34px;
  }

  .touchCard {
    min-height: 58px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }
}

/* Current layout contract: always use a centered portrait application column. */
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.app {
  width: min(1024px, calc(100vw - 16px));
  max-width: 1024px;
  height: auto;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 0 max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 12px;
  overflow: visible;
  overflow-x: clip;
}

.topbar {
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
}

.titleBlock {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.topActions {
  flex: 0 1 auto;
  margin-left: auto;
}

.gameShell {
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  overflow: visible;
  overflow-x: clip;
}

.stagePanel,
.sidePanel {
  min-height: 0;
  max-height: none;
}

.stagePanel {
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
}

.stageCanvasSlot {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

#stage {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
}

.stageFoodTray,
.app.isStageTraySide .stageFoodTray {
  width: 100%;
  height: auto;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: none;
  align-content: stretch;
  gap: 9px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(42, 48, 56, 0.16);
  border-left: 0;
  box-shadow: 0 -10px 26px rgba(32, 26, 18, 0.08);
}

.stageFoodTray .foodToken,
.app.isStageTraySide .stageFoodTray .foodToken {
  height: 82px;
  min-height: 0;
  grid-template-rows: 42px 1fr;
  padding: 6px 5px 5px;
}

.stageFoodTray .foodOrb,
.app.isStageTraySide .stageFoodTray .foodOrb {
  width: 42px;
  height: 42px;
}

.stageFoodTray .foodName,
.app.isStageTraySide .stageFoodTray .foodName {
  display: block;
}

.sidePanel {
  height: auto;
  display: grid;
  grid-template-rows: auto auto;
  overflow: visible;
  overflow-x: clip;
}

.meterGrid {
  display: none;
}

.tabBar {
  min-width: 0;
  max-width: 100%;
}

.panelContent {
  overflow: visible;
}

@media (max-width: 720px) {
  .stageFoodTray,
  .app.isStageTraySide .stageFoodTray {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }
}

@media (max-width: 560px) {
  .app {
    width: min(1024px, calc(100vw - 8px));
    padding: max(6px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom));
    gap: 8px;
  }

  .topbar {
    padding: 8px;
    gap: 8px;
  }

  .titleBlock {
    flex-basis: 210px;
  }

  .topActions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .stageFoodTray,
  .app.isStageTraySide .stageFoodTray {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .stageFoodTray .foodToken,
  .app.isStageTraySide .stageFoodTray .foodToken {
    height: 82px;
    grid-template-rows: 42px 1fr;
  }

  .stageFoodTray .foodName,
  .app.isStageTraySide .stageFoodTray .foodName {
    display: block;
    font-size: 17px;
  }
}

@media (max-width: 560px) {
  .modalHeader h2 {
    font-size: 24px;
  }

  .modalBody {
    padding: 12px;
  }

  .noticeItem {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .noticeIcon {
    width: 40px;
    height: 40px;
  }

  .noticeMeta {
    font-size: 13px;
  }

  .noticeMessage {
    font-size: 17px;
  }

  .aboutLogo {
    height: clamp(220px, 58vw, 270px);
    min-height: 0;
    max-height: 44dvh;
  }

  .aboutMeta {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .aboutMeta span,
  .aboutMeta span:nth-child(2),
  .aboutMeta span:nth-child(3) {
    min-height: 32px;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .aboutModal {
    max-height: calc(100dvh - 12px);
  }

  .aboutModal .modalHeader,
  .aboutModal .modalActions {
    padding: 8px 10px;
  }

  .aboutModal .modalBody {
    padding: 10px;
  }

  .aboutLogo {
    height: clamp(165px, 40vw, 220px);
    min-height: 0;
    max-height: 52dvh;
  }

  .aboutMeta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .aboutMeta span {
    min-height: 28px;
    padding-block: 4px;
    font-size: 13px;
  }
}
