:root,
body[data-skin="wabisabi"] {
  color-scheme: dark;
  --bg: #252019;
  --bg-2: #3a3026;
  --surface: #f0dfbd;
  --surface-2: #d8b984;
  --surface-3: #5b4a38;
  --ink: #241a13;
  --text: #f7ecd6;
  --muted: #c7b79b;
  --line: #211810;
  --skin-name: "wabisabi";
  --brand: #9aa85f;
  --brand-dark: #697744;
  --accent: #c66f45;
  --yellow: #d8ae58;
  --blue: #6e8c88;
  --violet: #98766b;
  --danger: #a9483d;
  --shadow: 6px 6px 0 #120d09;
  --pixel-font: "Cubic 11", "俐方體11號", "zpix", "PixelMplus10", "Noto Sans Mono CJK TC",
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-y: auto;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-y: auto;
  background:
    linear-gradient(90deg, rgba(240, 223, 189, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(240, 223, 189, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 16% 12%, rgba(154, 168, 95, 0.18), transparent 28%),
    linear-gradient(135deg, var(--bg), var(--bg-2) 58%, #3b281d);
  background-size: 18px 18px, 18px 18px, auto, auto;
  color: var(--text);
  font-family: var(--pixel-font);
  letter-spacing: 0;
  image-rendering: pixelated;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.file-button,
a.primary-button,
a.secondary-button {
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition:
    transform 90ms steps(2),
    box-shadow 90ms steps(2),
    filter 90ms steps(2);
}

button:hover,
.file-button:hover,
a.primary-button:hover,
a.secondary-button:hover {
  filter: brightness(1.07);
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 #000;
}

button:active,
.file-button:active,
a.primary-button:active,
a.secondary-button:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 #000;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.file-button:focus-within {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: #ead7ae;
  color: var(--ink);
  padding: 9px 10px;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.18);
}

select {
  appearance: auto;
}

label {
  display: grid;
  gap: 7px;
  color: #3e3125;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.app-shell {
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 24px;
}

body[data-preview-mode="desktop"] {
  height: 100vh;
  overflow: hidden;
}

body[data-preview-mode="desktop"] .app-shell {
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-bottom: 40px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  border: 3px solid #000;
  background:
    linear-gradient(90deg, rgba(216, 174, 88, 0.14) 50%, transparent 50%),
    #403426;
  background-size: 12px 12px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 8px;
  border: 2px solid #000;
  background: var(--yellow);
  color: #241a13;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pixel-companion {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 96px;
}

.capybara-asset {
  display: block;
  width: 129px;
  height: 129px;
  object-fit: contain;
  filter: drop-shadow(4px 4px 0 #000);
  image-rendering: pixelated;
}

.pixel-capybara {
  position: relative;
  width: 92px;
  height: 82px;
  image-rendering: pixelated;
}

.capy-body {
  position: absolute;
  top: 22px;
  left: 7px;
  width: 74px;
  height: 42px;
  border: 4px solid #000;
  background:
    linear-gradient(90deg, rgba(255, 244, 216, 0.18) 50%, transparent 50%),
    #b77a44;
  background-size: 8px 100%;
  box-shadow:
    5px 5px 0 #000;
  z-index: 2;
}

.capy-body::before {
  position: absolute;
  top: 15px;
  right: -11px;
  width: 16px;
  height: 20px;
  border: 4px solid #000;
  background: #c89154;
  content: "";
}

.capy-ear {
  position: absolute;
  top: 11px;
  width: 16px;
  height: 18px;
  border: 4px solid #000;
  background: #8f5f37;
  box-shadow: 5px 5px 0 #000;
  z-index: 1;
}

.capy-ear-left {
  left: 18px;
}

.capy-ear-right {
  left: 45px;
}

.capy-eye {
  position: absolute;
  top: 13px;
  right: 22px;
  width: 8px;
  height: 8px;
  background: #2a211a;
  box-shadow: inset 2px 2px 0 #f0dfbd;
}

.capy-snout {
  position: absolute;
  right: -4px;
  bottom: 7px;
  width: 22px;
  height: 14px;
  border: 4px solid #000;
  background: #d4a15f;
}

.capy-nose {
  position: absolute;
  right: -8px;
  bottom: 16px;
  width: 7px;
  height: 7px;
  background: #2a211a;
}

.capy-leg {
  position: absolute;
  bottom: 9px;
  width: 16px;
  height: 17px;
  border: 4px solid #000;
  background: #6f462a;
  box-shadow: 5px 5px 0 #000;
  z-index: 1;
}

.capy-leg-front {
  right: 11px;
}

.capy-leg-back {
  left: 18px;
}

.capy-spark {
  position: absolute;
  top: 1px;
  right: 7px;
  width: 11px;
  height: 11px;
  background: var(--yellow);
  box-shadow:
    -12px 8px 0 -2px var(--brand),
    11px 12px 0 -2px var(--accent),
    3px 3px 0 #000;
  z-index: 3;
}

.companion-tag {
  border: 2px solid #000;
  background: var(--surface);
  box-shadow: 3px 3px 0 #000;
  color: #2f261d;
  padding: 3px 6px;
  font-size: 0.62rem;
  font-weight: 950;
}

.sticker-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
}

.pixel-sticker {
  position: relative;
  display: inline-grid;
  grid-template-columns: 42px auto;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  border: 3px solid #000;
  background: var(--surface);
  box-shadow: 4px 5px 0 rgba(18, 13, 9, 0.92);
  color: #2f261d;
  padding: 12px 12px 9px 8px;
  cursor: default;
  transform: rotate(-1deg);
}

.pixel-sticker::before {
  position: absolute;
  top: -10px;
  left: 18px;
  width: 42px;
  height: 15px;
  border: 2px solid rgba(33, 24, 16, 0.7);
  background: rgba(240, 223, 189, 0.74);
  box-shadow: 2px 2px 0 rgba(18, 13, 9, 0.5);
  content: "";
}

.pixel-sticker:nth-child(2) {
  transform: rotate(1deg);
}

.pixel-sticker:nth-child(3) {
  transform: rotate(-2deg);
}

.note-copy {
  display: grid;
  gap: 4px;
}

.note-copy strong {
  font-size: 0.76rem;
  line-height: 1;
}

.note-copy small {
  color: #6b5a45;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
}

.sticker-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border: 3px solid #000;
  background: var(--brand);
  box-shadow: 3px 3px 0 #000;
}

.focus-core {
  background: #2a211a;
}

.focus-core::before {
  position: absolute;
  inset: 8px;
  border: 3px solid #000;
  background: var(--yellow);
  box-shadow:
    0 -9px 0 -3px var(--brand),
    9px 0 0 -3px var(--accent),
    0 9px 0 -3px var(--blue),
    -9px 0 0 -3px var(--violet);
  content: "";
}

.focus-core i {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 8px;
  height: 8px;
  background: #f0dfbd;
}

.slot-chip {
  background: var(--blue);
}

.slot-chip::before,
.slot-chip::after {
  position: absolute;
  left: 5px;
  width: 22px;
  height: 5px;
  background: #2a211a;
  content: "";
}

.slot-chip::before {
  top: 8px;
}

.slot-chip::after {
  bottom: 8px;
}

.slot-chip i {
  position: absolute;
  top: 16px;
  left: 9px;
  width: 14px;
  height: 6px;
  background: var(--yellow);
}

.task-card {
  background: var(--accent);
}

.task-card::before {
  position: absolute;
  top: 6px;
  left: 7px;
  width: 18px;
  height: 4px;
  background: #2a211a;
  box-shadow:
    0 8px 0 #2a211a,
    0 16px 0 #2a211a;
  content: "";
}

.task-card i {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  background: var(--yellow);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 12em;
  color: var(--surface);
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.04;
  text-shadow: 4px 4px 0 #000;
}

h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #11131f;
  font-size: 0.98rem;
  line-height: 1.15;
}

