:root {
 color-scheme: dark;
 --bg: #2c353a;
 --deep: #252d31;
 --text: #d4c7a9;
 --bright: #e4d8be;
 --muted: #b7b09d;
 --line: #475354;
 --input-line: #626b62;
 --hover: #404c4d;
 --green: #69dba5;
 --warning: #e5bb7d;
 --danger: #f3a78f;
 font-family: Consolas, 'SFMono-Regular', 'Liberation Mono', monospace;
 font-size: 14px;
 line-height: 1.55;
 scroll-padding-top: 24px;
 accent-color: var(--text);
 scrollbar-color: #858777 var(--deep);
 scrollbar-width: thin;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; }
input, select, textarea {
 color: var(--bright); background: var(--bg); border: 1px solid var(--input-line);
 border-radius: 11px; min-width: 0; min-height: 46px; width: 100%;
 padding: 11px 12px; font-size: 16px; line-height: 1.4; outline: none;
 transition: border-color .15s, background .15s;
}
input:hover, select:hover, textarea:hover { border-color: #969681; }
input:focus, select:focus, textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px #d4c7a91c; }
::placeholder { color: #a3a18f; opacity: 1; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex-shrink: 0; accent-color: var(--text); box-shadow: none; }
input[type=date] { color-scheme: dark; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .8; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, input[type=radio]:focus-visible, input[type=checkbox]:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23d4c7a9' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right 15px center; background-repeat: no-repeat; padding-right: 38px; cursor: pointer; }
option { background: var(--deep); color: var(--bright); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--deep); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #858777; border: 2px solid var(--deep); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #b7af98; }
::selection { background: #716c59; color: var(--bright); }
[hidden] { display: none !important; }
.shell { width: min(1280px, calc(100% - 64px)); margin: 0 auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 0; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-icon { width: 50px; height: 50px; border: 1px solid var(--input-line); border-radius: 15px; display: grid; place-items: center; background: var(--deep); flex-shrink: 0; }
.brand-icon svg { width: 28px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
h1 { font-size: clamp(23px, 2.5vw, 30px); letter-spacing: -.7px; line-height: 1.25; margin: 0; font-weight: 700; text-wrap: balance; }
.button { border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 16px; border-radius: 12px; background: var(--text); color: var(--deep); font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; transition: background .15s, transform .15s; }
.button:not(:disabled):hover { background: var(--bright); }
.button:not(:disabled):active { transform: translateY(1px); }
.secondary { background: var(--hover); color: var(--bright); }
.secondary:not(:disabled):hover { background: #4c5a58; }
.clear-button { flex-shrink: 0; }
.full { width: 100%; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.inputs, .results { display: grid; gap: 22px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 20px; padding: 26px; min-width: 0; }
h2 { display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 700; line-height: 1.35; letter-spacing: -.35px; margin: 0 0 24px; color: var(--bright); }
.step { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid #8b8875; border-radius: 50%; background: var(--deep); color: var(--bright); font-size: 21px; font-weight: 600; line-height: 1; }
.rule { height: 1px; background: var(--line); margin: 24px 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin: 0 0 12px; padding: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.duration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.duration-grid label, .field { display: block; font-size: 13px; color: var(--muted); }
.duration-grid label input, .field input { margin-top: 8px; }
.field { margin: 12px 0 0; }
.field > input { display: block; }
.adjustment-options { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.presets { display: flex; align-items: center; gap: 18px; }
.presets label, .custom-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14px; }
.presets label:has(input:checked), .custom-toggle:has(input:checked) { color: var(--bright); }
.custom-option { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.percentage-input { display: flex; align-items: center; gap: 7px; }
.custom-percentage { width: 94px; }
.custom-percentage input { width: 72px; flex: 1; padding: 10px; }
.check-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.check-line strong { font-size: 14px; }
.check-line small { display: block; font-size: 13px; line-height: 1.6; font-weight: 400; color: var(--muted); margin-top: 5px; }
.check-end { display: flex; align-items: center; gap: 9px; flex-shrink: 0; min-height: 44px; }
.hint { font-size: 13px; line-height: 1.65; color: var(--muted); margin: 10px 0 0; overflow-wrap: anywhere; }
.intro-hint { margin: -7px 0 22px; }
.bottom-hint { margin-top: 16px; }
.clock-grid { display: grid; gap: 18px; }
.clock-row { display: grid; grid-template-columns: 52px minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.row-label { font-size: 14px; font-weight: 600; }
.now-button { padding: 10px 12px; font-size: 13px; }
.check-simple { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 13px; min-height: 44px; }
.muted { color: var(--muted); }
#clockRemainingPanel { margin-top: 18px; }
#clockRemainingPanel > .hint { margin-bottom: 12px; }
.break-entry { border: 1px solid var(--line); border-radius: 15px; padding: 18px; margin-bottom: 18px; background: #293237; }
.break-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.break-reason-label { grid-column: 1; grid-row: 1; font-size: 13px; color: var(--muted); }
.break-heading select { grid-column: 1 / -1; grid-row: 2; }
.break-heading .remove-break { grid-column: 2; grid-row: 1; }
.remove-break { font-size: 23px; font-weight: 400; width: 46px; height: 46px; padding: 0; flex-shrink: 0; }
.break-entry > .field { margin: 16px 0 20px; }
.empty-note { font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 18px; padding: 20px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.allowance-result { background: var(--deep); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.big-value { font-size: clamp(29px, 2.8vw, 36px); line-height: 1.3; letter-spacing: -.8px; font-weight: 700; margin: 0; color: var(--bright); overflow-wrap: anywhere; }
.breakdown { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.breakdown > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 13px; }
.breakdown dt { color: var(--muted); }
.breakdown dd { margin: 0; text-align: right; color: var(--bright); font-weight: 600; overflow-wrap: anywhere; }
.balance { background: var(--deep); border-radius: 13px; padding: 18px; margin-top: 22px; }
.balance .eyebrow { margin-bottom: 8px; }
#balanceValue { color: var(--green); font-size: 30px; font-weight: 700; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.balance.over #balanceValue { color: var(--danger); }
.deadline { margin-top: 18px; white-space: pre-line; }
.validation { font-size: 13px; line-height: 1.65; color: var(--warning); margin: 16px 0 0; }
.validation:empty { display: none; }
.assessment-result h2 { font-size: 19px; margin-bottom: 16px; }
.assessment-result textarea { height: 220px; font-size: 14px; line-height: 1.7; padding: 15px; min-height: 160px; }
.assessment-result .button { margin-top: 14px; }
.copy-status { min-height: 20px; margin-top: 10px; color: var(--green); }
.help { padding: 0 4px 4px; color: var(--muted); font-size: 13px; }
.help summary { cursor: pointer; color: var(--text); padding: 11px 0; min-height: 44px; }
.help p { margin: 10px 0; line-height: 1.75; }
footer { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.7; padding: 32px 0 36px; }
.privacy-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; flex-shrink: 0; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; padding: 10px 18px; background: var(--text); color: var(--deep); z-index: 20; border-radius: 10px; }
.mobile-result { display: none; }
dialog { background: var(--deep); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 26px; width: min(560px, calc(100% - 32px)); }
dialog::backdrop { background: #0a141bc9; }
dialog textarea { margin: 16px 0; height: 280px; }
.no-script { padding: 24px; color: var(--warning); }
@media (min-width: 1100px) and (min-height: 1000px) { .results { position: sticky; top: 24px; } }
@media (max-width: 1150px) and (min-width: 1001px) {
 .shell { width: calc(100% - 40px); }
 .card { padding: 22px; }
 .clock-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; }
 .row-label { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
 .shell { width: min(700px, calc(100% - 40px)); }
 .page-header { padding: 26px 0; gap: 18px; }
 .brand { gap: 12px; }
 h1 { font-size: 25px; }
 .workspace { grid-template-columns: minmax(0, 1fr); gap: 22px; }
 .results { scroll-margin-top: 20px; }
 .big-value { font-size: 34px; }
 .mobile-result { position: fixed; display: flex; align-items: center; justify-content: space-between; gap: 16px; left: 0; bottom: 0; width: 100%; background: #252d31f7; border-top: 1px solid var(--line); padding: 13px max(20px, calc((100vw - 650px)/2)) max(13px, env(safe-area-inset-bottom)); backdrop-filter: blur(12px); text-decoration: none; z-index: 5; min-height: 80px; }
 .mobile-result small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
 .mobile-result strong { display: block; font-size: 17px; color: var(--bright); }
 .mobile-result > span:last-child { font-size: 13px; flex-shrink: 0; }
 footer { padding-bottom: 118px; }
}
@media (max-width: 600px) {
 .shell { width: calc(100% - 32px); }
 .page-header { align-items: center; gap: 12px; padding: 22px 0; }
 .brand-icon { display: none; }
 h1 { font-size: 23px; }
 .clear-button { font-size: 13px; padding: 10px 12px; }
 .card { padding: 20px; border-radius: 17px; }
 h2 { font-size: 19px; gap: 12px; margin-bottom: 22px; }
 .step { width: 36px; height: 36px; flex-basis: 36px; font-size: 20px; }
 .duration-grid { gap: 10px; }
 .clock-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
 .row-label { grid-column: 1; grid-row: 1; }
 .clock-row > input[type=date] { grid-column: 1; grid-row: 2; }
 .clock-row > input[type=text] { grid-column: 2; grid-row: 2; }
 .now-button { grid-column: 2; grid-row: 1; justify-self: end; min-height: 40px; padding: 8px 14px; }
 .clock-grid { gap: 22px; }
 .break-entry { padding: 14px; }
 .break-heading select { font-size: 15px; }
 .check-line { align-items: flex-start; gap: 12px; }
 .check-line small { font-size: 12px; }
 .adjustment-options { gap: 10px 14px; }
 .presets { gap: 14px; }
 .custom-percentage { width: 88px; }
 .big-value { font-size: 32px; }
 .breakdown > div { gap: 12px; }
 footer { font-size: 12px; }
}
@media (max-width: 380px) {
 .shell { width: calc(100% - 24px); }
 .card { padding: 16px; }
 h1 { font-size: 21px; }
 h2 { font-size: 18px; }
 .page-header { gap: 10px; }
 .clear-button { font-size: 12px; padding: 10px; }
 .clock-row { grid-template-columns: minmax(0, 1fr) auto; }
 .row-label { grid-column: 1 / -1; }
 .clock-row > input[type=date] { grid-column: 1 / -1; grid-row: 2; }
 .clock-row > input[type=text] { grid-column: 1; grid-row: 3; }
 .now-button { grid-column: 2; grid-row: 3; }
 .break-entry { padding: 12px; }
 .break-heading { gap: 8px; }
 .break-heading select { font-size: 14px; }
 .duration-grid { gap: 8px; }
 .duration-grid input { padding: 11px 9px; }
 .mobile-result { gap: 10px; padding-left: 16px; padding-right: 16px; }
 .mobile-result strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
