@import url("./responsive.css");
:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #30233f;
  background: #f6f2fb;
  font-synthesis: none;
  --purple: #7650b5;
  --pink: #e175a7;
  --muted: #85788f;
  --line: #e8dff0;
  --radius: 24px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 90% 0, #eadbfc 0, transparent 48%),
    radial-gradient(ellipse at 0 70%, #fce5ed 0, transparent 40%), #f6f2fb;
  min-height: 100vh;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #9864d9;
  outline-offset: 4px;
}
button {
  touch-action: manipulation;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -1.8px;
  font-weight: 850;
  margin-bottom: 20px;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.6;
}
em {
  color: var(--purple);
  font-style: normal;
}
.site-header {
  max-width: 1440px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
}
.brand {
  font-weight: 900;
  font-size: 25px;
  letter-spacing: -1px;
  border: 0;
  background: none;
  color: #39294d;
}
.brand span {
  color: var(--pink);
}
.brand .brand-heart {
  font-size: 13px;
  vertical-align: top;
  margin-left: 5px;
}
.header-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.prototype-badge {
  border: 1px solid #ded2ea;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #786788;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 20px 40px 40px;
  min-height: 75vh;
}
.site-footer {
  max-width: 1360px;
  margin: auto;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 11px;
  color: var(--muted);
}
.site-footer span:last-child {
  max-width: 470px;
  text-align: right;
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #937b9e;
  margin-bottom: 16px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  transition:
    transform 0.15s,
    background 0.15s;
  text-decoration: none;
}
.button:hover {
  transform: translateY(-1px);
}
.primary {
  background: #7852b3;
  color: white;
  box-shadow:
    0 5px 0 #593c8b,
    0 10px 24px #7351a321;
}
.primary:hover {
  background: #6942a2;
}
.secondary {
  background: white;
  color: #705294;
  border-color: #ded2e9;
}
.text-button {
  border: 0;
  background: none;
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  padding: 10px;
}
.quiet {
  color: var(--muted);
  font-size: 12px;
}
.center {
  text-align: center;
}
.panel {
  background: #fffdfc;
  border: 1px solid #eee6f0;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 10px 45px #57336906;
}
.welcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  min-height: 650px;
  max-width: 1120px;
  margin: 0 auto;
}
.welcome h1 {
  font-size: clamp(3rem, 5.8vw, 5rem);
  letter-spacing: -3px;
}
.welcome-copy > p {
  max-width: 410px;
  color: #81708b;
  font-size: 17px;
}
.welcome-actions {
  display: flex;
  gap: 12px;
  margin: 30px 0 25px;
  flex-wrap: wrap;
}
.welcome-device,
.device {
  background: linear-gradient(135deg, #d9c7ef, #c5ace3 65%, #dfc7ed);
  border: 3px solid #e8d9f7;
  border-radius: 90px 90px 65px 65px;
  padding: 25px;
  box-shadow:
    inset 0 4px 0 #f8efff,
    0 16px 0 #baa1d4,
    0 35px 70px #74508c22;
  position: relative;
}
.welcome-device {
  transform: rotate(3deg);
  max-width: 450px;
}
.device-heart {
  text-align: center;
  color: #c96a9c;
  font-size: 23px;
  text-shadow: 1px 2px #fff8;
}
.device-title {
  text-align: center;
  font-weight: 950;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -1px;
  color: #4c366c;
  margin: 10px 0 20px;
  text-shadow: 0 2px #fff9;
}
.device-title span {
  color: #b86997;
}
.device-caption {
  text-align: center;
  padding: 24px 10px;
  font-size: 16px;
  font-weight: 700;
  color: #66517b;
}
.device-buttons {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 0 0 10px;
}
.device-buttons i {
  height: 25px;
  width: 25px;
  background: #f4db8c;
  border-radius: 50%;
  box-shadow: 0 4px #a9956f;
}
.device-buttons i:nth-child(2) {
  background: #df9fbe;
}
.device-buttons i:nth-child(3) {
  background: #9fc9c2;
}
.scene {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2.12;
  border-radius: 16px;
  background: #dfcbe2;
}
.scene img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  transform: translateY(-33.7%);
}
.scene-event img {
  transform: translateY(-33%);
}
.scene-week {
  aspect-ratio: 2.05;
}
.scene-week img {
  transform: translateY(-32.3%);
}
.welcome .scene {
  aspect-ratio: 1.5;
}
.setup,
.intro {
  max-width: 760px;
  margin: 30px auto;
}
.setup .primary,
.intro > .primary {
  width: 100%;
  margin-top: 25px;
}
.difficulty-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 25px 0;
}
.difficulty {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
}
.difficulty:has(input:checked) {
  background: #f0e8fa;
  border-color: #b699d6;
}
.difficulty small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.difficulty input {
  accent-color: var(--purple);
}
.check {
  font-size: 14px;
}
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 25px;
}
.intro-grid article {
  background: #f8f4fb;
  border-radius: 18px;
  padding: 22px;
}
.intro-grid b {
  color: #b398ca;
  font-size: 24px;
}
.intro-grid h3 {
  margin: 10px 0;
}
.intro-grid p {
  font-size: 14px;
  margin-bottom: 0;
  color: #796d85;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 15px;
}
.section-heading p {
  color: var(--muted);
}
.stamp {
  background: #f2e9fb;
  border-radius: 50%;
  width: 95px;
  height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: 35px;
  flex-shrink: 0;
}
.stamp small {
  font-size: 8px;
  letter-spacing: 1px;
}
.plan-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 45px;
}
.week-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 5px 0 20px;
}
.week-facts span {
  font-size: 11px;
  background: #f3edf8;
  border-radius: 20px;
  padding: 7px 11px;
  color: #7c658e;
}
.day-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 22px;
}
.day-tabs button {
  flex: 1;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 5px;
  color: #806d90;
  font-size: 13px;
}
.day-tabs small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  opacity: 0.7;
}
.day-tabs .selected {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}
.agenda-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid #f0eaf5;
}
.agenda-row time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #9884a4;
  min-width: 38px;
}
.activity-icon {
  width: 28px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #f1eafa;
  color: #9579ad;
  border-radius: 9px;
  flex-shrink: 0;
}
.agenda-text {
  flex: 1;
  min-width: 0;
}
.agenda-text strong {
  font-size: 12px;
  display: block;
  line-height: 1.4;
}
.agenda-text small {
  font-size: 10px;
  color: #9b8ba5;
  display: block;
  margin-top: 3px;
}
.agenda-row.done {
  opacity: 0.48;
}
.agenda-row.done strong {
  text-decoration: line-through;
}
.agenda-row.current {
  background: #f4edf9;
  border-radius: 8px;
}
.lock {
  color: #baabc4;
  font-size: 13px;
}
.icon-button {
  border: 1px solid var(--line);
  background: #fbf8ff;
  color: var(--purple);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 21px;
}
.plan-aside {
  background: #f8f2fa;
  border-radius: 20px;
  padding: 18px;
  align-self: start;
}
.plan-aside h3 {
  margin-top: 24px;
}
.plan-aside p {
  font-size: 14px;
  color: #82718e;
}
.plan-aside .button {
  width: 100%;
  margin-top: 15px;
}
.calendar-hint {
  font-size: 12px;
  color: #6e947d;
  margin-top: 20px;
}
.warning {
  background: #fff3df;
  color: #8e6c3a;
  padding: 15px;
  border-radius: 12px;
  font-size: 12px;
  margin-top: 20px;
}
.warning ul {
  padding-left: 18px;
  margin-bottom: 0;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(350px, 1.6fr) minmax(
      230px,
      1fr
    );
  gap: 25px;
  align-items: start;
}
.side-agenda,
.side-stats {
  margin-top: 35px;
  padding: 22px;
}
.side-agenda h2 {
  font-size: 16px;
}
.device {
  padding: 22px;
  border-radius: 70px 70px 50px 50px;
}
.device-screen {
  border: 5px solid #a88dc4;
  background: #fffcf5;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px #58486120;
}
.screen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 16px;
  gap: 8px;
  font-size: 12px;
  color: #83708f;
}
.paused {
  background: #f1eafa;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 10px;
  color: #8a70a2;
  white-space: nowrap;
}
.device-screen .scene {
  border-radius: 0;
}
.screen-message {
  padding: 24px 20px 20px;
  text-align: center;
  min-height: 160px;
}
.screen-message .eyebrow {
  font-size: 9px;
  margin-bottom: 12px;
}
.screen-message h2 {
  font-size: 22px;
}
.screen-message p {
  font-size: 12px;
  color: #94829d;
  margin: 0;
}
.device-action {
  padding: 20px 8px 12px;
}
.device-action .button {
  width: 100%;
  background: #785297;
}
.device-shortcuts {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.round {
  background: #f7ecff9c;
  border-color: #e6d6f3;
  color: #6d5687;
  font-size: 10px;
  padding: 7px 12px;
  min-height: 36px;
  border-radius: 20px;
}
.stats {
  display: grid;
  gap: 20px;
  margin: 24px 0;
}
.stat {
  display: flex;
  gap: 12px;
  align-items: center;
}
.stat-icon {
  font-size: 27px;
  width: 25px;
  flex-shrink: 0;
  color: #a187bc;
}
.stat-body {
  flex: 1;
  min-width: 0;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.stat-label strong {
  font-size: 12px;
}
.stat-label small {
  font-size: 10px;
  color: #96869f;
}
progress {
  display: block;
  width: 100%;
  height: 9px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #eee9f0;
  appearance: none;
}
progress::-webkit-progress-bar {
  background: #eee9f0;
  border-radius: 10px;
}
progress::-webkit-progress-value {
  background: #b09bda;
  border-radius: 10px;
}
.energy progress::-webkit-progress-value {
  background: #e0b75e;
}
.mood progress::-webkit-progress-value {
  background: #d888b1;
}
.garmin progress::-webkit-progress-value {
  background: #7fbdb6;
}
progress::-moz-progress-bar {
  background: #b09bda;
  border-radius: 10px;
}
.note {
  padding: 16px;
  background: #f5f0f9;
  border-radius: 14px;
  margin-top: 24px;
  font-size: 12px;
  color: #8c7899;
}
.note b {
  font-size: 12px;
  color: #705782;
}
.note p {
  margin: 8px 0 0;
  font-size: 11px;
}
.note .button {
  font-size: 11px;
  margin-top: 12px;
}
.notice {
  max-width: 650px;
  text-align: center;
  margin: 35px auto 0;
  font-size: 13px;
  color: #8a7498;
  background: #ffffff70;
  border-radius: 15px;
  padding: 14px;
}
.mobile-panels {
  display: none;
}
.event-screen,
.summary-screen {
  max-width: 720px;
  margin: 10px auto;
  padding: 30px;
}
.event-screen h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  text-align: center;
  margin: 20px 10px 24px;
}
.event-screen .screen-top {
  padding: 0;
}
.event-description {
  text-align: center;
  font-size: 17px;
  margin: 22px 0;
}
.choices {
  display: grid;
  gap: 14px;
}
.choice {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #dcc9ee;
  background: #fff;
  border-radius: 18px;
  padding: 19px;
  color: inherit;
  transition:
    background 0.15s,
    transform 0.15s;
}
.choice:hover {
  background: #fcf8ff;
  transform: translateY(-2px);
  border-color: #a781cb;
}
.choice-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.choice-heading > strong {
  font-size: 16px;
}
.time-chip {
  font-size: 12px;
  color: #775294;
  background: #f0e6fa;
  border-radius: 10px;
  padding: 7px 10px;
  white-space: nowrap;
}
.effects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.effect {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 8px;
  padding: 10px 3px;
  border-radius: 10px;
}
.effect-label {
  font-size: 10px;
  font-weight: 600;
}
.effect > strong {
  font-size: 20px;
}
.neutral {
  background: #f3f1f5;
  color: #8d8494;
}
.negative {
  background: #fff0ed;
  color: #b87065;
}
.positive {
  background: #eaf5ed;
  color: #528766;
}
.choice-note {
  display: block;
  border-top: 1px solid var(--line);
  padding-top: 11px;
  margin-top: 12px;
  font-size: 11px;
  color: #9a7e84;
}
.event-symbol {
  text-align: center;
  font-size: 80px;
  color: #9875bb;
  background: #f2e9f8;
  padding: 35px;
  border-radius: 20px;
}
.summary-screen > h1 {
  text-align: center;
}
.summary-screen > .eyebrow {
  text-align: center;
}
.summary-screen > h2 {
  text-align: center;
  font-size: 17px;
  margin: 22px 0;
}
.summary-screen > .button {
  width: 100%;
  margin-top: 15px;
}
.recap {
  background: #f8f3fa;
  border-radius: 13px;
  padding: 12px 18px;
  margin-bottom: 25px;
}
.recap p {
  font-size: 12px;
  color: #927e9b;
  margin: 5px 0;
}
.sleep-panel {
  background: #f5edf9;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.sleep-panel label {
  font-size: 12px;
}
.sleep-panel strong {
  font-size: 14px;
}
.sleep-panel small {
  flex-basis: 100%;
  font-size: 11px;
  color: var(--muted);
}
select,
input[type="time"] {
  border: 1px solid #dccce8;
  padding: 10px;
  border-radius: 9px;
  background: white;
  color: #55416a;
}
.result-card {
  background: #fff8ed;
  border: 1px solid #ecddc7;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
}
.result-card h1 {
  font-size: 38px;
  margin-bottom: 12px;
}
.result-card > p {
  font-size: 13px;
  color: #967f8a;
}
.result-facts {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 20px 0;
}
.result-facts span {
  font-size: 12px;
  color: #88728f;
}
.result-facts b {
  display: block;
  font-size: 22px;
  color: #7d5c99;
}
.summary-screen > h3 {
  margin-top: 25px;
}
.app-dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 25px;
  max-width: 620px;
  width: calc(100% - 28px);
  max-height: 88vh;
  overflow: auto;
  color: inherit;
  background: #fffdfb;
  box-shadow: 0 30px 100px #30203d40;
}
.app-dialog::backdrop {
  background: #38234760;
  backdrop-filter: blur(5px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  margin: 0;
}
.app-dialog form {
  display: grid;
  gap: 16px;
}
.app-dialog form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.app-dialog > .button {
  margin: 8px;
}
.view-list {
  display: grid;
  gap: 10px;
}
.preview-banner {
  background: #fff2d8;
  padding: 14px;
  border-radius: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 13px;
}
.preview-banner .button {
  min-height: 35px;
  font-size: 12px;
}
.affirmation {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(370px, calc(100% - 32px));
  padding: 18px 22px;
  background: #fffdf8;
  border: 1px solid #e6d4eb;
  border-radius: 18px;
  box-shadow: 0 12px 50px #54386930;
  z-index: 20;
  pointer-events: none;
}
.affirmation strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ac82a0;
}
.affirmation p {
  font-size: 14px;
  margin: 8px 0 0;
  color: #6f567c;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Show only the approved illustration, never the text embedded in its source mockup. */
.scene img {
  width: 112%;
  left: -6%;
}
.welcome .scene {
  aspect-ratio: 2.05;
}
.scene-event {
  aspect-ratio: 2.5;
}
.scene-event img {
  transform: translateY(-33.5%);
}
.scene-day {
  aspect-ratio: 2.45;
}
.scene-day img {
  transform: translateY(-34%);
}
main {
  container-type: inline-size;
  container-name: game;
}
.phone-preview main {
  width: 410px;
  max-width: 100%;
  padding: 12px 14px 30px;
}
@media (max-width: 500px) {
  .header-actions {
    gap: 0;
  }
  .prototype-badge {
    display: none;
  }
  .header-actions .text-button {
    font-size: 11px;
    padding: 8px;
  }
}

.scene.activity-scene,
.device-screen .scene.activity-scene {
  aspect-ratio: 3 / 2;
}
.scene.activity-scene img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}
.artwork-dialog {
  width: calc(100% - 40px);
  max-width: 1200px;
}
.artwork-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.artwork-gallery figure {
  margin: 0;
}
.artwork-gallery figcaption {
  padding: 8px 0;
  font-weight: 600;
}