h2::before {
  width: 12px;
  height: 12px;
  border: 2px solid #000;
  background: var(--accent);
  box-shadow: 3px 3px 0 #000;
  content: "";
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.device-switch {
  display: none;
  grid-template-columns: auto auto auto;
  gap: 6px;
  align-items: center;
  border: 2px solid #000;
  background: #2f261d;
  box-shadow: 4px 4px 0 #000;
  padding: 6px;
}

.device-switch span {
  color: var(--surface);
  font-size: 0.72rem;
  font-weight: 950;
  padding: 0 3px;
}

.device-switch button {
  min-height: 30px;
  background: #ead7ae;
  color: #2f261d;
  box-shadow: 2px 2px 0 #000;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 950;
}

.device-switch button.is-active {
  background: var(--yellow);
}

body[data-dev-preview="false"] .device-switch {
  display: none;
}

body[data-dev-preview="true"] .device-switch {
  display: inline-grid;
}

.primary-button,
.secondary-button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 0 14px;
  font-size: 0.86rem;
  font-weight: 950;
  text-decoration: none;
}

.primary-button {
  background: var(--brand);
  color: #182011;
}

.secondary-button,
.file-button {
  background: var(--surface);
  color: var(--ink);
}

.text-button {
  min-height: 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
}

.danger-button {
  min-height: 32px;
  padding: 0 9px;
  background: #e6b19c;
  color: #4b1e18;
  font-size: 0.78rem;
  font-weight: 950;
}

.status-button {
  min-height: 32px;
  padding: 0 10px;
  background: #d2d0b4;
  color: #30271d;
  font-size: 0.78rem;
  font-weight: 950;
}

.status-button.is-done {
  background: #c9d4a7;
  color: #26331d;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.workspace {
  display: block;
}

.mobile-tabbar {
  display: none;
}

.core-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  border: 3px solid #000;
  background: rgba(47, 38, 29, 0.92);
  box-shadow: var(--shadow);
  padding: 10px;
}

.core-nav button,
.core-nav a,
.mobile-tabbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 2px solid #000;
  background: #ead7ae;
  color: #2f261d;
  box-shadow: 3px 3px 0 #000;
  padding: 0 10px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 950;
}

.core-nav button.is-active {
  background: var(--brand);
}

.workspace [data-mobile-panel] {
  display: none;
}

body[data-mobile-view="today"] [data-mobile-panel="today"],
body[data-mobile-view="calendar"] [data-mobile-panel="calendar"],
body[data-mobile-view="tasks"] [data-mobile-panel="tasks"],
body[data-mobile-view="settings"] [data-mobile-panel="settings"] {
  display: block;
}

.panel {
  position: relative;
  border: 3px solid #000;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel::after {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--brand);
  box-shadow:
    -12px 0 0 var(--yellow),
    -24px 0 0 var(--accent);
  content: "";
}

.settings-panel {
  grid-area: settings;
  background:
    linear-gradient(90deg, rgba(154, 168, 95, 0.12) 50%, transparent 50%),
    #d8d1b3;
  background-size: 14px 100%;
}

.calendar-panel {
  grid-area: calendar;
  background:
    linear-gradient(0deg, rgba(111, 70, 42, 0.1) 50%, transparent 50%),
    #e6c197;
  background-size: 100% 12px;
}

.task-panel {
  grid-area: tasks;
  background:
    linear-gradient(90deg, rgba(36, 26, 19, 0.08) 1px, transparent 1px),
    #cdc9a9;
  background-size: 16px 100%;
  min-height: 420px;
}

