*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --text: #111; --line: #111; --bg: #fff8ec; --card: #fff; --muted: #555; --shadow: #111;
  --pink: #ff90e8; --yellow: #ffd23f; --green: #4ade80; --blue: #7ab8ff; --orange: #ff7a45;
  --acc-focus: #5b8def; --acc-short: #4ade80; --acc-long: #c4a1ff;
  --accent: var(--acc-focus);
  --b: 3px solid var(--line);
  --sh: 6px 6px 0 var(--shadow);
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --text: #f6efe2; --line: #000; --bg: #1c1b24; --card: #2a2834; --muted: #b5adc4; --shadow: #000;
  color-scheme: dark;
}
body[data-mode="short"] { --accent: var(--acc-short); }
body[data-mode="long"] { --accent: var(--acc-long); }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--sans); color: var(--text); background: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--text) 14%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1240px; margin: 0 auto; padding: 18px var(--gutter);
}
.logo { font-family: var(--pixel); font-weight: 700; font-size: 26px; color: inherit; text-decoration: none; letter-spacing: -0.01em; }
.logo span { display: inline-block; margin-left: 3px; padding: 0 7px; background: var(--acc-focus); color: #111; border: 2.5px solid var(--line); border-radius: 7px; transform: rotate(-3deg); transition: background 0.3s; }
.top-right { display: flex; align-items: center; gap: 10px; }
.now { font-family: var(--pixel); font-size: 18px; padding: 6px 12px; background: var(--card); border: var(--b); border-radius: 999px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; background: var(--card);
  border: var(--b); border-radius: 12px; box-shadow: 3px 3px 0 var(--shadow); transition: transform 0.1s, box-shadow 0.1s;
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.icon-btn:active { transform: translate(3px, 3px); box-shadow: none; }

/* ---------- layout ---------- */
.app {
  max-width: 1240px; margin: 0 auto; padding: 4px var(--gutter) 24px;
  display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.room-card, .panel, .mixer, .stats { background: var(--card); border: var(--b); border-radius: 20px; box-shadow: var(--sh); }

/* ---------- kamar ---------- */
.room-card { position: relative; overflow: hidden; line-height: 0; }
#room { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; image-rendering: pixelated; }
.room-tag {
  position: absolute; top: 14px; left: 14px; line-height: 1.2;
  font-family: var(--pixel); font-weight: 700; font-size: 16px; color: #111;
  padding: 5px 12px; background: var(--accent); border: 2.5px solid #111; border-radius: 999px;
  box-shadow: 3px 3px 0 #111; transform: rotate(-3deg); transition: background 0.3s;
}

/* ---------- timer ---------- */
.panel { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.modes { display: flex; gap: 6px; padding: 5px; background: var(--bg); border: var(--b); border-radius: 14px; }
.modes button {
  flex: 1; padding: 8px 6px; border: 2.5px solid transparent; border-radius: 10px; background: none;
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: background 0.15s;
}
.modes button:hover { border-color: var(--line); }
.modes button[aria-selected="true"] { background: var(--accent); color: #111; border-color: var(--line); }
.time {
  font-family: var(--pixel); font-weight: 700; text-align: center; line-height: 1;
  font-size: clamp(76px, 9vw, 124px); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; padding-top: 4px;
}
.bar { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; padding: 4px; border: var(--b); border-radius: 10px; background: var(--bg); }
.bar i { height: 14px; border-radius: 2px; background: color-mix(in srgb, var(--text) 10%, transparent); transition: background 0.3s; }
.bar i.on { background: var(--accent); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.round { margin: -4px 0 0; text-align: center; font-size: 14px; color: var(--muted); font-weight: 500; }

.controls { display: flex; gap: 12px; align-items: stretch; }
.btn {
  border: var(--b); border-radius: 14px; background: var(--card); font-weight: 700;
  box-shadow: 4px 4px 0 var(--shadow); transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
  display: inline-grid; place-items: center;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn.sq { width: 60px; flex: none; }
.btn.big { flex: 1; padding: 16px; background: var(--yellow); color: #111; font-family: var(--pixel); font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase; }
.btn.big.running { background: var(--card); color: var(--text); }
.btn.full { width: 100%; }
.btn.line { padding: 12px; box-shadow: none; }
.btn.line:hover { transform: none; box-shadow: 3px 3px 0 var(--shadow); }

.task { display: grid; gap: 6px; }
.task span { font-family: var(--pixel); font-size: 15px; }
.task input {
  width: 100%; padding: 12px 14px; border: var(--b); border-radius: 12px; background: var(--bg);
  font-size: 15px; font-weight: 500;
}
.task input::placeholder { color: var(--muted); opacity: 0.8; }

/* ---------- suara ---------- */
.mixer { padding: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: var(--b); border-radius: 999px; background: var(--card); font-weight: 700; font-size: 15px;
  box-shadow: 3px 3px 0 var(--shadow); transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
}
.chip:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.chip:active { transform: translate(3px, 3px); box-shadow: none; }
.chip.on { background: var(--accent); color: #111; }
#trackBtn { background: var(--yellow); color: #111; font-family: var(--pixel); font-weight: 500; }
#trackBtn.bump { animation: pop 0.35s; }
@keyframes pop { 40% { transform: scale(1.12) rotate(-4deg); } }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 100%; background: currentColor; border-radius: 1px; transform-origin: bottom; transform: scaleY(0.3); }
body.playing .music.on .eq i { animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s !important; }
.eq i:nth-child(3) { animation-delay: -0.6s !important; }
.eq i:nth-child(4) { animation-delay: -0.15s !important; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.vol { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; font-weight: 700; font-size: 14px; }
.vol input { flex: 1; }
.vol input { width: 130px; accent-color: var(--text); }

/* ---------- statistik ---------- */
.stats { padding: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 10px 12px; border: var(--b); border-radius: 14px; background: var(--bg); display: grid; gap: 2px; }
.stat b { font-family: var(--pixel); font-size: 32px; line-height: 1; }
.stat span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.stat:first-child { background: var(--accent); color: #111; }
.stat:first-child span { color: #111; }
.plant-note { grid-column: 1 / -1; margin: 2px 0 0; font-size: 14px; font-weight: 500; }

.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 8px var(--gutter) 36px; font-size: 13px; color: var(--muted); }
kbd { font-family: var(--pixel); font-size: 13px; padding: 1px 7px; border: 2px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); box-shadow: 2px 2px 0 var(--shadow); }

/* ---------- pengaturan ---------- */
.sheet {
  width: min(420px, calc(100vw - 32px)); padding: 24px; color: var(--text); background: var(--card);
  border: var(--b); border-radius: 20px; box-shadow: 8px 8px 0 var(--shadow);
}
.sheet::backdrop { background: rgba(17, 17, 17, 0.45); }
.sheet h2 { margin: 0 0 16px; font-family: var(--pixel); font-size: 26px; }
.sheet form { display: grid; gap: 14px; }
.fields { display: grid; gap: 10px; }
.fields label { display: grid; grid-template-columns: 1fr 76px 44px; align-items: center; gap: 10px; font-weight: 500; }
.fields input { padding: 8px 10px; border: var(--b); border-radius: 10px; background: var(--bg); font-family: var(--pixel); font-size: 18px; text-align: center; }
.fields em { font-style: normal; font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 40px)); z-index: 50;
  padding: 12px 18px; background: var(--text); color: var(--bg); border-radius: 12px; font-weight: 700;
  transition: transform 0.35s cubic-bezier(.3, 1.4, .5, 1), visibility 0.35s; max-width: calc(100vw - 32px); text-align: center;
  visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ---------- tombol mulai ---------- */
.btn.big { display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.btn.big .i-pause, .btn.big.running .i-play { display: none; }
.btn.big.running .i-pause { display: block; }

/* ---------- volume ---------- */
.vol input { -webkit-appearance: none; appearance: none; height: 14px; border: var(--b); border-radius: 999px; background: linear-gradient(var(--accent), var(--accent)) 0 / var(--v, 70%) 100% no-repeat, var(--bg); }
.vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border: var(--b); border-radius: 6px; background: var(--yellow); box-shadow: 2px 2px 0 var(--shadow); cursor: grab; }
.vol input::-moz-range-thumb { width: 18px; height: 18px; border: var(--b); border-radius: 6px; background: var(--yellow); box-shadow: 2px 2px 0 var(--shadow); cursor: grab; }

/* ---------- riwayat ---------- */
.log { padding: 18px 20px; background: var(--card); border: var(--b); border-radius: 20px; box-shadow: var(--sh); }

.log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 236px; overflow-y: auto; }
.log li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 9px 12px; border: 2.5px solid var(--line); border-radius: 12px; background: var(--bg); }
.log li:first-child:not(.empty) { animation: slideIn 0.4s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes slideIn { from { transform: translateY(-8px); opacity: 0; } }
.log time { font-family: var(--pixel); font-size: 16px; }
.log li span { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log li b { font-family: var(--pixel); font-weight: 500; font-size: 14px; padding: 1px 8px; background: var(--accent); color: #111; border: 2px solid var(--line); border-radius: 999px; }
.log li.empty { display: block; text-align: center; color: var(--muted); border-style: dashed; padding: 16px; }

/* ---------- perayaan ---------- */
.px { position: fixed; z-index: 60; width: 10px; height: 10px; border: 2px solid #111; pointer-events: none; }
.room-tag.pop { animation: tagPop 0.5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tagPop { 0% { transform: rotate(-3deg) scale(0.6); } 60% { transform: rotate(4deg) scale(1.15); } }

/* ---------- mode zen ---------- */
.room-tools { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 8px; }
body.zen .room-tools { left: auto; bottom: auto; top: 20px; right: 20px; }
.zen-btn { display: inline-flex; align-items: center; gap: 6px; line-height: 1;
  padding: 7px 11px; font-family: var(--pixel); font-size: 15px; color: #111; background: #fff8ec;
  border: 2.5px solid #111; border-radius: 10px; box-shadow: 3px 3px 0 #111; transition: transform 0.1s, box-shadow 0.1s;
}
.zen-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #111; }
.zen-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.zen-hud { display: none; }
body.zen { overflow: hidden; }
body.zen .room-card {
  position: fixed; inset: 0; z-index: 40; border: 0; border-radius: 0; box-shadow: none;
  display: grid; place-items: center; background: #111;
}
body.zen #room { width: min(100vw, calc(100vh * 16 / 9)); }
body.zen .room-tag { top: 20px; left: 20px; font-size: 20px; }
body.zen .zen-hud {
  display: grid; position: absolute; left: 20px; bottom: 20px; gap: 6px; line-height: 1; color: #111;
  padding: 14px 20px 16px; background: var(--accent); border: 3px solid #111; border-radius: 16px; box-shadow: 6px 6px 0 #111;
}
.zen-hud b { font-family: var(--pixel); font-size: clamp(48px, 8vw, 96px); font-variant-numeric: tabular-nums; }
.zen-hud span { font-weight: 700; font-size: 16px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- kamar yang bisa diklik ---------- */
#room { touch-action: manipulation; }
.spot-hint {
  position: absolute; left: 0; top: 0; pointer-events: none; line-height: 1.2; white-space: nowrap;
  font-family: var(--pixel); font-size: 14px; color: #111; padding: 3px 8px;
  background: #fff8ec; border: 2px solid #111; border-radius: 8px; box-shadow: 2px 2px 0 #111;
  opacity: 0; transition: opacity 0.12s;
}
.spot-hint.show { opacity: 1; }
.poke-hint {
  position: absolute; right: 14px; bottom: 14px; line-height: 1.2; pointer-events: none;
  font-family: var(--pixel); font-size: 14px; color: #111; padding: 4px 10px;
  background: var(--yellow); border: 2.5px solid #111; border-radius: 999px; box-shadow: 3px 3px 0 #111;
  transform: rotate(2deg); animation: nudge 2.4s ease-in-out infinite;
}
.poke-hint.gone { display: none; }
@keyframes nudge { 0%, 70%, 100% { transform: rotate(2deg); } 80% { transform: rotate(-3deg) translateY(-3px); } 90% { transform: rotate(4deg); } }
body.zen .poke-hint, body.zen .spot-hint { display: none; }

/* ---------- angka timer ---------- */
.time { display: flex; justify-content: center; }
.time span { display: inline-block; min-width: 0.6em; text-align: center; }
.time span:nth-child(3) { min-width: 0.32em; }
body:not(.zen) .panel .time span:nth-child(3) { animation: colon 1s steps(1) infinite; animation-play-state: paused; }
body.ticking .panel .time span:nth-child(3) { animation-play-state: running; }
@keyframes colon { 50% { opacity: 0.25; } }

/* ---------- grafik mingguan ---------- */
.week { grid-column: 1 / -1; padding: 12px 14px 10px; border: var(--b); border-radius: 14px; background: var(--bg); }
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.week-head h3 { margin: 0; font-size: 13px; font-weight: 700; }
.week-head span { font-family: var(--pixel); font-size: 15px; }
.week-chart { position: relative; }
.week-top { position: absolute; top: 0; left: 0; font-size: 10.5px; color: var(--muted); line-height: 1; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding-left: 22px; }
.wb { position: relative; display: grid; gap: 6px; justify-items: center; outline: none; cursor: default; }
.wb-plot {
  position: relative; width: 100%; height: 96px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 30%, transparent);
  background: linear-gradient(color-mix(in srgb, var(--text) 9%, transparent), color-mix(in srgb, var(--text) 9%, transparent)) 0 0 / 100% 1px no-repeat;
}
.wb-plot i { display: block; width: min(24px, 70%); min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--text) 55%, var(--bg)); transition: height 0.5s cubic-bezier(.3, 1.3, .5, 1); }
.wb.today .wb-plot i { background: var(--accent); }
.wb-plot b { font-family: var(--pixel); font-weight: 500; font-size: 13px; line-height: 1; margin-bottom: 4px; color: var(--text); }
.wb em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.wb.today em { color: var(--text); font-weight: 700; }
.wb:hover .wb-plot i, .wb:focus-visible .wb-plot i { filter: brightness(1.08); outline: 2px solid var(--text); outline-offset: 1px; }
.wb::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translate(-50%, 4px);
  white-space: nowrap; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 8px;
  background: var(--text); color: var(--bg); pointer-events: none; opacity: 0; transition: opacity 0.12s, transform 0.12s; z-index: 2;
}
.wb:hover::after, .wb:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.wb:first-child::after { left: 0; transform: translate(0, 4px); }
.wb:first-child:hover::after, .wb:first-child:focus-visible::after { transform: none; }
.wb:last-child::after { left: auto; right: 0; transform: translate(0, 4px); }
.wb:last-child:hover::after, .wb:last-child:focus-visible::after { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- tugas yang lagi dikerjain (di panel timer) ---------- */
.now-task {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "label pomo" "title title"; gap: 4px 10px; align-items: center;
  width: 100%; padding: 11px 14px; text-align: left; background: var(--bg); border: var(--b); border-radius: 14px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.now-task:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow); }
.nt-label { grid-area: label; font-family: var(--pixel); font-size: 14px; color: var(--muted); }
.nt-title { grid-area: title; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-task.none .nt-title { font-weight: 500; color: var(--muted); }
.nt-pomo { grid-area: pomo; justify-self: end; display: flex; gap: 3px; }
.nt-pomo i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); }
.nt-pomo i.full { background: var(--orange); }

/* ---------- daftar tugas ---------- */
.tasks { padding: 18px 20px; background: var(--card); border: var(--b); border-radius: 20px; box-shadow: var(--sh); display: grid; gap: 12px; }
.tasks-head { display: flex; justify-content: space-between; align-items: baseline; }

.tasks-head > span { font-family: var(--pixel); font-size: 15px; color: var(--muted); }
.task-add { display: flex; gap: 10px; }
.task-add input { flex: 1; min-width: 0; padding: 12px 14px; border: var(--b); border-radius: 12px; background: var(--bg); font-size: 15px; font-weight: 500; }
.task-add input::placeholder { color: var(--muted); opacity: 0.85; }
.btn.add { width: 50px; flex: none; background: var(--accent); color: #111; box-shadow: 3px 3px 0 var(--shadow); }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tk {
  position: relative; display: grid; grid-template-columns: 14px 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 10px 10px 10px 8px; background: var(--bg); border: 2.5px solid var(--line); border-radius: 14px;
  transition: background 0.2s, box-shadow 0.15s, transform 0.15s;
}
.tk.active { background: color-mix(in srgb, var(--accent) 38%, var(--card)); box-shadow: 3px 3px 0 var(--shadow); }
.tk.dragging { transform: rotate(-1.5deg) scale(1.02); box-shadow: 6px 6px 0 var(--shadow); z-index: 2; opacity: 0.95; }
.tk-grip {
  align-self: stretch; cursor: grab; touch-action: none; border-radius: 4px;
  background: radial-gradient(circle, var(--muted) 1.4px, transparent 1.6px) 0 50% / 7px 7px;
  opacity: 0.55; transition: opacity 0.15s;
}
.tk:hover .tk-grip { opacity: 1; }
.tk.dragging .tk-grip { cursor: grabbing; }
.tk-check {
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  background: var(--card); color: transparent; border: 2.5px solid var(--line); border-radius: 9px; transition: background 0.15s, color 0.15s, transform 0.1s;
}
.tk-check:hover { color: color-mix(in srgb, var(--text) 35%, transparent); }
.tk-check:active { transform: scale(0.88); }
.tk.ok .tk-check { background: var(--green); color: #111; }
.tk-main { min-width: 0; display: grid; gap: 6px; }
.tk-title {
  justify-self: start; max-width: 100%;
  padding: 0; background: none; border: 0; text-align: left; font-weight: 700; font-size: 15px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
  background-image: linear-gradient(var(--text), var(--text)); background-size: 0 2.5px; background-position: 0 55%; background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(.6, 0, .3, 1), color 0.2s;
}
.tk.ok .tk-title { color: var(--muted); background-size: 100% 2.5px; cursor: default; }
.tk-edit { width: 100%; padding: 4px 8px; font-weight: 700; font-size: 15px; border: 2.5px solid var(--line); border-radius: 8px; background: var(--card); }
.tk-pomo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tk-pomo small { margin-left: 4px; font-family: var(--pixel); font-size: 13px; color: var(--muted); }
.tomato {
  position: relative; width: 16px; height: 16px; padding: 0; border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--text) 45%, transparent); background: none; transition: transform 0.12s;
}
.tomato:hover { transform: scale(1.2); }
.tomato.full { border: 2px solid var(--line); background: var(--orange); }
.tomato.full::after { content: ""; position: absolute; top: -4px; left: 50%; width: 6px; height: 4px; transform: translateX(-50%); background: #3fa864; border-radius: 2px; }
.tomato.extra { background: var(--acc-focus); }
.tomato.add { border-style: solid; border-color: transparent; font-weight: 700; font-size: 14px; line-height: 12px; color: var(--muted); }
.tomato.add:hover { color: var(--text); border-color: var(--line); }
.tk.ok .tomato.add { display: none; }
.tk-now {
  position: absolute; top: -11px; right: 12px; font-family: var(--pixel); font-size: 12px; line-height: 1; color: #111;
  padding: 3px 8px; background: var(--yellow); border: 2px solid #111; border-radius: 999px; transform: rotate(2deg);
}
.tk-acts { display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; }
.tk:hover .tk-acts, .tk:focus-within .tk-acts { opacity: 1; }
.tk-acts button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; background: var(--card); border: 2px solid var(--line); border-radius: 8px; }
.tk-acts button:hover { background: var(--yellow); color: #111; }
.tk-acts button[data-act="del"]:hover { background: var(--orange); }
@media (hover: none) { .tk-acts { opacity: 1; } .tk-grip { opacity: 0.8; } }
.tk-empty { padding: 18px; text-align: center; color: var(--muted); border: 2.5px dashed color-mix(in srgb, var(--text) 35%, transparent); border-radius: 14px; font-size: 14.5px; }
.tasks-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 20px; font-size: 13px; color: var(--muted); font-weight: 500; }
.tasks-foot:has(#taskEta:empty):has(#clearDone[hidden]) { display: none; }
.link-btn { padding: 0; background: none; border: 0; font-weight: 700; font-size: 13px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.link-btn:hover { text-decoration-color: var(--accent); }

/* ---------- header: sapaan & target harian ---------- */
.top { gap: 18px; }
.hello { flex: 1; display: grid; gap: 1px; line-height: 1.2; padding-left: 6px; }
.hello b { font-family: var(--pixel); font-size: 19px; font-weight: 500; }
.hello span { font-size: 13px; color: var(--muted); font-weight: 500; }
.goal {
  display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 6px; background: var(--card);
  border: var(--b); border-radius: 999px; box-shadow: 3px 3px 0 var(--shadow); transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
}
.goal:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.goal-ring {
  --p: 0; width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--line);
  background: conic-gradient(var(--orange) calc(var(--p) * 1%), color-mix(in srgb, var(--text) 10%, transparent) 0);
  position: relative;
}
.goal-ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); }
.goal-txt { display: grid; text-align: left; line-height: 1.1; }
.goal-txt b { font-family: var(--pixel); font-size: 17px; }
.goal-txt small { font-size: 11px; color: var(--muted); font-weight: 500; }
.goal.hit { background: var(--green); color: #111; }
.goal.hit small { color: #111; }

.scene-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; font-weight: 700; font-size: 14px;
  background: var(--card); border: var(--b); border-radius: 12px; box-shadow: 3px 3px 0 var(--shadow); transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
}
.scene-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.scene-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.scene-btn svg { display: none; }
.scene-btn[data-scene="auto"] .i-auto, .scene-btn[data-scene="pagi"] .i-pagi, .scene-btn[data-scene="malam"] .i-malam { display: block; }
.scene-btn[data-scene="pagi"] { background: var(--yellow); color: #111; }
.scene-btn[data-scene="malam"] { background: #2e3a66; color: #fff8ec; }

/* ---------- titik sesi ---------- */
.round { display: flex; align-items: center; justify-content: center; gap: 10px; }
.round-dots { display: flex; gap: 6px; }
.round-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--text) 40%, transparent); }
.round-dots i.full { background: var(--orange); border-color: var(--line); }
.round-dots i.cur { border-color: var(--line); border-style: dashed; }
body.ticking .round-dots i.cur { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- pas fokus, yang nggak penting diredupin ---------- */
.mixer, .progress, .credit { transition: opacity 0.5s, filter 0.5s; }
body.focusing .mixer, body.focusing .progress, body.focusing .credit { opacity: 0.42; filter: saturate(0.4); }
body.focusing .mixer:hover, body.focusing .progress:hover, body.focusing .mixer:focus-within, body.focusing .progress:focus-within { opacity: 1; filter: none; }

/* ---------- hierarki kartu ---------- */
.mixer, .stats, .log, .tasks { box-shadow: 4px 4px 0 var(--shadow); }

/* ---------- transisi ganti mode ---------- */
.wipe { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none; visibility: hidden; background: var(--pink); }
.wipe[data-mode="short"] { background: var(--acc-short); }
.wipe[data-mode="long"] { background: var(--acc-long); }
.wipe[data-mode="focus"] { background: var(--acc-focus); }
.wipe.show { visibility: visible; animation: wipeIn 2.6s cubic-bezier(.7, 0, .3, 1) both; }
.wipe-card {
  display: grid; gap: 10px; text-align: center; padding: 28px 36px; max-width: min(560px, calc(100vw - 40px));
  background: #fff8ec; color: #111; border: 3px solid #111; border-radius: 22px; box-shadow: 8px 8px 0 #111; transform: rotate(-2deg);
}
.wipe.show .wipe-card { animation: cardPop 2.6s cubic-bezier(.3, 1.5, .5, 1) both; }
.wipe-card b { font-family: var(--pixel); font-size: clamp(34px, 6vw, 56px); line-height: 1; }
.wipe-card span { font-weight: 500; font-size: 17px; }
@keyframes wipeIn {
  0% { clip-path: inset(0 100% 0 0); }
  18%, 80% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}
@keyframes cardPop { 0%, 10% { transform: rotate(-2deg) scale(0.6); opacity: 0; } 25%, 80% { transform: rotate(-2deg) scale(1); opacity: 1; } 100% { transform: rotate(-2deg) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wipe.show { animation: none; } }

/* ---------- grafik kosong ---------- */
.week-empty { display: none; position: absolute; inset: 0 0 22px 22px; margin: 0; place-content: center; text-align: center; font-size: 13px; font-weight: 500; color: var(--muted); }
.week.empty .week-empty { display: grid; }
.week.empty .wb-plot i { opacity: 0; }

.credit { margin: -24px 0 0; padding: 0 var(--gutter) 40px; text-align: center; font-size: 13px; color: var(--muted); }
.credit a { color: var(--text); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.credit a:hover { text-decoration-color: var(--acc-focus); }

/* ---------- lemari baju ---------- */
.wardrobe { width: min(640px, calc(100vw - 24px)); }
.wd-grid { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.wd-stage { position: sticky; top: 0; border: var(--b); border-radius: 16px; overflow: hidden; background: #f6e6cc; box-shadow: 4px 4px 0 var(--shadow); }
.wd-label { display: block; padding: 6px 0 7px; text-align: center; font-family: var(--pixel); font-size: 13px; color: #111; background: var(--yellow); border-top: var(--b); }
#wdPreview { display: block; width: 100%; height: auto; aspect-ratio: 36 / 46; image-rendering: pixelated; }
.wd-opts { display: grid; gap: 12px; }
.wd-opts fieldset { margin: 0; padding: 0; border: 0; }
.wd-opts legend { padding: 0; margin-bottom: 7px; font-family: var(--pixel); font-size: 15px; }
.sw-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw {
  width: 34px; height: 34px; padding: 0; border: 2.5px solid var(--line); border-radius: 50%;
  background: linear-gradient(135deg, var(--a) 55%, var(--b) 55%); transition: transform 0.15s cubic-bezier(.3, 1.6, .5, 1), box-shadow 0.15s;
}
.sw:hover { transform: scale(1.12) rotate(-6deg); }
.sw.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--text); transform: scale(1.05); }
.sw i { display: none; }
.outfits { display: grid; grid-template-columns: repeat(3, 1fr); }
.outfits .sw { width: auto; height: auto; display: grid; gap: 6px; padding: 8px 6px 7px; border-radius: 12px; background: var(--bg); text-align: center; }
.outfits .sw i { display: block; height: 22px; border: 2px solid var(--line); border-radius: 7px; background: linear-gradient(90deg, var(--a) 70%, var(--b) 70%); }
.outfits .sw span { font-size: 12px; font-weight: 700; line-height: 1.1; }
.outfits .sw.on { background: var(--yellow); color: #111; box-shadow: 3px 3px 0 var(--shadow); transform: translate(-1px, -1px); }
.wd-num { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--pixel); font-size: 15px; }
.wd-num input { width: 84px; padding: 7px 10px; border: var(--b); border-radius: 10px; background: var(--bg); font-family: var(--pixel); font-size: 20px; text-align: center; }
.wd-actions { display: flex; gap: 12px; margin-top: 4px; }
.wd-actions .btn.line { padding: 12px 18px; }
.wd-actions .btn.big { flex: 1; font-size: 20px; padding: 12px; }
@media (max-width: 560px) {
  .wd-grid { grid-template-columns: 1fr; }
  .wd-stage { position: static; width: 140px; justify-self: center; }
  .outfits { grid-template-columns: repeat(2, 1fr); }
  .wd-actions { position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 14px 24px 18px; background: var(--card); border-top: var(--b); }
}

/* ---------- logo & judul kartu ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.logo-mark { width: 34px; height: 34px; image-rendering: pixelated; transition: transform 0.3s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.1); }
body.ticking .logo-mark { animation: tick 1s steps(1) infinite; }
@keyframes tick { 50% { transform: rotate(6deg); } }
.card-h { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--pixel); font-size: 20px; font-weight: 700; line-height: 1; }
.pxi { flex: none; color: var(--accent); filter: drop-shadow(1.5px 1.5px 0 var(--shadow)); transition: color 0.3s; }
.mixer .card-h { flex-basis: 100%; margin-bottom: 4px; }
.stats-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.log .card-h { margin-bottom: 12px; }

/* ---------- panel timer: title bar warna mode ---------- */
.panel {
  padding-top: 32px;
  background:
    linear-gradient(var(--line), var(--line)) 0 13px / 100% 3px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 0 0 / 100% 13px no-repeat,
    var(--card);
  transition: background-color 0.3s;
}

/* ---------- level tanaman ---------- */
.plant-lvl { grid-column: 1 / -1; display: grid; gap: 7px; padding: 12px 14px; border: var(--b); border-radius: 14px; background: var(--bg); }
.pl-head { display: flex; justify-content: space-between; align-items: baseline; }
.pl-head b { font-family: var(--pixel); font-size: 17px; font-weight: 700; }
.pl-head span { font-family: var(--pixel); font-size: 14px; padding: 1px 8px; background: var(--green); color: #111; border: 2px solid var(--line); border-radius: 999px; }
.pl-bar { height: 14px; padding: 2px; border: 2.5px solid var(--line); border-radius: 999px; background: var(--card); overflow: hidden; }
.pl-bar i { display: block; height: 100%; min-width: 6px; border-radius: 999px; background: repeating-linear-gradient(-45deg, #3fa864 0 6px, #4ade80 6px 12px); transition: width 0.8s cubic-bezier(.3, 1.3, .5, 1); }
.plant-lvl .plant-note { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- tombol bagiin ---------- */
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; text-decoration: none; background: var(--yellow); color: #111; border: 2.5px solid var(--line); border-radius: 999px; box-shadow: 2px 2px 0 var(--shadow); transition: transform 0.1s, box-shadow 0.1s; }
.share-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow); }

/* ---------- hadiah kamar ---------- */
.rw-h { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-family: var(--pixel); font-size: 15px; font-weight: 700; }
.rw-h .pxi { width: 16px; height: 16px; }
.rewards { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rewards li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 2px dashed color-mix(in srgb, var(--text) 35%, transparent); border-radius: 999px; font-size: 12.5px; color: var(--muted); }
.rewards li b { font-weight: 700; }
.rewards li small { font-family: var(--pixel); font-size: 11px; opacity: 0.8; }
.rewards li.open { border: 2px solid var(--line); background: var(--card); color: var(--text); box-shadow: 2px 2px 0 var(--shadow); }
.rewards li.open small { display: none; }

/* ---------- kalender aktivitas ---------- */
:root { --h0: color-mix(in srgb, var(--text) 9%, transparent); --h1: #c8efd2; --h2: #7fd99a; --h3: #3fa864; --h4: #22663b; }
:root[data-theme="dark"] { --h1: #1f4d30; --h2: #2e7d4a; --h3: #3fa864; --h4: #8fe6a8; }
.activity { position: relative; padding: 18px 20px; background: var(--card); border: var(--b); border-radius: 20px; box-shadow: 4px 4px 0 var(--shadow); display: grid; gap: 12px; }
.heat-wrap { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.heat { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; grid-auto-columns: 11px; gap: 3px; width: max-content; }
.heat i, .heat-legend i { display: block; width: 11px; height: 11px; border-radius: 2px; background: var(--h0); }
.heat .h1, .heat-legend .h1 { background: var(--h1); } .heat .h2, .heat-legend .h2 { background: var(--h2); }
.heat .h3, .heat-legend .h3 { background: var(--h3); } .heat .h4, .heat-legend .h4 { background: var(--h4); }
.heat i:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.heat-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.heat-legend { display: inline-flex; align-items: center; gap: 3px; }
.heat-legend span { margin: 0 4px; }
.heat-tip { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 6px)); padding: 5px 9px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.12s; z-index: 3; }
.heat-tip.show { opacity: 1; }

/* ---------- lencana ---------- */
.badges { padding: 18px 20px; background: var(--card); border: var(--b); border-radius: 20px; box-shadow: 4px 4px 0 var(--shadow); display: grid; gap: 12px; }
.badges .tasks-head > span { font-family: var(--pixel); font-size: 15px; color: var(--muted); }
.badge-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.badge-grid li { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 10px; padding-right: 34px; border: 2.5px dashed color-mix(in srgb, var(--text) 30%, transparent); border-radius: 12px; opacity: 0.75; }
.badge-grid li.on { opacity: 1; border: 2.5px solid var(--line); background: var(--bg); box-shadow: 2px 2px 0 var(--shadow); }
.bd-ico { grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; font-size: 19px; border-radius: 50%; background: color-mix(in srgb, var(--text) 8%, transparent); font-family: var(--pixel); font-weight: 700; }
.badge-grid li.on .bd-ico { background: var(--yellow); border: 2px solid var(--line); }
.badge-grid b { font-size: 13px; line-height: 1.15; }
.badge-grid small { font-size: 11px; line-height: 1.2; color: var(--muted); }
.badge-grid li { grid-template-rows: auto auto auto; }
.bd-ico { grid-row: span 3; }
.bd-prog { grid-column: 2; display: flex; align-items: center; height: 7px; margin-top: 5px; border-radius: 999px; background: color-mix(in srgb, var(--text) 12%, transparent); overflow: hidden; }
.bd-prog i { display: block; height: 100%; min-width: 3px; background: var(--accent); border-radius: 999px; transition: width 0.6s cubic-bezier(.3, 1.3, .5, 1); }
.badge-grid em { position: absolute; right: 10px; top: 8px; font-style: normal; font-family: var(--pixel); font-size: 12px; color: var(--muted); }
.badge-grid li { position: relative; }
.badge-hint { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- ide rehat ---------- */
.break-card { display: grid; gap: 10px; padding: 12px 14px; background: var(--bg); border: var(--b); border-radius: 14px; }
.bk-head { display: flex; align-items: center; gap: 7px; font-family: var(--pixel); font-size: 14px; color: var(--muted); }
.bk-head .pxi { width: 16px; height: 16px; }
.bk-next { margin-left: auto; width: 30px; height: 30px; padding: 0; border: 2px solid var(--line); border-radius: 8px; background: var(--card); font-size: 16px; font-weight: 700; transition: transform 0.2s; }
.bk-next:hover { transform: rotate(90deg); }
.bk-body { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.bk-emoji { font-size: 34px; line-height: 1; }
.bk-body b { font-size: 16px; }
.bk-body p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.bk-box { position: relative; width: 74px; height: 74px; margin: 2px auto 0; border: 3px dashed color-mix(in srgb, var(--text) 40%, transparent); border-radius: 10px; }
.bk-box i { position: absolute; width: 16px; height: 16px; margin: -8px; border-radius: 50%; background: var(--accent); border: 2.5px solid var(--line); animation: boxBreath 16s linear infinite; }
@keyframes boxBreath { 0%, 100% { left: 0; top: 100%; } 25% { left: 0; top: 0; } 50% { left: 100%; top: 0; } 75% { left: 100%; top: 100%; } }
.bk-go { justify-self: start; padding: 8px 14px; font-size: 14px; }

/* ---------- pengaturan: bahasa & backup ---------- */
.lang-row, .data-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-weight: 500; }
.seg { display: inline-flex; padding: 3px; border: var(--b); border-radius: 12px; background: var(--bg); }
.seg button { padding: 6px 12px; border: 0; border-radius: 8px; background: none; font-weight: 700; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--yellow); color: #111; box-shadow: inset 0 0 0 2px var(--line); }
.data-row .btn.line { padding: 8px 12px; font-size: 13.5px; }
#room:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }

/* ---------- motion ---------- */
.sheet { max-height: calc(100dvh - 24px); overflow: auto; }
.modes { position: relative; }
.mode-pill {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: 0; border-radius: 10px;
  background: var(--accent); border: 2.5px solid var(--line); box-shadow: 2px 2px 0 var(--shadow);
  transition: left 0.42s cubic-bezier(.3, 1.4, .5, 1), width 0.42s cubic-bezier(.3, 1.4, .5, 1), background 0.3s;
}
.modes button { position: relative; z-index: 1; }
.modes button[aria-selected="true"] { background: none; border-color: transparent; }
.room-card { transition: transform 0.25s ease-out; transform-style: preserve-3d; will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  .top, .room-card, .panel, .mixer, .tasks, .progress, .credit { animation: rise 0.7s cubic-bezier(.2, .9, .3, 1.15) backwards; }
  .room-card { animation-delay: 0.06s; } .panel { animation-delay: 0.14s; } .mixer { animation-delay: 0.22s; }
  .tasks { animation-delay: 0.28s; } .progress { animation-delay: 0.34s; } .credit { animation-delay: 0.45s; }
  .btn.big:not(.running):not(:hover) { animation: breathe 2.8s ease-in-out infinite; }
  .chip.on { animation: chipOn 0.4s cubic-bezier(.3, 1.6, .5, 1); }
  .room-tag { animation: sway 4s ease-in-out infinite; }
  .poke-hint { animation-duration: 2.4s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px) scale(0.98); } }
@keyframes breathe { 50% { transform: translate(-1px, -1px) scale(1.025); box-shadow: 6px 6px 0 var(--shadow); } }
@keyframes chipOn { 40% { transform: scale(1.12) rotate(-3deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(-1deg) translateY(-1px); } }

/* ---------- layar kecil ---------- */
@media (max-width: 1100px) { .hello { display: none; } }
@media (max-width: 900px) {
  .app { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .col { display: contents; }
  .room-card { order: 1; } .panel { order: 2; } .tasks { order: 3; } .mixer { order: 4; } .progress { order: 5; }
}
@media (max-width: 520px) {
  .top { padding-block: 14px; }
  .logo { font-size: 22px; }
  .now { display: none; }
  .goal { padding: 4px 10px 4px 5px; gap: 7px; }
  .goal-ring { width: 26px; height: 26px; }
  .goal-txt small { display: none; }
  .scene-btn { width: 44px; padding: 0; justify-content: center; }
  .scene-btn span { display: none; }
  .credit { margin-top: 0; }
  .panel { padding: 28px 16px 16px; gap: 14px; }
  .room-card, .panel, .mixer, .stats { border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow); }
  .room-tag { top: 10px; left: 10px; font-size: 13px; padding: 3px 9px; }
  .room-tools { left: 10px; bottom: 10px; gap: 6px; }
  .room-tools .zen-btn span { display: none; }
  .activity, .badges { border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow); padding: 16px; }
  .badge-grid { grid-template-columns: 1fr 1fr; }
  .zen-btn { padding: 5px 8px; font-size: 13px; }
  .poke-hint { display: none; }
  .log, .tasks { border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow); padding: 16px; }
  .tk { grid-template-columns: 12px 30px minmax(0, 1fr) auto; gap: 8px; }
  .tk-acts button { width: 34px; height: 34px; }
  .modes button { font-size: 13px; padding: 8px 4px; }
  .bar { grid-template-columns: repeat(24, 1fr); gap: 2px; }
  .bar i { height: 12px; }
  .btn.sq { width: 54px; }
  .btn.big { font-size: 22px; padding: 14px; }
  .vol { margin-left: 0; width: 100%; }
  .vol input { flex: 1; }
  .stat b { font-size: 26px; }
  .stat span { font-size: 11.5px; }
  .keys { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 430px) { .logo span { display: none; } .logo { font-size: 19px; gap: 7px; } .logo-mark { width: 28px; height: 28px; } }

/* ===================================================================
   VERSI RAMPING: kartu progress bertab, suara satu baris, jarak lebih rapet
   =================================================================== */
.app, .col { gap: 18px; }
.room-card, .panel { box-shadow: 5px 5px 0 var(--shadow); }
.mixer, .tasks, .progress { box-shadow: 3px 3px 0 var(--shadow); border-radius: 18px; }

/* suara: satu baris, judul cuma buat pembaca layar */
.mixer { padding: 12px 14px; gap: 8px; }
.mixer .card-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mixer .chip { padding: 7px 11px; font-size: 14px; gap: 6px; box-shadow: 2px 2px 0 var(--shadow); }
.mixer .vol { flex: 1 1 150px; font-size: 13px; }
.mixer .vol span { display: none; }

/* kartu progress */
.progress { position: relative; padding: 0; background: var(--card); border: var(--b); overflow: hidden; }
.ptabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: var(--b); background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.ptabs button {
  flex: 1; white-space: nowrap; padding: 9px 12px 8px; border: 2.5px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0;
  background: none; font-family: var(--pixel); font-weight: 700; font-size: 15px; color: var(--muted); margin-bottom: -3px; transition: color 0.15s, background 0.15s;
}
.ptabs button:hover { color: var(--text); }
.ptabs button[aria-selected="true"] { background: var(--card); color: var(--text); border-color: var(--line); padding-bottom: 11px; }
.ptabs small { font-size: 12px; padding: 0 6px; border-radius: 999px; background: var(--yellow); color: #111; border: 2px solid var(--line); }
.ptab { padding: 16px; }
.progress .ptab.stats, .progress .ptab.activity, .progress .ptab.badges, .progress .ptab.log {
  border: 0; border-radius: 0; box-shadow: none; background: none;
}
.progress .ptab.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.progress .ptab[hidden] { display: none; }
.progress .ptab .card-h:not(.keep) { display: none; }
.progress .stats-head { justify-content: flex-end; margin: -4px 0 0; }
.progress .tasks-head { justify-content: flex-end; }
.progress .activity { display: grid; gap: 12px; }
.progress .badges { display: grid; gap: 12px; }
.progress .badges .tasks-head { display: none; }
.progress .log ol { max-height: 300px; }

/* shortcut di pengaturan */
.keys-box { border: 2.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.keys-box summary { cursor: pointer; font-weight: 700; }
.keys-box .keys { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px 0 2px; justify-content: flex-start; font-size: 13px; }
.credit { margin-top: 6px; }

@media (max-width: 520px) {
  .ptabs button { font-size: 13.5px; padding: 8px 8px 7px; }
  .ptab { padding: 14px; }
  .mixer .chip { padding: 7px 9px; font-size: 13px; }
}
.progress .badge-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
/* kolom kanan (timer + tugas) nempel pas scroll, jadi timer selalu kelihatan */
@media (min-width: 901px) { .app > .col:last-child { position: sticky; top: 16px; } }

/* HP kecil (320px): logo tinggal tomat, kartu nggak boleh meluber */
@media (max-width: 360px) {
  .logo { font-size: 0; gap: 0; }
  .logo-mark { width: 30px; height: 30px; }
  .top { gap: 8px; }
  .top-right { gap: 6px; }
  .icon-btn, .scene-btn { width: 40px; height: 40px; }
  .tasks-head { flex-wrap: wrap; gap: 4px; }
  .task-add .btn.add { width: 44px; }
  .tk-acts button { width: 30px; height: 30px; }
  .controls { gap: 8px; }
  .btn.sq { width: 48px; }
}
.app > .col, .tasks, .tk-list, .panel { min-width: 0; }
/* kartu grid: kolomnya nggak boleh lebih lebar dari kartunya */
.tasks, .badges, .activity, .panel, .break-card { grid-template-columns: minmax(0, 1fr); }
.tasks > *, .panel > * { min-width: 0; }

.credit .sep { color: var(--muted); }
.credit a.gh { display: inline-flex; vertical-align: -5px; color: var(--text); text-decoration: none; border-radius: 6px; transition: transform 0.15s, color 0.15s; }
.credit a.gh:hover { color: var(--acc-focus); transform: translateY(-2px) rotate(-6deg); }
.credit a.gh:focus-visible { outline: 3px solid var(--acc-focus); outline-offset: 3px; }
