* { box-sizing: border-box }
:root {
  color-scheme: dark;
  --paper: #18141e;
  --panel: #241e2c;
  --panel-light: #302736;
  --ink: #f3eada;
  --muted: #c0afbe;
  --gold: #e3bf86;
  --line: #4b3c4b;
  --border-gold: #795c48;
  --display: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 85% 10%, #32233880, transparent 50rem), var(--paper);
  color: var(--ink);
  font: 1rem/1.48 Inter, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit }
button { background: none; border: 0; cursor: pointer }
button:disabled, select:disabled { opacity: .55; cursor: default }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #f7ca88; outline-offset: 3px;
}
h1, h2, p { margin: 0 }
.wrap { width: min(1240px, 100%); padding-inline: clamp(16px, 4.6vw, 62px); margin-inline: auto }
main.wrap { padding-bottom: 2.5rem }
.mast { background: #1b1622; border-bottom: 1px solid #493945 }
.mastinner, .brand, .profile, .primary, .dateline, .toolbar, .tabs, .tabs button, .controls,
.filter, .modes, .colhead, .cardfoot, .cardfoot span, .tag, .empty, .dlghead, .actions, .delete,
.calendarhelp button, .alarm { display: flex; align-items: center }
.mastinner { min-height: 68px; gap: 20px }
.brand { font: 600 2rem/1 var(--display); gap: 10px; letter-spacing: -.04em; color: #f5d7a8 }
.brand img { width: 38px; height: 38px }
.brandline { height: 19px; width: 1px; background: var(--border-gold) }
.subbrand { font-size: .92rem; color: #d1bdc9 }
.profile { margin-left: auto; border: 1px solid var(--line); border-radius: 22px; padding: 7px 14px; min-height: 42px; gap: 9px; font-size: .875rem }
.profile svg, .calendarhelp svg { color: var(--gold) }
.profile:hover, .modes button:hover, .addmini:hover, .dlghead button:hover { background: #39303f }
.heading {
  margin: clamp(20px, 3vw, 38px) 0 14px;
  position: relative; isolation: isolate; overflow: hidden; border-radius: 17px;
  min-height: 250px; display: flex; align-items: center; 
  border: 1px solid #785a53;
  background: linear-gradient(90deg, #201728e8 0%, #25172bc9 35%, #291d324a 64%, #21172669 100%),
              url("/art/moonlit-table.jpg") center 6% / cover, #251c2e;
  box-shadow: 0 12px 35px #100b1926;
}
.heading::before { content: ""; position: absolute; inset: 7px; border: 1px solid #dfb7804a; border-radius: 11px; pointer-events: none }
.cover-copy { z-index: 1; margin: 31px clamp(22px, 4.2vw, 57px); max-width: 62% }
.dateline { gap: 9px; color: #f4d7a6; font-size: .91rem }
.dateline span::first-letter, .cal div::first-letter { text-transform: uppercase }
h1 { font: 500 clamp(2.6rem, 5.15vw, 4.6rem)/1.12 var(--display); letter-spacing: -.045em; margin: 6px 0 20px; color: #fff2dc }
.primary {
  min-height: 44px; justify-content: center; gap: 8px; width: fit-content; padding: 10px 18px; border-radius: 9px;
  background: linear-gradient(125deg, #f3d5a2, #d7ad78); color: #301d1e; font-size: .92rem; font-weight: 650;
  box-shadow: inset 0 0 0 1px #fae3ba88;
}
.primary:hover:not(:disabled) { background: #f7dbac }
.deck { position: absolute; z-index: 0; height: 196px; aspect-ratio: .68; right: 12%; top: 50%; transform: translateY(-51%); pointer-events: none }
.tarot { position: absolute; inset: 0; border-radius: 8px; border: 1px solid #d2a571; box-shadow: 4px 8px 18px #09061285; overflow: hidden }
.tarot::after { content: ""; position: absolute; inset: 4px; border: 1px solid #c99f68b8; border-radius: 4px; pointer-events: none }
.tarot-back { display: grid; place-items: center; color: var(--gold); background-color: #2c2134;
  background-image: repeating-radial-gradient(ellipse at 50% 50%, transparent 0 12px, #b28a684b 13px, transparent 14px 21px);
  transform: translate(31%, 3%) rotate(17deg);
}
.tarot-back svg { padding: 6px; box-sizing: content-box; border-radius: 50%; background: #302332 }
.tarot-face { padding: 7px; background: #30232b; transform: rotate(-8deg) }
.tarot-face img { height: 100%; width: 100%; display: block; object-fit: cover; border-radius: 2px }
.summary { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 14px }
.next, .progressbox { border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(120deg, #2c2332, #231e2b); min-width: 0 }
.next { display: flex; align-items: center; gap: 17px; padding: 16px 22px }
.cal { width: 53px; flex: 0 0 53px; text-align: center; border: 1px solid #927150; border-radius: 8px; color: var(--gold); background: #221d26; overflow: hidden }
.cal div { font-size: .75rem; background: #463341; padding: 2px; border-bottom: 1px solid #654c49; color: #f0d2b2 }
.cal b { display: block; font: 500 1.7rem/1.27 var(--display) }
.nexttext { min-width: 0 }
.eyebrow { display: block; color: #d4bdc8; font-size: .875rem }
.nexttext strong, .nexttext button { display: block; margin: 1px 0; padding: 0; text-align: left; font: 500 clamp(1.13rem, 2vw, 1.48rem)/1.28 var(--display); overflow-wrap: anywhere }
.nexttext button:hover { color: var(--gold); text-decoration: underline }
.nexttext small, .notice, small, .excerpt, .cardfoot { color: var(--muted) }
small, .nexttext small { font-size: .85rem }
.progressbox { padding: 14px 22px; display: grid; grid-template-columns: 1fr auto; align-content: center; align-items: baseline; gap: 9px 12px }
.progressbox b { font: 500 1.7rem/1 var(--display); color: #f1d9af }
.progressbox div span { font-size: .875rem; color: var(--muted) }
progress { grid-column: 1/-1; width: 100%; height: 6px; border: none; appearance: none; border-radius: 5px; background: #4a3d50; color: var(--gold) }
progress::-webkit-progress-bar { background: #4a3d50; border-radius: 5px }
progress::-webkit-progress-value { background: var(--gold); border-radius: 5px }
progress::-moz-progress-bar { background: var(--gold); border-radius: 5px }
.toolbar { justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 25px 0 15px }
.tabs, .controls { gap: 6px }
.tabs { flex-wrap: wrap }
.tabs button { min-height: 42px; padding: 7px 14px; gap: 7px; color: var(--muted); font-size: .9rem; border: 1px solid transparent; border-radius: 9px }
.tabs button:hover { color: var(--ink) }
.tabs button.selected { color: #f2d5a9; background: #3b2d37; border-color: #7e6051 }
.filter, .modes { min-height: 42px; background: #251f2b; border: 1px solid var(--line); border-radius: 9px; gap: 2px }
.filter { padding-left: 10px; color: #d8c9d6 }
.filter select { font-size: .875rem; border: 0; min-height: 40px; padding: 6px 28px 6px 4px; background-color: transparent }
.modes { padding: 3px }
.modes button, .addmini, .dlghead button, .stageicon { display: grid; place-items: center }
.modes button { border-radius: 6px; min-height: 34px; width: 36px; color: #c5b3c5 }
.modes button[aria-pressed=true] { background: #473646; color: #f6d6a2 }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px }
.column { --accent: #cab0e5; --tint: #403147; border: 1px solid #514152; border-radius: 13px; padding: 13px; background: linear-gradient(145deg, #2a2232, #231e29); min-width: 0 }
.column.active { --accent: #e3b28c; --tint: #4b3534 }
.column.done { --accent: #accda8; --tint: #303d35 }
.colhead { min-height: 41px; gap: 8px; margin-bottom: 11px }
.colhead h2 { font: 500 1.35rem/1.2 var(--display) }
.stageicon { width: 30px; height: 30px; color: var(--accent); background: var(--tint); border-radius: 50% }
.count { min-width: 21px; text-align: center; color: var(--accent); font-size: .8rem; font-variant-numeric: tabular-nums }
.addmini, .dlghead button { margin-left: auto; height: 40px; width: 40px; border-radius: 8px; color: #cdb8c9 }
.cards { display: grid; gap: 9px; min-width: 0 }
.empty { position: relative; isolation: isolate; min-height: 145px; width: 100%; justify-content: center; align-items: flex-end; padding: 14px; gap: 6px; color: #dac9d4; font-size: .875rem; line-height: 20px; border: 1px dashed #655161; border-radius: 8px; background: #1e19239e }
.empty svg { margin-bottom: 2px }
.empty::before { content: ""; position: absolute; pointer-events: none; left: 50%; top: calc(50% - 16px); transform: translate(-50%,-50%); width: 77px; height: 70px;
  background: url("/art/crystals.png") center / contain no-repeat;
}
.active .empty::before { width: 72px; height: 76px; background-image: url("/art/cards.png") }
.done .empty::before { width: 64px; height: 80px; background-image: url("/art/lantern.png") }
.empty:hover { background: #322736; border-color: #ad8768; color: #f4d6a5 }
.taskcard { display: flex; align-items: flex-start; flex-direction: column; gap: 9px; min-width: 0; width: 100%; text-align: left; background: var(--panel-light); border: 1px solid #584655; border-radius: 9px; padding: 15px; color: var(--ink) }
.taskcard:hover { border-color: #a37c64; background: #392d3c }
.taskcard strong, .excerpt { overflow-wrap: anywhere }
.taskcard strong { font-size: 1.02rem; font-weight: 600 }
.tag { gap: 5px; border-radius: 5px; padding: 2px 7px; color: #c4d9ba; background: #37423b; font-size: .82rem }
.tag.work { color: #e2c5ee; background: #493950 }
.excerpt { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.cardfoot { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: .85rem }
.cardfoot span { gap: 5px }
.late, .delete { color: #f6afa7 }
.board.list { grid-template-columns: 1fr }
.list .taskcard { flex-flow: row wrap; align-items: center }
.list .cardfoot { width: auto; margin-left: auto; gap: 14px }
.list .empty { min-height: 44px; align-items: center; padding: 8px }
.list .empty::before { display: none }
dialog { color: var(--ink); border: 1px solid #8d6b57; border-radius: 15px; padding: 0; background: var(--panel); width: min(490px,calc(100% - 24px)); max-height: 92dvh; box-shadow: 0 25px 100px #0b080ebf }
dialog::backdrop { background: #100b17c9 }
form, .settings { display: grid; gap: 14px; padding: 24px }
.dlghead { border-bottom: 1px solid var(--line); padding-bottom: 9px }
.dlghead h2 { font: 500 1.62rem/1.15 var(--display); color: #f5dbb6 }
label { display: grid; min-width: 0; gap: 5px; font-size: .875rem; color: #e1cfdc }
input, select, textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; font-size: 1rem; padding: 9px 11px; color: var(--ink); border: 1px solid #645062; border-radius: 8px; background-color: #1e1924 }
input::placeholder, textarea::placeholder { color: #aa9cab }
select { appearance: none; padding-right: 29px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23d9c0ab' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center }
option { background: #251d2a; color: var(--ink) }
textarea { resize: vertical }
.pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px }
.actions { justify-content: flex-end; gap: 10px }
.delete { margin-right: auto; gap: 6px; font-size: .875rem }
.calendarhelp { background: #322937; border: 1px solid #514353; border-radius: 9px; padding: 12px; display: grid; gap: 6px }
.calendarhelp button { width: fit-content; padding: 0; gap: 7px; color: #f0d3aa }
.settings p, .notice { font-size: .9rem }
.alert, .alarm { padding: 12px 16px; margin: 10px 0; background: #483439; border: 1px solid #a1795e; border-radius: 10px; overflow-wrap: anywhere }
.alert button { text-decoration: underline; color: var(--gold) }
.alarm { position: fixed; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%); width: min(480px,95%); box-shadow: 0 8px 22px #110b18a8; gap: 10px }
.alarm button { margin-left: auto }
.notice { margin-top: 12px }
.account-info { color: var(--muted); overflow-wrap: anywhere }
.account-info strong { color: var(--ink); font-weight: 500 }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between }
.profile-actions a { color: var(--gold); font-size: .875rem }
@media (max-width: 760px) {
  .wrap { padding-inline: 18px }
  .mastinner { min-height: 60px }
  .deck { height: 155px; right: 10% }
  .heading { min-height: 215px }
  .board { grid-template-columns: 1fr }
  .column { padding: 10px 12px }
  .colhead { margin-bottom: 6px }
  .empty { min-height: 60px; align-items: center; justify-content: flex-start; padding: 10px 17px }
  .empty::before { left: auto; right: 15px; top: 50%; transform-origin: center right; transform: translateY(-50%) scale(.57) }
  .next, .progressbox { padding: 12px 15px }
  .next { gap: 11px }
  .progressbox { display: flex; flex-direction: column; gap: 3px; align-items: stretch; justify-content: center }
  .progressbox b { font-size: 1.38rem }
  .progressbox progress { margin-top: 4px }
}
@media (max-width: 530px) {
  .wrap { padding-inline: 12px }
  .mastinner { gap: 12px }
  .profile { width: 42px; padding: 0; justify-content: center }
  .profile span { display: none }
  .subbrand { font-size: .83rem }
  .brand { font-size: 1.7rem }
  .brand img { width: 32px; height: 32px }
  .heading { min-height: 184px; margin: 14px 0 10px; background-position: center, 48% 38% }
  .deck { height: clamp(92px,25vw,128px); right: 10%; top: 54% }
  .cover-copy { margin: 18px; max-width: 66% }
  .dateline { font-size: .8rem; gap: 5px }
  h1 { font-size: clamp(2.15rem,8.7vw,2.9rem); margin: 8px 0 16px }
  .summary { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 8px }
  .next, .progressbox { padding: 12px }
  .cal { display: none }
  .nexttext strong, .nexttext button { font-size: 1.05rem }
  .nexttext small { font-size: .8rem; line-height: 1.2; display: block; margin-top: 4px }
  .nexttext small:empty { display: none }
  .toolbar { margin: 17px 0 10px; gap: 8px }
  .tabs button { padding-inline: 11px; min-height: 42px }
  .controls { width: 100%; justify-content: space-between }
  .board { gap: 9px }
  .pair { gap: 8px }
  form, .settings { padding: 15px }
  .pair:has(input[type=datetime-local]) { grid-template-columns: 1fr }
}
@media (max-width: 350px) {
  .dateline svg { display: none }
  .deck { right: 8% }
  .cover-copy { margin-inline: 14px }
}
.main-nav, .main-nav a, .secondary, .back-link, .contact, .client-entry, .client-caption { display: flex; align-items: center }
.main-nav { gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px }
.main-nav a { gap: 7px; padding: 8px 13px; min-height: 38px; border-radius: 7px; text-decoration: none; color: var(--muted); font-size: .9rem }
.main-nav a[aria-current="page"] { background: #42323f; color: #f5d6a4 }
.main-nav a:hover, .back-link:hover, .contact:hover { color: #fff0d5 }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px }
.directory { padding-top: clamp(20px,4vw,52px) }
.directory-title, .linked-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px }
.directory-title h1 { font-size: clamp(2.2rem,5vw,4rem); margin: 0; overflow-wrap: anywhere; min-width: 0 }
.directory h2 { font: 500 1.4rem/1.25 var(--display) }
.directory-empty, .client-panel, .client-entry { background: linear-gradient(135deg,#2c2332,var(--panel)); border: 1px solid var(--line); border-radius: 13px }
.directory-empty { text-align: center; padding: clamp(30px,7vw,80px) 20px }
.directory-empty svg, .initial, .back-link, .contact { color: var(--gold) }
.directory-empty h2 { margin: 12px 0 6px }
.directory-empty p, .muted { color: var(--muted); margin: 6px 0 }
.directory-search { position: relative; max-width: 27rem; margin: 0 0 16px }
.directory-search svg { position: absolute; left: 12px; top: 14px; pointer-events: none; color: var(--muted) }
.directory-search input { padding-left: 39px }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,250px),1fr)); gap: 12px }
.client-entry { gap: 14px; padding: 17px; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; min-width: 0 }
.client-entry:hover, .linked-task:hover, .secondary:hover { border-color: #a07c62 }
.client-entry small { display: block; margin-top: 2px }
.initial { flex: 0 0 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-gold); background: #392c36; font: 1.45rem var(--display) }
.client-detail { display: grid; gap: 14px; grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); align-items: start }
.client-panel { padding: clamp(16px,2.2vw,26px); min-width: 0; overflow-wrap: anywhere }
.client-panel h2 { margin-bottom: 12px }
.secondary { justify-content: center; gap: 7px; min-height: 42px; border-radius: 8px; border: 1px solid var(--border-gold); padding: 8px 12px; color: #edd0a5; font-size: .9rem }
.back-link, .contact { gap: 8px; text-decoration: none; min-height: 42px; width: fit-content; max-width: 100% }
.contact svg, .client-caption svg { flex-shrink: 0 }
.contact-methods { padding: 0; margin: 0; list-style: none }
.contact-methods li + li { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 13px }
.contact-kind, .contact-badges, .purpose-options { display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
.contact-kind { color: var(--muted); font-size: .875rem }
.contact-value { display: block; width: fit-content; max-width: 100%; padding: 6px 0; overflow-wrap: anywhere; color: var(--ink) }
a.contact-value { color: var(--gold); text-underline-offset: 4px }
.contact-badges span { color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: .875rem }
.contact-badges .preferred { color: var(--gold); border-color: var(--border-gold) }
.contact-editor { display: grid; gap: 9px }
.contact-editor h3 { margin: 0; font: 500 1.25rem var(--display) }
.contact-fields { display: grid; min-width: 0; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px }
.contact-fields legend { color: var(--muted); padding-inline: 4px; font-size: .875rem }
.contact-fields-top { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: end; gap: 5px }
.remove-contact { min-height: 44px; color: var(--muted) }
.purpose-options { gap: 0 14px }
.purpose-options label { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; cursor: pointer }
.purpose-options input { width: 18px; min-height: 0; height: 18px; margin: 0; accent-color: var(--gold) }
.add-contact { justify-self: start }
.back-link { margin-bottom: 10px; font-size: .9rem }
.client-panel .notes-heading { padding-top: 18px; border-top: 1px solid var(--line); margin: 17px 0 7px }
.client-notes { white-space: pre-wrap }
.linked-heading { margin-bottom: 13px }
.linked-heading h2 { margin: 0 }
.linked-list { display: grid; gap: 7px }
.linked-task { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-width: 0; width: 100%; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; text-align: left; background: #302736; overflow-wrap: anywhere }
.linked-task span, .client-caption { font-size: .85rem; color: var(--muted) }
.client-caption { gap: 6px; max-width: 100%; overflow-wrap: anywhere }
@media(max-width:800px) {
  .mastinner .subbrand, .mastinner .brandline { display: none }
}
@media(max-width:600px) {
  .client-detail { grid-template-columns: 1fr }
  .main-nav a { padding-inline: 8px; gap: 5px }
  .directory-title { margin-bottom: 15px }
  .mastinner { gap: 7px }
  .profile span { display: none }
  .profile { width: 42px; padding: 0; justify-content: center }
}
@media(max-width:350px) {
  .main-nav a { padding-inline: 6px }
  .main-nav svg { display: none }
}
.ideas { max-width: 56rem; margin-inline: auto }
.idea-form, .idea-entry { border: 1px solid var(--line); border-radius: 13px; background: var(--panel) }
.idea-form { background: linear-gradient(135deg,#322735,var(--panel)); padding: clamp(14px,3vw,24px) }
.idea-label { gap: 12px }
.idea-label > span { display: flex; gap: 10px; align-items: center; color: var(--ink); font: 1.35rem var(--display) }
.idea-label svg, .idea-meta svg { color: var(--gold) }
.idea-form-actions, .idea-visibility, .idea-meta, .idea-meta span, .idea-delete { display: flex; align-items: center }
.idea-form-actions { gap: 8px; flex-wrap: wrap }
.idea-visibility { margin-right: auto; gap: 8px; min-height: 44px; cursor: pointer; font-size: .95rem }
.idea-visibility input { width: 18px; min-height: 0; height: 18px; accent-color: var(--gold); margin: 0 }
.idea-delete { justify-self: start; gap: 7px; color: #e6b4a4; min-height: 42px }
.idea-feedback { margin: 8px 0; color: var(--gold); font-size: .9rem }
.idea-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px }
.idea-list-heading .directory-search { margin: 0 }
.idea-list { padding: 0; margin: 0; list-style: none; display: grid; gap: 12px }
.idea-entry { padding: 14px clamp(14px,3vw,24px) 20px; min-width: 0 }
.idea-entry:has(.idea-form) { padding: 0 }
.idea-entry .idea-form { border: 0 }
.idea-meta { min-height: 42px; gap: 8px 14px; flex-wrap: wrap; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere }
.idea-meta span { gap: 6px }
.idea-meta button { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: 8px }
.idea-meta button:hover { background: var(--panel-light) }
.idea-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6 }
.schedule-panel, .client-work { margin-top: 16px }
.schedule-row { align-items: center; flex-wrap: nowrap; justify-content: flex-start; gap: 12px }
.schedule-row > span { flex: 1; min-width: 0 }
.schedule-row svg { color: var(--gold); flex-shrink: 0 }
.schedule-row strong, .schedule-row small, .day-task > span { display: block }
.schedule-row strong, .day-task strong { color: var(--ink); font-size: 1rem }
.day-plan { margin: 14px 0 }
.day-plan h2 { margin: 0; font: 500 1.55rem var(--display) }
.day-plan ul { margin: 0; list-style: none; padding: 0 }
.day-plan li { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line) }
.day-complete { min-width: 44px; min-height: 44px; display: grid; place-items: center; color: var(--muted) }
.day-complete svg { border: 1px solid var(--border-gold); border-radius: 50%; padding: 4px; box-sizing: content-box }
.day-complete:hover svg { color: var(--gold); background: var(--panel-light) }
.day-task { flex: 1; min-width: 0; text-align: left; padding: 7px 0; overflow-wrap: anywhere }
.day-task > span { font-size: .875rem; color: var(--muted) }
.work-links, .work-filters, .report-tools, .work-total, .report-total { display: flex; align-items: center; flex-wrap: wrap; gap: 12px }
.work-links a, .work-filters a { text-decoration: none }
.work-filters { align-items: end; padding-bottom: 18px }
.work-filters label { width: min(100%,15rem) }
.work-help { margin-bottom: 16px }
.work-text-link, .report-tools a { color: var(--gold); text-underline-offset: 4px }
.work-rows { list-style: none; margin: 0; padding: 0 }
.work-rows li { border-top: 1px solid var(--line) }
.work-rows button { width: 100%; min-height: 54px; display: grid; grid-template-columns: 6.5rem 1fr auto 18px; gap: 12px; align-items: center; text-align: left; padding: 10px 4px }
.work-rows button:hover { background: var(--panel-light) }
.work-rows time, .work-name small, .work-rows svg { color: var(--muted); font-size: .875rem }
.work-name { min-width: 0; overflow-wrap: anywhere }
.work-name small { display: block }
.work-price, .work-total strong, .report-total strong { font-variant-numeric: tabular-nums }
.work-total, .report-total { justify-content: space-between; border-top: 1px solid var(--border-gold); padding-top: 15px }
.work-total strong { color: var(--gold); font-size: 1.2rem }
.work-report { margin: 0 auto; max-width: 52rem; padding: clamp(12px,3vw,30px) }
.report-tools { justify-content: space-between; margin-bottom: 16px }
.report-sheet { color-scheme: light; color: #242026; background: #fffcf8; padding: clamp(16px,5vw,56px); border-radius: 8px; overflow-wrap: anywhere }
.report-sheet header { border-bottom: 2px solid #8d6b49; padding-bottom: 18px; margin-bottom: 20px }
.report-sheet h1 { font: 550 clamp(1.75rem,4vw,2.6rem)/1.2 var(--display); color: inherit }
.report-period { margin-top: 6px; color: #5d5149 }
.report-sheet h2 { font-weight: 600; font-size: 1.25rem }
.report-inn { color: #5d5149; font-size: .9rem }
.report-sheet table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 20px 0 0 }
.report-sheet th, .report-sheet td { text-align: left; vertical-align: top; border-bottom: 1px solid #cec6bd; padding: 9px 4px }
.report-sheet th { color: #57483e; font-size: .875rem }
.report-sheet th:first-child { width: 21% }
.report-sheet th:last-child { width: 28% }
.report-sheet :is(th,td):last-child { text-align: right; font-variant-numeric: tabular-nums }
.report-total { border-color: #8d6b49; margin-top: 8px; break-inside: avoid }
.report-surcharge-control { display: flex; align-items: center; gap: 9px; width: fit-content; min-height: 44px; margin: 9px 0; color: #42352c; cursor: pointer }
.report-surcharge-control input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: #715531 }
.report-summary { break-inside: avoid }
.report-breakdown { margin-top: 14px; font-variant-numeric: tabular-nums }
.report-breakdown p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 3px 0 }
.report-save-error { color: #8b2621 }
.report-empty { margin-top: 18px }
.billing-panel { border-block: 1px solid var(--line); padding-block: 17px; margin-block: 14px }
.billing-title, .billing-selection, .billing-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px }
.billing-title { margin-bottom: 10px }
.billing-title h2 { margin: 0 }
.billing-title .muted, .billing-actions p { font-size: .9rem }
.billing-rows, .invoice-list { list-style: none; padding: 0; margin: 0 }
.billing-rows label { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 4px; min-height: 48px; color: var(--ink); cursor: pointer }
.billing-rows li + li, .invoice-list li + li { border-top: 1px solid var(--line) }
.billing-rows li:has(:checked) { background: var(--panel-light) }
.billing-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer }
.billing-panel input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--gold) }
.billing-selection { border-top: 1px solid var(--border-gold); padding-top: 12px }
.billing-history { margin-top: 14px }
.billing-history summary { cursor: pointer; color: var(--gold); padding-block: 8px }
.invoice-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 24px; padding: 12px 0 }
.invoice-link, .payment-actions, .payment-total { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px }
.invoice-link { padding: 5px 0; text-decoration: none }
.invoice-link:hover strong { text-decoration: underline }
.invoice-link small { display: block; color: var(--muted); margin-top: 4px }
.payment-actions { justify-content: flex-end; font-size: .9rem }
.paid-label { color: #b6d8b8 }
.payment-total { border-bottom: 1px solid var(--border-gold); padding-bottom: 14px }
.payment-total strong { color: var(--gold); font-variant-numeric: tabular-nums; font-size: 1.25rem }
@media(max-width:650px) {
  .invoice-list li { grid-template-columns: minmax(0,1fr) }
  .payment-actions { justify-content: flex-start }
}
.journal-subheading { margin: 14px 0 8px }
dialog.billing-preview { width: min(52rem,calc(100% - 24px)); padding: clamp(10px,2vw,20px) }
.billing-actions { padding: 7px 0 12px }
.billing-actions:last-of-type { padding: 12px 0 0 }
@media print {
  body:has(>dialog.billing-preview[open]) > :not(.billing-preview) { display: none !important }
  dialog.billing-preview[open] { position: static; display: block; width: 100%; height: auto; max-width: none; max-height: none; overflow: visible; margin: 0; padding: 0; background: white; border: 0; box-shadow: none }
  dialog.billing-preview::backdrop { background: transparent }
  .billing-preview .billing-actions, .billing-preview .alert { display: none }
}
@media(max-width:600px) {
  .work-filters label { flex: 1 1 9rem }
  .work-rows button { grid-template-columns: 1fr auto 15px; gap: 3px 7px }
  .work-rows time { grid-column: 1/-1 }
  .report-sheet td, .report-sheet th { font-size: .875rem }
  .report-sheet th:first-child { width: 26% }
  .report-sheet th:last-child { width: 30% }
}
@media(max-width:650px) {
  .mastinner { flex-wrap: wrap; padding-block: 8px }
  .main-nav { order: 1; width: 100% }
  .main-nav a { flex: 1; justify-content: center }
}
@media print {
  :root { color-scheme: light }
  body { background: white; color: black; min-height: auto }
  .work-report { padding: 0; max-width: none }
  .report-tools, .report-surcharge-control, .report-save-error { display: none }
  .report-sheet { background: white; padding: 0; border-radius: 0 }
  .report-sheet thead { display: table-header-group }
  .report-sheet tr { break-inside: avoid }
  .report-sheet header, .report-sheet h2 { break-after: avoid }
}
@media(max-width:460px) {
  .mastinner { flex-wrap: wrap; padding-block: 8px; gap: 6px }
  .main-nav { order: 1; width: 100% }
  .main-nav a { flex: 1; justify-content: center; min-height: 42px }
  .idea-list-heading .directory-search { width: 100% }
}