.journal-panel {
  grid-area: journal;
  background:
    linear-gradient(90deg, rgba(154, 168, 95, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(111, 70, 42, 0.08) 1px, transparent 1px),
    #efe0bc;
  background-size: 18px 18px;
}

.journal-workspace {
  display: block;
}

body[data-page="journal"] .app-shell {
  width: min(1180px, 100%);
}

body[data-page="journal"] .journal-panel {
  min-height: calc(100vh - 170px);
}

.plan-panel {
  grid-area: plan;
  background:
    linear-gradient(90deg, rgba(36, 26, 19, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 26, 19, 0.06) 1px, transparent 1px),
    #f0dfbd;
  background-size: 18px 18px;
  min-height: 420px;
}

.today-panel {
  grid-area: today;
  background:
    linear-gradient(90deg, rgba(36, 26, 19, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 26, 19, 0.06) 1px, transparent 1px),
    #f0dfbd;
  background-size: 18px 18px;
  min-height: 420px;
}

.today-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.today-hero h2 {
  margin: 0;
  color: #2f261d;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
}

.today-hero p {
  margin: 10px 0 0;
  color: #6b5a45;
  font-size: 0.9rem;
  font-weight: 900;
}

.today-capacity {
  border: 3px solid #000;
  background: #2f261d;
  box-shadow: 4px 4px 0 #000;
  color: var(--surface);
  padding: 14px;
}

.today-capacity span,
.today-capacity em {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.today-capacity strong {
  display: block;
  margin: 8px 0;
  color: var(--yellow);
  font-size: 1.35rem;
}

.today-capacity .text-button {
  margin-top: 8px;
  color: #f7ecd6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.week-board-card,
.today-task-card {
  border: 3px solid #000;
  background: rgba(234, 215, 174, 0.82);
  box-shadow: 4px 4px 0 #000;
  margin-bottom: 14px;
  padding: 14px;
}

.week-board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.week-board-actions > span {
  color: #6b5a45;
  font-size: 0.72rem;
  font-weight: 950;
}

.week-board {
  display: grid;
  gap: 9px;
}

.week-day-card {
  display: grid;
  grid-template-columns: 112px 96px minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
  border: 2px solid #000;
  background: #fff4d8;
  box-shadow: 3px 3px 0 #000;
  padding: 10px 12px;
  min-width: 0;
}

.week-day-card.has-open-slot {
  cursor: pointer;
}

.week-day-card.has-open-slot:hover {
  transform: translate(-1px, -1px);
}

.week-day-card.is-today {
  background: #f5e2a7;
}

.week-day-card.is-off {
  background: rgba(213, 198, 158, 0.55);
}

.week-day-head {
  display: grid;
  gap: 8px;
}

.week-day-head strong,
.week-day-head span,
.week-day-head em {
  display: block;
}

.week-day-head strong {
  color: #2f261d;
  font-size: 1rem;
}

.week-day-head span,
.week-day-head em {
  color: #6b5a45;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 950;
}

.week-day-meter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-content: center;
  min-width: 0;
}

.week-day-tasks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-content: start;
}

.week-day-action {
  display: flex;
  justify-content: flex-end;
}

.week-day-plan-button {
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  padding: 0 10px;
}

.week-day-plan-button.is-place {
  background: var(--brand);
  color: #1f2419;
}

.week-day-plan-button.is-add-capacity {
  background: var(--yellow);
  color: #2f261d;
}

.week-day-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 2px solid #000;
  background: #d5c69e;
  color: #6b5a45;
  box-shadow: 2px 2px 0 #000;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 950;
}

.today-task-list {
  display: grid;
  gap: 10px;
}

.placement-sheet[hidden] {
  display: none;
}

.placement-sheet {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  align-items: end;
}

.placement-dialog {
  position: relative;
  width: min(900px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: 0 auto 18px;
  border: 3px solid #000;
  background: #f0dfbd;
  box-shadow: 8px 8px 0 #000;
  color: #2f261d;
  padding: 18px;
}

.placement-dialog .sheet-header p {
  margin: 4px 0 0;
  color: #6b5a45;
  font-size: 0.72rem;
  font-weight: 950;
}

.placement-capacity-label {
  border: 2px dashed #000;
  background: #fff4d8;
  color: #6b5a45;
  margin: 0 0 12px;
  padding: 10px;
  font-size: 0.78rem;
  font-weight: 950;
}

.placement-task-list {
  display: grid;
  gap: 12px;
}

.placement-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 14px;
  align-items: start;
  border: 2px solid #000;
  background: #fff4d8;
  box-shadow: 3px 3px 0 #000;
  padding: 12px;
}

.placement-task-card strong,
.placement-task-card span {
  display: block;
  overflow-wrap: anywhere;
}

.placement-task-card span {
  color: #6b5a45;
  font-size: 0.72rem;
  font-weight: 950;
}

.placement-meter {
  gap: 8px;
  margin-top: 12px;
}

.placement-meter .point-dot.is-numbered {
  width: 34px;
  min-width: 34px;
  height: 34px;
}

.capacity-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

.capacity-option-button {
  min-height: 72px;
  background: var(--yellow);
  color: #2f261d;
}

.capacity-option-button strong,
.capacity-option-button span {
  display: block;
}

.capacity-option-button strong {
  font-size: 1rem;
}

.capacity-option-button span {
  margin-top: 4px;
  color: #6b5a45;
  font-size: 0.66rem;
  font-weight: 950;
}

.capacity-adjuster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 2px solid #000;
  background: #fff4d8;
  box-shadow: 3px 3px 0 #000;
  padding: 10px;
}

.capacity-adjuster > strong {
  font-size: 0.84rem;
}

.capacity-adjuster > div {
  display: flex;
  gap: 8px;
}

.capacity-adjust-button {
  min-height: 34px;
  background: #d5c69e;
  color: #2f261d;
  padding: 0 12px;
}

.capacity-adjust-button.is-active {
  background: var(--brand);
  color: #1f2419;
}

.capacity-adjust-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.used-allocation-list {
  display: grid;
  gap: 8px;
}

.used-allocation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 2px solid #000;
  background: #c9d4a7;
  box-shadow: 3px 3px 0 #000;
  padding: 10px;
}

.used-allocation-row strong,
.used-allocation-row span {
  display: block;
}

.used-allocation-row span {
  color: #4f6251;
  font-size: 0.72rem;
  font-weight: 950;
}

.today-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 2px solid #000;
  background: #fff4d8;
  box-shadow: 3px 3px 0 #000;
  padding: 12px;
}

.today-task-row.is-completed {
  background: #c9d4a7;
}

.today-task-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.today-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.today-task-row span,
.next-workday-hint {
  color: #6b5a45;
  font-size: 0.74rem;
  font-weight: 900;
}

.reflection-sheet[hidden] {
  display: none;
}

.reflection-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
}

.reflection-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 13, 9, 0.58);
}

.reflection-dialog {
  position: relative;
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: 0 auto 18px;
  border: 3px solid #000;
  background: #2f261d;
  box-shadow: 8px 8px 0 #000;
  color: var(--surface);
  padding: 18px;
}

.sheet-handle {
  width: 72px;
  height: 8px;
  margin: 0 auto 14px;
  background: #8e8578;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-header h2 {
  margin: 0;
}

.reflection-link-field {
  margin: 12px 0;
  color: var(--surface);
}

.reflection-dialog .journal-writing-field span {
  color: var(--surface);
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 3px solid #000;
}