/* Device styling follows the approved egg-shaped handheld mockup. */
body .device {
  position: relative;
  border-radius: 46% 46% 39% 39% / 23% 23% 20% 20%;
  padding: 38px 30px 34px;
  border: 4px solid #e9cbff;
  background:
    radial-gradient(ellipse at 28% 10%, #f5e4ff80, transparent 46%),
    linear-gradient(125deg, #dcc0fa, #c39bed 55%, #ae7bd9);
  box-shadow:
    inset 5px 5px 3px #fff8,
    inset -7px -10px 12px #814bab55,
    0 12px 0 #9869bd,
    0 24px 42px #56307735;
}
body .device .device-heart {
  color: #ec70b7;
  text-shadow: 2px 2px #542b79;
  font-size: 22px;
  margin-bottom: 8px;
}
body .device .device-title {
  font-weight: 950;
  color: #ffe674;
  text-shadow:
    2px 2px 0 #472466,
    -1px -1px 0 #472466;
  font-size: 30px;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
body .device .device-title span {
  color: #ff83c8;
}
body .device .device-screen {
  position: relative;
  border: 7px solid #6e547f;
  border-radius: 23px;
  background: #d6e9a0;
  box-shadow:
    0 0 0 4px #f1d8ff80,
    inset 0 3px 10px #314b4a55;
}
.device .screen-top,
.device .screen-message {
  background: #d7e8a4;
  color: #31452b;
}
.device .screen-top {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  border-bottom: 2px solid #6f8755;
}
.device .screen-message {
  min-height: 120px;
  padding: 18px 12px;
}
.device .screen-message p,
.device .screen-message .eyebrow {
  color: #536742;
}
.device .paused {
  background: #b7d17e;
  color: #39532c;
}
.gotchi-controls {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 24px;
}
.gotchi-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: #3e2257;
  font-size: 12px;
  font-weight: 750;
}
.gotchi-key {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #65417d;
  font-size: 24px;
  color: #4d2b66;
  box-shadow:
    inset 3px 4px 3px #fffc,
    inset -3px -4px 5px #61437750,
    0 5px 0 #8f5eaf;
  transition:
    transform 0.1s,
    box-shadow 0.1s;
}
.gotchi-key:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    inset 2px 3px 6px #61437750,
    0 2px 0 #8f5eaf;
}
.gotchi-key.pink {
  background: #f576c6;
}
.gotchi-key.yellow {
  background: #ffdd38;
}
.gotchi-key.cyan {
  background: #39d3e6;
}
.device-idle-hint {
  font-size: 11px;
  text-align: center;
  color: #523968;
  margin: 18px 4px 0;
}
body .affirmation {
  left: 50%;
  top: 43%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 32px));
  padding: 24px 40px 24px 24px;
  text-align: center;
  border: 3px solid #d1a5ed;
  background: #fffcf3;
  box-shadow:
    0 16px 65px #52326b55,
    inset 0 0 0 4px #f4e7fc;
  z-index: 50;
}
body .affirmation p {
  font-size: 18px;
  line-height: 1.5;
  color: #533866;
}
.affirmation-close {
  position: absolute;
  right: 8px;
  top: 7px;
  border: 0;
  border-radius: 50%;
  background: #efe1f8;
  color: #67417e;
  font-size: 22px;
  width: 30px;
  height: 30px;
  pointer-events: auto;
}
@media (max-width: 760px) {
  body .device {
    padding: 30px 18px 28px;
    border-radius: 45% 45% 37% 37% / 20% 20% 17% 17%;
  }
  .gotchi-controls {
    gap: 23px;
  }
  .gotchi-key {
    width: 58px;
    height: 58px;
  }
}
@container game (max-width:760px) {
  body .device {
    padding: 30px 18px 28px;
    border-radius: 45% 45% 37% 37% / 20% 20% 17% 17%;
  }
  .gotchi-controls {
    gap: 23px;
  }
  .gotchi-key {
    width: 58px;
    height: 58px;
  }
}

