:root {
  color-scheme: light;
  --ink: #65544f;
  --muted: #967d76;
  --cream: rgba(255, 250, 241, .78);
  --line: rgba(133, 99, 88, .16);
  --peach: #e99d87;
  --sage: #8ca67c;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background: linear-gradient(155deg, #d9cfea 0%, #f8d5c8 42%, #fbe4c8 100%);
}
button { font: inherit; color: inherit; }

#app { position: relative; width: 100%; height: 100%; isolation: isolate; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
.wash {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 74% 16%, rgba(255,244,209,.12), transparent 27%),
    linear-gradient(90deg, rgba(255,239,232,.05), transparent 34%, transparent 74%, rgba(230,210,235,.05));
  box-shadow: inset 0 0 120px rgba(129, 89, 105, .07);
}

.panel {
  position: absolute; z-index: 3;
  border: 1px solid rgba(255,255,255,.58);
  background: linear-gradient(145deg, rgba(255,252,246,.84), rgba(255,247,239,.64));
  box-shadow: 0 18px 50px rgba(121,82,75,.12), inset 0 1px rgba(255,255,255,.75);
  backdrop-filter: blur(18px) saturate(1.08);
}

.brand {
  top: 26px; left: 28px; padding: 10px 15px 10px 11px; border-radius: 17px;
  display: flex; gap: 10px; align-items: center;
}
.brand-mark {
  display: grid; place-items: center; width: 35px; height: 35px; border-radius: 12px;
  color: white; background: linear-gradient(145deg, #e9a28c, #ce7e79); box-shadow: 0 5px 12px rgba(192,113,101,.24);
}
.brand strong { display: block; font-family: "Segoe Print", "Malgun Gothic", cursive; font-size: 20px; line-height: 18px; }
.brand small { font-size: 9px; color: var(--muted); letter-spacing: .08em; }

.intro { top: 115px; left: 28px; width: 260px; padding: 23px 24px 25px; border-radius: 25px; }
.eyebrow { margin: 0 0 9px; color: #b2776c; font-size: 9px; font-weight: 700; letter-spacing: .19em; }
.intro h1 { margin: 0 0 13px; font: 700 33px/1.08 "Segoe Print", "Malgun Gothic", cursive; letter-spacing: -.045em; color: #594944; }
.intro p:last-child { margin: 0; font-size: 11px; line-height: 1.85; color: #917870; }

.mode-panel { top: 26px; right: 28px; width: 310px; padding: 17px; border-radius: 23px; }
.mode-copy { display: flex; justify-content: space-between; align-items: baseline; margin: 0 3px 11px; }
.mode-copy > span { font-size: 9px; font-weight: 700; letter-spacing: .16em; color: #aa7b70; }
.mode-copy > strong { font: 700 17px "Segoe Print", "Malgun Gothic", cursive; color: #765e56; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.segmented button {
  min-width: 0; border: 1px solid transparent; border-radius: 15px; padding: 10px 9px;
  background: rgba(224,204,195,.22); display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer;
  transition: transform .2s, background .25s, border-color .25s, box-shadow .25s;
}
.segmented button:hover { transform: translateY(-1px); }
.segmented button.active { background: rgba(255,255,255,.7); border-color: rgba(219,153,134,.34); box-shadow: 0 6px 15px rgba(154,105,92,.1); }
.mode-icon { flex: 0 0 auto; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 10px; color: white; background: #d9917c; }
.low-icon { background: #91a47a; clip-path: polygon(50% 0,100% 27%,90% 82%,50% 100%,10% 82%,0 27%); transform: scale(.75); }
.detail-icon { font-size: 13px; }
.segmented strong { display: block; white-space: nowrap; font-size: 11px; }
.segmented small { display: block; white-space: nowrap; margin-top: 2px; color: #a18b83; font-size: 8px; }
#mode-description { margin: 10px 4px 0; color: #9c8179; font-size: 9px; line-height: 1.5; }

.weather { left: 28px; bottom: 28px; padding: 11px 16px 11px 12px; border-radius: 18px; display: flex; align-items: center; gap: 10px; }
.weather .sun { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #d69a58; background: #fff1c8; }
.weather strong, .weather small { display: block; }
.weather strong { font-size: 11px; }
.weather small { margin-top: 2px; font-size: 8px; color: #9b8179; }

.controls { right: 28px; bottom: 28px; padding: 7px; border-radius: 19px; display: flex; gap: 5px; }
.controls button {
  width: 76px; border: 0; border-radius: 13px; padding: 8px 5px; background: transparent; cursor: pointer;
  transition: background .2s, transform .2s;
}
.controls button:hover, .controls button.active { background: rgba(255,255,255,.62); }
.controls button:hover { transform: translateY(-1px); }
.controls button > span:first-child { display: block; font-size: 18px; line-height: 18px; color: #aa766b; }
.controls button > span:last-child { display: block; margin-top: 4px; color: #806a63; font-size: 8px; }

.hint {
  position: absolute; z-index: 3; left: 50%; bottom: 34px; transform: translateX(-50%); margin: 0;
  padding: 9px 15px; border: 1px solid rgba(255,255,255,.45); border-radius: 99px;
  color: rgba(102,79,72,.66); background: rgba(255,248,240,.38); backdrop-filter: blur(9px); font-size: 9px; white-space: nowrap;
}
.hint i { display: inline-block; width: 1px; height: 9px; margin: 0 8px -2px; background: rgba(124,91,82,.22); }

#loading {
  position: absolute; z-index: 9; inset: 0; display: grid; place-content: center; justify-items: center; gap: 11px;
  background: linear-gradient(145deg,#decfe7,#f5d1c4 52%,#f9dfbf); transition: opacity .65s, visibility .65s;
}
#loading.done { opacity: 0; visibility: hidden; }
.loader-flower { color: white; font-size: 35px; filter: drop-shadow(0 4px 9px rgba(137,91,84,.18)); animation: turn 2.4s linear infinite; }
#loading strong { font: 700 18px "Segoe Print", "Malgun Gothic", cursive; color: #745c55; }
.loading-line { width: 120px; height: 3px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.34); }
.loading-line i { display: block; width: 45%; height: 100%; border-radius: inherit; background: white; animation: load 1.2s ease-in-out infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes load { 0% { transform: translateX(-110%); } 100% { transform: translateX(250%); } }

#toast { position: absolute; z-index: 8; left: 50%; top: 24px; transform: translate(-50%,-12px); opacity: 0; padding: 9px 15px; border-radius: 99px; background: rgba(91,73,68,.78); color: white; font-size: 10px; transition: .25s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%,0); }
noscript { position: absolute; z-index: 20; inset: auto 20px 20px; padding: 15px; background: white; border-radius: 12px; }

@media (max-width: 760px) {
  .brand { top: 14px; left: 14px; }
  .intro { top: 85px; left: 14px; width: 215px; padding: 18px; }
  .intro h1 { font-size: 28px; }
  .intro p:last-child { display: none; }
  .mode-panel { top: auto; right: 14px; bottom: 82px; width: 276px; }
  .weather { display: none; }
  .controls { right: 14px; bottom: 14px; }
  .hint { left: 14px; bottom: 18px; transform: none; max-width: calc(100% - 280px); overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 520px) {
  .intro { width: 190px; }
  .mode-panel { left: 14px; right: 14px; width: auto; }
  .hint { display: none; }
  .controls button { width: 66px; }
}

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