.panel-header p {
  margin-top: 5px;
  color: #6a5a45;
  font-size: 0.8rem;
  font-weight: 800;
}

.metric-pill {
  flex: 0 0 auto;
  min-width: 96px;
  border: 2px solid #000;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 50%, transparent 50%),
    var(--brand);
  background-size: 8px 100%;
  color: #182011;
  box-shadow: 4px 4px 0 #000;
  padding: 8px 10px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 950;
}

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

.weekday-group {
  margin: 16px 0 0;
  border: 0;
  padding: 0;
}

.weekday-group legend {
  margin-bottom: 9px;
  color: #5a4938;
  font-size: 0.78rem;
  font-weight: 950;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.settings-data-note {
  flex-basis: 100%;
  color: #6b5a45;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.5;
}

.snapshot-panel {
  margin-top: 16px;
  border: 2px solid #000;
  background: rgba(255, 244, 216, 0.48);
  box-shadow: 3px 3px 0 #000;
  padding: 12px;
}

.snapshot-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.snapshot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 2px solid #000;
  background: #fff4d8;
  box-shadow: 2px 2px 0 #000;
  padding: 8px;
}

.snapshot-row strong {
  display: block;
  color: #2f261d;
  font-size: 0.72rem;
  line-height: 1.35;
}

.snapshot-row span {
  display: block;
  margin-top: 3px;
  color: #6b5a45;
  font-size: 0.64rem;
  font-weight: 900;
}

.point-system-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 2px solid #000;
  background: rgba(255, 244, 216, 0.58);
  box-shadow: 3px 3px 0 #000;
  padding: 12px;
}

.point-system-card output {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 2px solid #000;
  background: var(--brand);
  box-shadow: 3px 3px 0 #000;
  padding: 0 10px;
  color: #2f261d;
  font-size: 0.86rem;
  font-weight: 950;
}

.settings-hint {
  grid-column: 1 / -1;
  color: #6b5a45;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.5;
}

.settings-hint.is-invalid {
  color: var(--danger);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(7, minmax(38px, 1fr));
  gap: 8px;
}

.segmented button {
  min-height: 38px;
  background: #ead7ae;
  color: #6e5b42;
  font-weight: 950;
}

.segmented button.is-active {
  background: var(--brand);
  color: #182011;
}

.inline-form,
.task-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: 150px 120px minmax(160px, 1fr) auto;
  align-items: end;
}

.point-card-dock {
  border: 2px solid #000;
  background: #cdc9a9;
  box-shadow: 4px 4px 0 #000;
  margin-bottom: 16px;
  padding: 12px;
}

.point-card-dock-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.point-card-dock-summary span {
  border: 2px solid #000;
  background: #2f261d;
  box-shadow: 3px 3px 0 #000;
  color: var(--surface);
  padding: 7px 8px;
  font-size: 0.68rem;
  font-weight: 950;
  text-align: center;
}

.point-card-dock-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding: 0 4px 4px 0;
  scrollbar-gutter: stable;
}

.dock-card {
  border: 3px solid #000;
  background:
    linear-gradient(90deg, var(--accent) 0 14px, transparent 14px),
    #ead7ae;
  box-shadow: 3px 3px 0 #000;
  color: #2f261d;
  padding: 10px 10px 10px 24px;
}

.dock-card[draggable="true"] {
  cursor: grab;
}

.dock-card[draggable="true"]:active {
  cursor: grabbing;
}

.dock-card.is-selected {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
}

.dock-card.is-spent {
  background:
    linear-gradient(90deg, var(--brand) 0 14px, transparent 14px),
    #d5c69e;
}

.dock-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  line-height: 1.25;
}

.dock-card span,
.dock-card em {
  display: block;
  margin-top: 7px;
  color: #6b5a45;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 950;
}

.dock-card em {
  color: #2f261d;
}

.availability-board {
  border: 2px solid #000;
  background: rgba(234, 215, 174, 0.62);
  box-shadow: 4px 4px 0 #000;
  margin-bottom: 16px;
  padding: 12px;
}

.availability-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.availability-toolbar strong {
  color: #2f261d;
  font-size: 0.86rem;
}

.availability-view-switch {
  display: flex;
  gap: 6px;
}

.availability-nav {
  display: grid;
  grid-template-columns: 32px minmax(92px, auto) 32px;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}

.availability-nav button {
  min-height: 32px;
  background: var(--yellow);
  color: #2f261d;
  box-shadow: 2px 2px 0 #000;
  padding: 0;
  font-size: 1rem;
  font-weight: 950;
}

.availability-nav output {
  border: 2px solid #000;
  background: #f0dfbd;
  box-shadow: 2px 2px 0 #000;
  color: #2f261d;
  padding: 7px 9px 5px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 950;
}

.calendar-jump-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: end;
}

.calendar-jump-form label {
  display: grid;
  gap: 3px;
  color: #6b5a45;
  font-size: 0.62rem;
  font-weight: 950;
}

.calendar-jump-form input {
  width: 74px;
  min-height: 32px;
  padding: 4px 7px;
}

.calendar-jump-form button {
  min-height: 32px;
  padding: 0 10px;
}

.availability-view-switch button {
  min-height: 32px;
  background: #ead7ae;
  color: #2f261d;
  box-shadow: 2px 2px 0 #000;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 950;
}

.availability-view-switch button.is-active {
  background: var(--brand);
}

.availability-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.availability-day,
.availability-period {
  display: grid;
  gap: 5px;
  min-height: 104px;
  background:
    linear-gradient(90deg, rgba(154, 168, 95, 0.14) 50%, transparent 50%),
    #ead7ae;
  background-size: 8px 100%;
  color: #2f261d;
  padding: 9px;
  text-align: left;
  white-space: normal;
}

.availability-day.is-off,
.availability-period.is-off {
  background: #d5c69e;
  color: #766955;
}

.availability-day.is-drop-target {
  background:
    linear-gradient(90deg, rgba(216, 174, 88, 0.24) 50%, transparent 50%),
    #f0dfbd;
  outline: 4px solid var(--yellow);
  outline-offset: -5px;
}

.advanced-time-tools {
  border: 2px solid #000;
  background: rgba(234, 215, 174, 0.64);
  box-shadow: 4px 4px 0 #000;
  margin-top: 14px;
  padding: 10px;
}

.advanced-time-tools[hidden] {
  display: none;
}