/* Fixed shell geometry: activity text and optional hints never resize the toy.
   Only the viewport breakpoint changes the device size. */
body .device {
  width: min(100%, 480px);
  height: 690px;
  min-width: 0;
  justify-self: center;
  display: grid;
  grid-template-rows: 28px 54px minmax(0, 1fr) 44px 100px;
  padding: 38px 34px 42px;
  border-radius: 50% 50% 43% 43% / 34% 34% 50% 50%;
}
body .device .device-heart,
body .device .device-title {
  margin: 0;
  align-self: center;
}
body .device .device-screen {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr) 110px;
}
.device .screen-top {
  padding: 8px 12px;
}
body .device-screen .scene.activity-scene {
  aspect-ratio: auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #d7e8a4;
}
body .device-screen .scene.activity-scene img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.device .screen-message {
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
}
.device .screen-message .eyebrow {
  margin-bottom: 6px;
}
.device .screen-message h2 {
  font-size: 20px;
  line-height: 1.15;
  margin: 0 0 8px;
}
.device .device-idle-hint {
  grid-row: 4;
  margin: 0;
  align-self: center;
}
.device .gotchi-controls {
  grid-row: 5;
  margin: 0;
  align-items: start;
  padding-top: 6px;
}
.device .gotchi-control:nth-child(2) {
  margin-top: 12px;
}
.device .gotchi-key.pink {
  font-family: Arial, sans-serif;
  font-weight: 900;
}
@media (max-width: 760px) {
  body .device {
    height: 640px;
    padding: 32px 22px 36px;
  }
}
@container game (max-width:760px) {
  body .device {
    height: 640px;
    padding: 32px 22px 36px;
  }
}
/* Draw two pause bars without relying on a font's Roman numeral glyph. */
.device .gotchi-key.pink {
  font-size: 0;
}
.device .gotchi-key.pink::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 22px;
  border-left: 6px solid currentColor;
  border-right: 6px solid currentColor;
  box-sizing: border-box;
  vertical-align: middle;
}
/* Illustrated housing from the approved mockup. All interactive content stays HTML.
   Absolute slots keep the shell independent of activity text and image dimensions. */