.advanced-time-tools summary {
  cursor: pointer;
  color: #2f261d;
  font-size: 0.78rem;
  font-weight: 950;
}

.advanced-time-tools[open] summary {
  margin-bottom: 12px;
}

.advanced-file-import {
  display: inline-flex;
  margin: 12px 0;
}

.availability-day strong,
.availability-period strong {
  font-size: 0.86rem;
}

.availability-allocations {
  display: grid;
  gap: 4px;
  min-height: 0;
}

.availability-allocations span {
  display: block;
  border: 2px solid #000;
  background: #fff4d8;
  box-shadow: 2px 2px 0 #000;
  color: #2f261d;
  padding: 3px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.62rem;
  font-weight: 950;
}

.availability-day span,
.availability-period span,
.availability-day em,
.availability-period em {
  color: #6b5a45;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.availability-day .availability-allocations span {
  color: #2f261d;
  font-size: 0.62rem;
  font-weight: 950;
}

.round-badge {
  display: inline-block;
  width: fit-content;
  border: 2px solid #000;
  background: var(--brand);
  box-shadow: 2px 2px 0 #000;
  color: #1f2419;
  margin-top: 6px;
  padding: 2px 5px;
  font-size: 0.62rem;
  font-weight: 950;
}

.slot-form {
  grid-template-columns: 130px 130px 132px minmax(180px, 1fr) auto;
  margin-bottom: 16px;
}

.quick-deduct-form {
  display: grid;
  grid-template-columns: 180px minmax(270px, 1fr) 120px auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
  border: 2px solid #000;
  background: rgba(213, 198, 158, 0.74);
  box-shadow: 4px 4px 0 #000;
  padding: 12px;
}

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

.deduct-presets button {
  min-height: 42px;
  background: var(--yellow);
  color: #2f261d;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 950;
}

.custom-deduct-field {
  min-width: 0;
}

.task-form {
  grid-template-columns: minmax(180px, 1fr) 86px auto;
  align-items: end;
  margin-bottom: 12px;
}

.task-form .primary-button {
  width: 100%;
}

.journal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.journal-index,
.journal-page {
  border: 2px solid #000;
  background: rgba(234, 215, 174, 0.72);
  box-shadow: 4px 4px 0 #000;
  padding: 12px;
}

.journal-task-tabs {
  display: grid;
  gap: 8px;
}

.journal-tab {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 74px;
  background:
    linear-gradient(90deg, var(--brand) 0 10px, transparent 10px),
    #d8d1b3;
  color: #2f261d;
  box-shadow: 3px 3px 0 #000;
  padding: 10px 10px 10px 18px;
  text-align: left;
  white-space: normal;
}

.journal-tab.is-active {
  outline: 4px solid var(--yellow);
  outline-offset: -5px;
  background:
    linear-gradient(90deg, var(--yellow) 0 10px, transparent 10px),
    #fff4d8;
}

.journal-tab strong {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  line-height: 1.25;
}

.journal-tab span,
.journal-tab em {
  color: #6b5a45;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 950;
}

.journal-page {
  position: relative;
  min-height: 440px;
  background:
    linear-gradient(180deg, rgba(36, 26, 19, 0.09) 1px, transparent 1px),
    #fff4d8;
  background-size: 100% 28px;
}

.journal-page::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48px;
  border-left: 3px double rgba(111, 70, 42, 0.32);
  content: "";
  pointer-events: none;
}

.journal-ops-page {
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.journal-ops-page > * {
  min-width: 0;
}

.journal-page-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 3px solid #000;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.journal-kicker {
  display: inline-block;
  border: 2px solid #000;
  background: var(--brand);
  box-shadow: 2px 2px 0 #000;
  color: #1f2419;
  margin-bottom: 8px;
  padding: 3px 6px;
  font-size: 0.62rem;
  font-weight: 950;
}

.journal-page h3 {
  margin: 0;
  color: #2f261d;
  font-size: 1rem;
  line-height: 1.28;
}

.journal-page p {
  margin: 6px 0 0;
  color: #6b5a45;
  font-size: 0.72rem;
  font-weight: 900;
}

.journal-progress-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.journal-progress-grid output,
.journal-log-composer,
.journal-timeline,
.journal-entry-list-section {
  border: 2px solid #000;
  background: rgba(232, 217, 176, 0.82);
  box-shadow: 3px 3px 0 #000;
}

.journal-progress-grid output {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
}

.journal-progress-grid span,
.journal-action-grid span,
.journal-log-toolbar span {
  color: #5a4938;
  font-size: 0.64rem;
  font-weight: 950;
}

.journal-progress-grid strong {
  color: #2f261d;
  font-size: 0.9rem;
  line-height: 1.2;
}

.journal-status-bar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.journal-status-bar button {
  min-height: 38px;
  border: 2px solid #000;
  background: #d8d1b3;
  color: #2f261d;
  box-shadow: 3px 3px 0 #000;
  font-size: 0.7rem;
  font-weight: 950;
}

.journal-status-bar button[data-journal-status="blocked"].is-active {
  background: #e6b19c;
}

.journal-status-bar button[data-journal-status="review"].is-active {
  background: #fff4d8;
}

.journal-status-bar button[data-journal-status="done"].is-active {
  background: var(--yellow);
}

.journal-status-bar button.is-active {
  background: var(--brand);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

.journal-action-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.journal-action-grid label,
.journal-log-toolbar label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.journal-action-grid input,
.journal-log-toolbar select,
.journal-log-composer textarea {
  width: 100%;
  border: 2px solid #000;
  background: #fff4d8;
  color: #2f261d;
  box-shadow: inset 3px 3px 0 rgba(36, 26, 19, 0.13);
  padding: 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.journal-log-composer {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.journal-log-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.journal-log-toolbar .primary-button {
  min-height: 42px;
}

.journal-log-composer textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.6;
}

.journal-timeline,
.journal-entry-list-section {
  position: relative;
  padding: 10px;
}

.journal-usage-list,
.journal-log-list {
  display: grid;
  gap: 8px;
}

.journal-usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 2px solid #000;
  background: #fff4d8;
  box-shadow: 2px 2px 0 #000;
  padding: 8px;
}

.journal-usage-row strong,
.journal-usage-row span,
.journal-log-entry span,
.journal-log-entry time {
  font-size: 0.68rem;
  font-weight: 950;
}

.journal-usage-row strong {
  overflow-wrap: anywhere;
}

.journal-usage-row span {
  border: 2px solid #000;
  background: var(--brand);
  box-shadow: 2px 2px 0 #000;
  padding: 4px 6px;
}

.journal-log-entry {
  display: grid;
  gap: 8px;
  border: 2px solid #000;
  background: #fff4d8;
  box-shadow: 2px 2px 0 #000;
  padding: 10px;
}

.journal-log-entry > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.journal-log-entry span {
  border: 2px solid #000;
  background: var(--brand);
  box-shadow: 2px 2px 0 #000;
  padding: 3px 7px;
}

.journal-log-entry.is-blocker span {
  background: #e6b19c;
}

.journal-log-entry.is-decision span {
  background: var(--yellow);
}

.journal-log-entry.is-review span,
.journal-log-entry.is-reflection span {
  background: #fff4d8;
}

.journal-log-entry time {
  color: #6b5a45;
}

.journal-log-entry p {
  margin: 0;
  color: #2f261d;
  font-size: 0.76rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.journal-log-entry .text-button {
  justify-self: end;
  color: #6b5a45;
  font-size: 0.66rem;
}

.journal-writing-field {
  position: relative;
  display: grid;
  gap: 8px;
}

.journal-writing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.journal-writing-head > span {
  color: #5a4938;
  font-size: 0.72rem;
  font-weight: 950;
}

.journal-writing-head > output {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  border: 2px solid #000;
  background: var(--brand);
  box-shadow: 2px 2px 0 #000;
  color: #2f261d;
  padding: 3px 7px;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
}

.journal-writing-head > output[data-status="saving"] {
  background: var(--yellow);
}

.journal-writing-head > output[data-status="idle"] {
  background: #d8d1b3;
}

.journal-writing-field textarea {
  min-height: 180px;
  border: 2px solid #000;
  background: rgba(255, 244, 216, 0.7);
  box-shadow: inset 3px 3px 0 rgba(36, 26, 19, 0.13);
  color: #2f261d;
  padding: 12px;
  resize: vertical;
  line-height: 1.7;
}

.journal-sticker-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.journal-sticker-shelf button,
.journal-stamp {
  min-height: 34px;
  border: 2px solid #000;
  background: #d8d1b3;
  color: #2f261d;
  box-shadow: 3px 3px 0 #000;
  padding: 0 10px;
  font-size: 0.7rem;
  font-weight: 950;
}

.journal-sticker-board {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 74px;
  border: 2px dashed #000;
  background: rgba(213, 198, 158, 0.36);
  margin-top: 12px;
  padding: 10px;
}

.journal-sticker-board.is-drop-target {
  background: rgba(216, 174, 88, 0.34);
  outline: 4px solid var(--yellow);
  outline-offset: -6px;
}

.journal-sticker-board > span {
  color: #6b5a45;
  font-size: 0.72rem;
  font-weight: 900;
}

.journal-stamp.is-matcha {
  background: var(--brand);
}

.journal-stamp.is-paper {
  background: #fff4d8;
}

.journal-stamp.is-clay {
  background: #e6b19c;
}

.journal-stamp.is-gold {
  background: var(--yellow);
}

.list-block {
  margin-top: 16px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #5a4938;
  font-size: 0.78rem;
  font-weight: 950;
}

.compact-list,
.task-list {
  display: grid;
  gap: 10px;
}

.list-row,
.task-row {
  border: 2px solid #000;
  border-radius: 0;
  background: #ead7ae;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.9);
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.focus-slot-row {
  background:
    linear-gradient(90deg, var(--brand) 0 12px, transparent 12px),
    #ead7ae;
  padding-left: 20px;
}

.list-row strong,
.task-main strong,
.day-title strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  line-height: 1.25;
}

.list-row span,
.day-title span,
.allocation-meta {
  color: #6b5a45;
  font-size: 0.76rem;
  font-weight: 800;
}

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border-width: 3px;
  background:
    linear-gradient(90deg, var(--accent) 0 18px, transparent 18px),
    linear-gradient(180deg, rgba(255, 244, 216, 0.5), rgba(214, 190, 150, 0.76)),
    #ead7ae;
  padding: 14px 12px 14px 26px;
  overflow: hidden;
}

.task-row::before,
.task-row::after {
  position: absolute;
  left: 6px;
  width: 7px;
  height: 7px;
  background: #241a13;
  box-shadow:
    0 12px 0 #241a13,
    0 24px 0 #241a13;
  content: "";
}

.task-row::before {
  top: 10px;
}

.task-row::after {
  right: 10px;
  bottom: 8px;
  left: auto;
  width: 28px;
  height: 6px;
  background: var(--brand-dark);
  box-shadow: 0 -10px 0 var(--yellow);
}

.task-main {
  min-width: 0;
}

.point-card-meter,
.availability-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.point-dot {
  width: 10px;
  min-width: 10px;
  height: 10px;
  border: 2px solid #000;
  background: #d5c69e;
  box-shadow: 2px 2px 0 #000;
}

.point-dot.is-numbered {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  background: #2f261d;
  color: #fff4d8;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
}

.point-dot.is-used {
  background: var(--brand);
  color: #1f2419;
}

.point-dot.is-empty {
  background: #b8aa8f;
}

.point-overflow {
  border: 2px solid #000;
  background: var(--yellow);
  box-shadow: 2px 2px 0 #000;
  color: #2f261d;
  padding: 0 4px;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1.15;
}

.task-actions {
  display: flex;
  gap: 8px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-grid div {
  min-height: 82px;
  border: 2px solid #000;
  background:
    linear-gradient(90deg, rgba(154, 168, 95, 0.18) 50%, transparent 50%),
    #2f261d;
  background-size: 10px 100%;
  box-shadow: 4px 4px 0 #000;
  color: var(--surface);
  padding: 12px;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
}

.summary-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--yellow);
  font-size: 1.7rem;
  line-height: 1;
  text-shadow: 3px 3px 0 #000;
}

.day-row {
  position: relative;
  border-width: 3px;
  background:
    linear-gradient(90deg, rgba(154, 168, 95, 0.11) 50%, transparent 50%),
    #ead7ae;
  background-size: 16px 100%;
  padding: 14px;
}