body .device {
  display: block;
  width: min(100%, 520px);
  height: auto;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("/assets/tamagotchi-shell-no-edition.png") center / 100% 100% no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 12px 12px #56307725);
}
body .device .device-heart,
body .device .device-title {
  display: none;
}
body .device .device-screen {
  position: absolute;
  left: 20.5%;
  top: 30%;
  width: 59.5%;
  height: 39%;
  border: 0;
  border-radius: 6%;
  box-shadow: inset 0 0 5px #314b4a55;
  grid-template-rows: 30px minmax(0, 1fr) 78px;
}
.device .screen-top {
  padding: 4px 7px;
  gap: 4px;
  font-size: 10px;
}
.device .paused {
  font-size: 8px;
  padding: 3px 5px;
}
.device .screen-message {
  padding: 7px;
}
.device .screen-message h2 {
  font-size: 16px;
  margin-bottom: 5px;
}
.device .screen-message p {
  font-size: 10px;
}
.device .screen-message .eyebrow {
  font-size: 8px;
  margin-bottom: 4px;
}
.device .device-idle-hint {
  position: absolute;
  top: 71%;
  left: 20%;
  width: 60%;
  font-size: 9px;
  line-height: 1.25;
  margin: 0;
}
.device .gotchi-controls {
  position: absolute;
  top: 77%;
  left: 21%;
  width: 58%;
  padding: 0;
  justify-content: space-between;
  gap: 0;
}
.device .gotchi-control {
  font-size: 11px;
  gap: 7px;
}
.device .gotchi-key {
  width: 58px;
  height: 58px;
}
@media (max-width: 760px) {
  .device .gotchi-key { width: 46px; height: 46px; }
  .device .gotchi-control { font-size: 9px; gap: 5px; }
  .device .screen-message h2 { font-size: 14px; }
  body .device .device-screen { grid-template-rows: 28px minmax(0, 1fr) 72px; }
}
@container game (max-width:760px) {
  .device .gotchi-key { width: 46px; height: 46px; }
  .device .gotchi-control { font-size: 9px; gap: 5px; }
  .device .screen-message h2 { font-size: 14px; }
  body .device .device-screen { grid-template-rows: 28px minmax(0, 1fr) 72px; }
}