.day-row::before {
  position: absolute;
  top: -3px;
  left: 18px;
  border: 3px solid #000;
  background: var(--brand);
  color: #182011;
  box-shadow: 3px 3px 0 #000;
  padding: 3px 7px;
  font-size: 0.62rem;
  font-weight: 950;
  content: "ENERGY DAY";
  transform: translateY(-50%);
}

.day-title {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 10px;
}

.day-title > span {
  align-self: start;
  border: 2px solid #000;
  background: var(--yellow);
  color: #30230f;
  padding: 4px 7px;
  font-weight: 950;
  box-shadow: 3px 3px 0 #000;
}

.capacity-bar {
  height: 20px;
  border: 3px solid #000;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18) 50%, transparent 50%),
    #cfc2a2;
  background-size: 8px 100%;
  overflow: hidden;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.18);
}

.capacity-bar span {
  display: block;
  width: var(--fill, 0%);
  height: 100%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.26) 50%, transparent 50%),
    var(--brand);
  background-size: 8px 100%;
  box-shadow: inset -3px 0 0 var(--brand-dark);
}

.allocation-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.allocation-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border: 2px solid #000;
  background:
    linear-gradient(90deg, var(--blue) 0 14px, transparent 14px),
    #d8d1b3;
  box-shadow: 3px 3px 0 #000;
  padding: 9px 9px 9px 24px;
}

.allocation-item::before {
  position: absolute;
  top: 8px;
  left: 4px;
  width: 6px;
  height: 6px;
  background: #241a13;
  box-shadow:
    0 9px 0 #241a13,
    0 18px 0 #241a13;
  content: "";
}

.allocation-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.allocation-item span {
  border: 2px solid #000;
  background: var(--brand);
  color: #1e2119;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 3px 6px;
  white-space: nowrap;
}

.allocation-item .text-button {
  color: #4f6251;
  white-space: nowrap;
}


.empty-state {
  border: 2px dashed #000;
  background: rgba(255, 244, 216, 0.62);
  padding: 14px;
  color: #6b5a45;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: #2f261d;
}

.week-day-tasks .empty-state {
  border-width: 1px;
  box-shadow: none;
  padding: 6px 8px;
  font-size: 0.62rem;
  line-height: 1.2;
}

.week-day-tasks .empty-state strong {
  display: inline;
  margin: 0 5px 0 0;
  font-size: 0.62rem;
}

.week-day-tasks .empty-state span {
  display: inline;
  font-size: 0.6rem;
}

.week-day-tasks .empty-state span:empty {
  display: none;
}

.task-row.is-done {
  background: #cfc2a2;
}

.task-row.is-done strong {
  text-decoration: line-through;
  color: #776a58;
}

body[data-preview-mode="mobile"] {
  background:
    linear-gradient(90deg, rgba(240, 223, 189, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(240, 223, 189, 0.055) 1px, transparent 1px),
    #211a14;
  background-size: 14px 14px;
}

body[data-preview-mode="mobile"] .app-shell {
  width: min(430px, calc(100% - 24px));
  height: calc(100vh - 44px);
  min-height: 620px;
  margin: 22px auto;
  border: 4px solid #000;
  background: #2a211a;
  box-shadow: 8px 8px 0 #000;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 12px 92px;
}

body[data-preview-mode="mobile"] .topbar {
  grid-template-columns: 1fr;
  padding: 12px;
  position: sticky;
  top: 0;
  z-index: 4;
}

body[data-preview-mode="mobile"] .brand-cluster {
  align-items: end;
  position: relative;
  min-height: 76px;
  padding-right: 102px;
}

body[data-preview-mode="mobile"] h1 {
  font-size: 1.55rem;
}

body[data-preview-mode="mobile"] .pixel-companion {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 62px;
  pointer-events: none;
  transform: none;
  transform-origin: right top;
}

body[data-preview-mode="mobile"] .capybara-asset {
  width: 94px;
  height: 94px;
}

body[data-preview-mode="mobile"] .companion-tag {
  display: none;
}

body[data-preview-mode="mobile"] .sticker-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

body[data-preview-mode="mobile"] .pixel-sticker {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 92px;
  padding: 7px 4px;
  transform: none;
}

body[data-preview-mode="mobile"] .pixel-sticker::before {
  left: 50%;
  width: 34px;
  transform: translateX(-50%);
}

body[data-preview-mode="mobile"] .note-copy {
  justify-items: center;
  text-align: center;
}

body[data-preview-mode="mobile"] .note-copy strong {
  font-size: 0.62rem;
}

body[data-preview-mode="mobile"] .note-copy small {
  font-size: 0.58rem;
}

body[data-preview-mode="mobile"] .sticker-icon {
  width: 32px;
  height: 32px;
}

body[data-preview-mode="mobile"] .focus-core::before {
  inset: 7px;
}

body[data-preview-mode="mobile"] .topbar-actions {
  justify-content: stretch;
}

body[data-preview-mode="mobile"] .topbar-actions > * {
  flex: 1 1 100%;
}

body[data-preview-mode="mobile"] .topbar-actions > .secondary-button,
body[data-preview-mode="mobile"] .topbar-actions > .file-button,
body[data-preview-mode="mobile"] #rescheduleButton {
  display: none;
}

body[data-preview-mode="mobile"] .device-switch {
  grid-template-columns: 1fr 1fr;
}

body[data-preview-mode="mobile"] .device-switch span {
  grid-column: 1 / -1;
}

body[data-preview-mode="mobile"] .workspace {
  display: block;
}

body[data-preview-mode="mobile"] .core-nav {
  display: none;
}

body[data-preview-mode="mobile"] [data-mobile-panel] {
  display: none;
  margin-top: 14px;
}

body[data-preview-mode="mobile"][data-mobile-view="today"] [data-mobile-panel="today"],
body[data-preview-mode="mobile"][data-mobile-view="tasks"] [data-mobile-panel="tasks"],
body[data-preview-mode="mobile"][data-mobile-view="calendar"] [data-mobile-panel="calendar"],
body[data-preview-mode="mobile"][data-mobile-view="settings"] [data-mobile-panel="settings"] {
  display: block;
}

body[data-preview-mode="mobile"] .form-grid,
body[data-preview-mode="mobile"] .point-system-card,
body[data-preview-mode="mobile"] .inline-form,
body[data-preview-mode="mobile"] .task-form,
body[data-preview-mode="mobile"] .quick-deduct-form {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .journal-layout {
  grid-template-columns: 1fr;
  gap: 10px;
}

body[data-preview-mode="mobile"] .today-hero {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .week-board {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .week-day-card {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .week-day-tasks {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .placement-task-card,
body[data-preview-mode="mobile"] .used-allocation-row,
body[data-preview-mode="mobile"] .today-task-row {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .capacity-option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-preview-mode="mobile"] .capacity-adjuster {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .journal-task-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

body[data-preview-mode="mobile"] .journal-tab {
  min-width: 164px;
}

body[data-page="journal"][data-preview-mode="mobile"] .topbar-actions > .secondary-button {
  display: inline-flex;
}

body[data-page="journal"][data-preview-mode="mobile"] .journal-panel {
  min-height: auto;
  padding: 12px;
}

body[data-page="journal"][data-preview-mode="mobile"] .app-shell {
  width: min(430px, calc(100% - 8px));
  margin: 4px auto;
  padding: 8px 8px 86px;
}

body[data-page="journal"][data-preview-mode="mobile"] .panel-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body[data-page="journal"][data-preview-mode="mobile"] .metric-pill {
  justify-self: start;
}

body[data-page="journal"][data-preview-mode="mobile"] .journal-index,
body[data-page="journal"][data-preview-mode="mobile"] .journal-page {
  min-width: 0;
  padding: 8px;
}

body[data-page="journal"][data-preview-mode="mobile"] .journal-page {
  min-height: auto;
}

body[data-page="journal"][data-preview-mode="mobile"] .journal-page::before {
  left: 30px;
}

body[data-page="journal"][data-preview-mode="mobile"] .journal-progress-grid,
body[data-page="journal"][data-preview-mode="mobile"] .journal-status-bar,
body[data-page="journal"][data-preview-mode="mobile"] .journal-action-grid,
body[data-page="journal"][data-preview-mode="mobile"] .journal-log-toolbar {
  grid-template-columns: 1fr;
}

body[data-page="journal"][data-preview-mode="mobile"] .journal-usage-row {
  grid-template-columns: 1fr;
}

body[data-page="journal"][data-preview-mode="mobile"] .journal-writing-field textarea {
  width: 100%;
  min-height: 200px;
  font-size: 0.78rem;
}

body[data-preview-mode="mobile"] .availability-toolbar {
  flex-wrap: wrap;
}

body[data-preview-mode="mobile"] .availability-nav {
  order: 3;
  grid-template-columns: 34px 1fr 34px;
  width: 100%;
  margin-left: 0;
}

body[data-preview-mode="mobile"] .deduct-presets {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-preview-mode="mobile"] .segmented {
  grid-template-columns: repeat(4, minmax(46px, 1fr));
}

body[data-preview-mode="mobile"] .task-row,
body[data-preview-mode="mobile"] .list-row,
body[data-preview-mode="mobile"] .allocation-item,
body[data-preview-mode="mobile"] .day-title {
  grid-template-columns: 1fr;
}

body[data-preview-mode="mobile"] .task-actions {
  justify-content: stretch;
}

body[data-preview-mode="mobile"] .task-actions button {
  flex: 1;
}

body[data-preview-mode="mobile"] .mobile-tabbar {
  position: fixed;
  right: max(12px, calc((100vw - 430px) / 2 + 12px));
  bottom: 14px;
  left: max(12px, calc((100vw - 430px) / 2 + 12px));
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  border: 3px solid #000;
  background: #2f261d;
  box-shadow: 6px 6px 0 #000;
  padding: 8px;
}

body[data-preview-mode="mobile"] .mobile-tabbar button,
body[data-preview-mode="mobile"] .mobile-tabbar a {
  min-height: 44px;
  background: #ead7ae;
  color: #2f261d;
  box-shadow: 2px 2px 0 #000;
  padding: 0 6px;
  font-size: 0.78rem;
  font-weight: 950;
  text-decoration: none;
}

body[data-preview-mode="mobile"] .mobile-tabbar button.is-active {
  background: var(--brand);
}

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

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

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

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions > * {
    flex: 1 1 140px;
  }

  .panel {
    padding: 13px;
  }

  .form-grid,
  .inline-form,
  .task-form,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .segmented {
    grid-template-columns: repeat(4, minmax(46px, 1fr));
  }

  .task-row,
  .list-row,
  .allocation-item,
  .day-title {
    grid-template-columns: 1fr;
  }

  .task-actions {
    justify-content: stretch;
  }

  .task-actions button {
    flex: 1;
  }
}

body[data-preview-mode="desktop"] .topbar {
  grid-template-columns: minmax(260px, 1fr) auto;
}

body[data-preview-mode="desktop"] .workspace {
  display: block;
}

body[data-preview-mode="desktop"] [data-mobile-panel] {
  display: none;
}

body[data-preview-mode="desktop"][data-mobile-view="today"] [data-mobile-panel="today"],
body[data-preview-mode="desktop"][data-mobile-view="tasks"] [data-mobile-panel="tasks"],
body[data-preview-mode="desktop"][data-mobile-view="calendar"] [data-mobile-panel="calendar"],
body[data-preview-mode="desktop"][data-mobile-view="settings"] [data-mobile-panel="settings"] {
  display: block;
}

body[data-preview-mode="desktop"] .mobile-tabbar {
  display: none;
}

@media (max-width: 980px) {
  body[data-preview-mode="desktop"] .app-shell {
    padding: 18px;
  }

  body[data-preview-mode="desktop"] .inline-form,
  body[data-preview-mode="desktop"] .task-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-preview-mode="desktop"] .today-hero,
  body[data-preview-mode="desktop"] .week-day-card,
  body[data-preview-mode="desktop"] .placement-task-card,
  body[data-preview-mode="desktop"] .used-allocation-row,
  body[data-preview-mode="desktop"] .today-task-row {
    grid-template-columns: 1fr;
  }

  body[data-preview-mode="desktop"] .week-day-tasks {
    grid-template-columns: 1fr;
  }

  body[data-preview-mode="desktop"] .week-board {
    grid-template-columns: 1fr;
  }

  body[data-preview-mode="desktop"] .inline-form button,
  body[data-preview-mode="desktop"] .task-form button {
    width: 100%;
  }
}