/* Give the illustration the screen's remaining space, with a compact caption. */
body .device .device-screen {
  grid-template-rows: 26px minmax(0, 1fr) 48px;
}
.device .screen-message {
  padding: 4px 6px;
}
.device .screen-message .eyebrow {
  display: none;
}
.device .screen-message h2 {
  font-size: 15px;
  line-height: 1.1;
  margin: 0 0 3px;
}
.device .screen-message p {
  font-size: 10px;
  line-height: 1.2;
}
.notice.play-notice {
  max-width: 850px;
  margin: 0 auto 20px;
  padding: 14px 20px;
  border: 2px solid #9870c4;
  border-left: 7px solid #7850aa;
  background: #fff8df;
  color: #392746;
  box-shadow: 0 4px 14px #53327315;
  text-align: left;
  font-size: 15px;
  line-height: 1.45;
}
.play-notice strong {
  display: block;
  color: #624084;
  font-size: 12px;
  margin-bottom: 3px;
}
.value-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  flex: none;
  vertical-align: middle;
}
.effect {
  padding: 12px 6px;
  gap: 7px;
}
.effect-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.effect > strong {
  font-size: 24px;
}
.effect.negative { color: #934636; background: #fff0ea; }
.effect.positive { color: #28613e; background: #eaf5ed; }
.effect.neutral { color: #5d526a; background: #eeebf2; }
.stat-icon .value-icon { width: 27px; height: 27px; }
@media (max-width: 760px) {
  .effects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container game (max-width:760px) {
  .effects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The landing page shares the in-game housing and approved character artwork. */
body .device.welcome-device {
  transform: none;
  width: min(100%, 480px);
  max-width: 480px;
  margin-inline: auto;
}
body .device.welcome-device .device-screen {
  grid-template-rows: 24px minmax(0, 1fr) 38px;
}
body .welcome-device .screen-message {
  display: grid;
  place-items: center;
}
body .welcome-device .screen-message h2 {
  font-size: clamp(10px, 1.1vw, 14px);
  margin: 0;
}
body .welcome-device .welcome-decoration { margin: 0; }
body .welcome-device .welcome-decoration .pink::before { content: none; }
body .welcome-device .welcome-decoration .yellow { margin-top: 12px; }

.weekly-rating {text-align:left;margin:1.5rem 0;padding:1.25rem;border-radius:18px;background:#faf7ff}.rating-gradient{position:relative;height:18px;border-radius:12px;background:linear-gradient(90deg,#d3897d,#e5c779,#8abca0);margin:1.5rem 8px .5rem}.rating-gradient span{position:absolute;top:-5px;height:28px;width:5px;background:#342546;border:1px solid white;transform:translateX(-50%);border-radius:4px}.rating-scale{display:flex;justify-content:space-between;font-size:.8rem}.rating-part{display:grid;gap:.4rem;margin-top:1rem}.rating-part progress{width:100%;accent-color:#7656ab}.rating-part small{color:#514a5d}

/* Extra utility controls must wrap rather than widening a phone viewport. */
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; gap: 10px; }
  .header-actions { flex-wrap: wrap; gap: 8px 14px; }
  .header-actions [data-action="phone"] { display: none; }
}
.app-dialog label:has(input[name="key"]), .app-dialog label:has(#recovery-key) { display: grid; gap: 8px; }
.app-dialog input[name="key"], #recovery-key { width: 100%; min-width: 0; font-family: monospace; padding: 10px; }
.app-dialog input[type="range"] { display: block; width: 100%; margin: 12px 0 24px; }

/* Audio controls stay readable on narrow screens. */
.audio-volume { display: block; margin: .5rem 0 1.25rem; }
.audio-volume input { display: block; width: 100%; margin-top: .4rem; }
.audio-previews { display: flex; flex-wrap: wrap; gap: .6rem; }
