@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: Bricolage;
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f7f0;
  --surface: #fffefa;
  --soft: #f4f6ee;
  --ink: #233328;
  --muted: #576458;
  --line: #dfe6d9;
  --green: #3a5a44;
  --green-hover: #2c4735;
  --green-light: #e6efde;
  --green-soft: #ecf2e6;
  --clock-ink: #2b4232;
  --hero-border: #d9e4d4;
  --danger: #9b3d36;
  --shadow: 0 11px 35px #354a3210, 0 2px 4px #354a3208;
  --font: 'DM Sans', 'Pretendard', system-ui, sans-serif;
  --heading: Bricolage, 'DM Sans', system-ui, sans-serif;
  --digit-scale: 1;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1b231e;
  --surface: #232e27;
  --soft: #26352b;
  --ink: #eef6ea;
  --muted: #b5c5b7;
  --line: #3a4b3e;
  --green: #c3dab7;
  --green-hover: #d5e6cd;
  --green-light: #334a38;
  --green-soft: #2e4133;
  --clock-ink: #dcebd6;
  --hero-border: #405343;
  --danger: #ffaca2;
  --shadow: 0 11px 35px #0003, 0 2px 4px #0001;
}
:root[data-color="plum"] { --clock-ink: #74476c; }
:root[data-color="ocean"] { --clock-ink: #345a7e; }
:root[data-color="graphite"] { --clock-ink: #353535; }
:root[data-theme="dark"][data-color="plum"] { --clock-ink: #edb9e2; }
:root[data-theme="dark"][data-color="ocean"] { --clock-ink: #bbdaf9; }
:root[data-theme="dark"][data-color="graphite"] { --clock-ink: #eeeeee; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: absolute;
  z-index: -1;
  inset: 70px 0 auto;
  height: 440px;
  content: '';
  background: radial-gradient(ellipse at 50% 0, #e7eedc8c, transparent 65%);
  pointer-events: none;
}
:root[data-theme="dark"] body::before { opacity: .16; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, summary, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 80%, white);
  outline-offset: 3px;
}
main:focus { outline: none; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--heading); line-height: 1.16; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
.icon { inline-size: 1.14em; block-size: 1.14em; flex: 0 0 auto; vertical-align: middle; }
.skip-link { position: fixed; z-index: 5; top: 12px; left: 12px; transform: translateY(-160%); padding: 8px 12px; background: var(--surface); border-radius: 8px; }
.skip-link:focus { transform: none; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 1280px;
  min-height: 72px;
  margin: auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  gap: 20px;
}
.wordmark { display: inline-flex; width: fit-content; align-items: center; gap: 10px; font-family: var(--heading); font-size: 1.37rem; font-weight: 790; letter-spacing: -.045em; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; inline-size: 37px; block-size: 37px; border-radius: 12px; color: var(--green); background: var(--green-light); }
.brand-icon .icon { width: 23px; height: 23px; }
.primary-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 11px;
  color: var(--muted);
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 640;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--green); background: var(--green-soft); }
.nav-link[aria-current="page"] { font-weight: 760; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.language-menu { position: relative; }
.language-menu summary, .icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 41px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface);
  font-weight: 740;
  font-size: .875rem;
}
.language-menu summary { padding: 0 9px; white-space: nowrap; }
summary::-webkit-details-marker { display: none; }
summary { list-style: none; }
.language-menu .chevron { width: .86em; }
.icon-button { width: 41px; padding: 0; flex: 0 0 auto; }
.icon-button .icon { width: 19px; height: 19px; }
.icon-button:hover, .language-menu summary:hover { color: var(--ink); background: var(--soft); border-color: var(--hero-border); }
.language-options {
  position: absolute;
  z-index: 4;
  right: 0;
  top: calc(100% + 8px);
  width: max-content;
  min-width: 160px;
  display: grid;
  gap: 2px;
  padding: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.language-options > * { border: 0; background: transparent; font-size: .875rem; text-align: start; padding: 7px 10px; border-radius: 7px; }
.language-options > :hover, .language-options [aria-current="true"] { color: var(--green); background: var(--green-soft); }

.main-width { max-width: 1088px; width: 100%; margin-inline: auto; padding: 30px 24px 60px; flex: 1; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.page-heading h1 { font-size: clamp(1.75rem, 4.6vw, 2.65rem); font-weight: 770; letter-spacing: -.047em; }
.page-heading p { margin-top: 5px; color: var(--muted); font-size: 1rem; }
.page-actions { display: flex; gap: 8px; flex: 0 0 auto; align-items: center; padding-bottom: 3px; }
.button {
  --icon-surface: var(--surface);
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48em;
  border-radius: 11px;
  padding: 0 14px;
  border: 1px solid transparent;
  text-align: center;
  font-size: .9rem;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .16s, border-color .16s, transform .16s;
}
.button:active:not(:disabled) { transform: translateY(1px); }
.button.primary { --icon-surface: var(--green); color: #fffefa; background: var(--green); border-color: var(--green); }
:root[data-theme="dark"] .button.primary { color: #1c2e20; }
.button.primary:hover:not(:disabled) { background: var(--green-hover); border-color: var(--green-hover); }
.button.secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.button.secondary:hover:not(:disabled), .button.quiet:hover:not(:disabled) { --icon-surface: var(--soft); background: var(--soft); border-color: var(--hero-border); }
.button.quiet { background: transparent; color: var(--muted); }
.share-button { min-height: 41px; }
.text-link { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: .22em; }
.noscript { padding: 8px 0 15px; color: var(--danger); }

.tool-shell { border: 1px solid var(--hero-border); border-radius: 24px; overflow: clip; background: var(--surface); box-shadow: var(--shadow); }
.tool-panel { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 306px; padding: 10px 24px 15px; }
.tool-top { display: flex; align-items: center; justify-content: space-between; min-height: 34px; width: 100%; gap: 12px; }
.tool-top-actions { display: flex; align-items: center; gap: 7px; }
.tool-top .button { min-height: 36px; padding-inline: 9px; }
.tool-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 99px;
  color: var(--muted);
  background: var(--soft);
  font-size: .8125rem;
  font-weight: 690;
}
.tool-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #8da78a; flex: 0 0 auto; }
.tool-status[data-status="running"], .tool-status[data-status="enabled"] { color: var(--green); background: var(--green-light); }
.tool-status[data-status="running"]::before, .tool-status[data-status="enabled"]::before { background: #5f9369; }
.tool-status[data-status="finished"]::before, .tool-status[data-status="paused"]::before { background: #be9b60; }
.readout-wrap { display: grid; justify-items: center; margin-top: auto; width: 100%; padding: 3px 0 0; }
.time-caption { color: var(--muted); font-weight: 700; font-size: 1rem; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.readout {
  --clock-size: clamp(3.75rem, 11.8vw, 7rem);
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: .02em;
  color: var(--clock-ink);
  font-family: var(--heading);
  font-variant-numeric: tabular-nums;
  font-weight: 775;
  letter-spacing: 0;
  font-size: calc(var(--clock-size) * var(--digit-scale));
  line-height: .99;
  padding: .035em .05em .10em;
  white-space: nowrap;
}
.readout[data-long="true"] { --clock-size: clamp(2rem, 8.1vw, 6.4rem); }
.readout[data-extra="true"] { --clock-size: clamp(1.75rem, 6.95vw, 5.65rem); }
.clock-mark { margin-inline: .065em; color: color-mix(in srgb, var(--clock-ink) 60%, var(--surface)); }
.clock-fraction { font-size: .41em; }
.clock-period { font-family: var(--font); font-size: .18em; letter-spacing: 0; font-weight: 760; margin-left: .35em; }
.time-detail { color: var(--muted); font-weight: 550; font-size: .88rem; text-align: center; overflow-wrap: anywhere; }
.progress-track { background: var(--soft); margin-top: 6px; height: 5px; inline-size: min(225px, 52%); border-radius: 99px; overflow: hidden; }
.progress-track > div { height: 100%; background: #8ca884; width: var(--progress, 100%); border-radius: inherit; }
.tool-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tool-controls .primary { min-width: 127px; }
.quick-set {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 15px;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.quick-label { font-size: .8125rem; font-weight: 690; color: var(--muted); white-space: nowrap; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 680;
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}
.preset[aria-current="true"], .preset:hover { border-color: var(--hero-border); background: var(--green-soft); color: var(--green); }
.all-presets { font-size: .83rem; font-weight: 750; color: var(--green); white-space: nowrap; }
.all-presets:hover { text-decoration: underline; }
.all-presets .icon { margin-inline-start: 3px; }
body:not([data-page="timer"]) .tool-panel { padding-bottom: 37px; }
body:not([data-page="timer"]) .readout-wrap { margin-top: auto; }

.info-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 15px; margin-top: 20px; }
.info-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 0;
}
.tool-shell + .info-card, .info-grid + .info-card, #timer-list-card:not([hidden]) { margin-top: 18px; }
.info-card h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.info-card h2 .icon { color: var(--green); width: 1em; height: 1em; }
.quiet-text { color: var(--muted); font-size: .93rem; }
.preset-grid { gap: 7px; }
.preset-grid .preset { min-height: 37px; }
.recent-list { display: flex; gap: 6px; flex-wrap: wrap; }
.recent-list .preset { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; padding: 5px 11px; }
#clear-recent { margin-top: 8px; padding-inline: 0; min-height: 36px; }
.timer-list { display: flex; gap: 8px; flex-wrap: wrap; }
.timer-item { display: flex; max-width: 100%; gap: 2px; border-radius: 11px; border: 1px solid var(--line); color: var(--muted); }
.timer-item[data-selected="true"] { background: var(--green-soft); border-color: var(--hero-border); color: var(--green); }
.timer-item .button { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.timer-item .icon-button { background: transparent; border-color: transparent; border-radius: 8px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
td, th { padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .88rem; font-weight: 710; }
td { font-weight: 620; }
.city-grid { align-items: start; }
.city-list, #saved-cities, .holiday-rows { display: grid; gap: 5px; }
.city-item, .holiday-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--line); font-size: .91rem; }
.city-row-link, .holiday-row { padding-block: 7px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex: 1; }
.city-row-link:hover, .holiday-row:hover { color: var(--green); text-decoration: underline; text-underline-offset: .18em; }
.city-item .city-name { font-weight: 710; }
.city-item .city-time, .holiday-days { flex: 0 0 auto; margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.city-edit { display: flex; gap: 3px; }
.city-edit .icon-button { width: 34px; min-height: 34px; }
.city-edit .icon { width: 16px; height: 16px; }
.holiday-title { font-weight: 700; }
.holiday-date { display: inline-block; margin-inline-start: 8px; color: var(--muted); font-size: .85rem; }
.holiday-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; font-size: .9rem; color: var(--muted); }
.holiday-filter select { min-width: 145px; width: auto; }
.holiday-card > p, .info-card > .text-link { margin-top: 12px; display: inline-block; }

.guide { max-width: 750px; margin: 42px 0 0; }
.guide h2 { margin-bottom: 10px; }
.guide h2:not(:first-child) { margin-top: 24px; }
.guide p, .prose p { color: var(--muted); line-height: 1.68; margin-bottom: 10px; }
.faq { display: grid; gap: 7px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 11px; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; font-weight: 700; }
.faq details[open] summary .icon, .embed-details[open] summary > .icon:last-child { transform: rotate(180deg); }
.faq details p { margin: 0 0 11px; }
.keyboard { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; color: var(--muted); font-size: .835rem; }
kbd { font-family: var(--font); font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.prose { max-width: 810px; padding: 24px; }
.prose > :last-child { margin-bottom: 0; }
.contact-card { max-width: 550px; }
.contact-card a { display: block; width: fit-content; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.footer-inner { max-width: 1088px; margin: auto; padding: 20px 24px; display: flex; justify-content: space-between; gap: 12px 25px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 740; color: var(--green); }
.footer-inner nav { display: flex; gap: 4px 14px; flex-wrap: wrap; align-items: center; }
.footer-inner nav :is(a, button) { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; border: 0; background: transparent; font-size: .855rem; font-weight: 650; color: var(--muted); }
.footer-inner nav :is(a, button):hover { color: var(--green); text-decoration: underline; }

.dialog {
  width: min(540px, calc(100% - 28px));
  max-height: calc(100% - 24px);
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 19px 22px 21px;
  box-shadow: 0 20px 64px #141e1a35;
}
.dialog::backdrop { background: #18241b65; backdrop-filter: blur(2px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dialog-header h2 { font-size: 1.4rem; }
.dialog-header .icon-button { width: 37px; min-height: 37px; }
.dialog form { display: grid; gap: 11px; }
.field { display: grid; min-width: 0; gap: 4px; color: var(--muted); font-size: .88rem; font-weight: 690; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 13px; }
.duration-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:where(input, select, textarea) { accent-color: var(--green); }
:where(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  color: var(--ink);
  background: var(--surface);
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
}
:where(select) {
  appearance: none;
  padding-inline-end: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13'%3E%3Cpath d='m3 5 3.5 3.5L10 5' fill='none' stroke='%236c8a72' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 9px center;
  background-repeat: no-repeat;
}
input[type="range"] { width: 100%; min-width: 0; margin: 0; min-height: 36px; }
.checkbox { display: flex; align-items: center; width: fit-content; gap: 6px; font-weight: 630; color: var(--muted); font-size: .875rem; }
.checkbox input { width: 16px; height: 16px; margin: 0 2px 0 0; }
.dialog-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 1px; }
.dialog-inline .button { min-height: 38px; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 3px; }
.form-note, .form-error { font-size: .86rem; color: var(--muted); }
.form-error { color: var(--danger); }
.dialog fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.dialog legend { color: var(--muted); padding: 0; margin-bottom: 5px; font-size: .88rem; font-weight: 690; }
.scene-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.scene-choice { display: grid; cursor: pointer; min-width: 0; position: relative; }
.scene-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.scene-choice > span { display: grid; overflow: hidden; height: 100%; grid-template-rows: auto 1fr; text-align: center; color: var(--muted); border: 2px solid var(--line); border-radius: 10px; font-size: .82rem; font-weight: 720; }
.scene-choice > span span { padding: 5px; align-self: center; }
.scene-choice img { width: 100%; height: 68px; object-fit: cover; }
.scene-choice input:checked + span { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.scene-choice input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.count-control, .size-control { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.count-control output { min-width: 1em; font-variant-numeric: tabular-nums; color: var(--ink); }
.size-control .icon-button { width: 28px; min-height: 31px; border-radius: 7px; }
.size-control .icon-button .icon { width: 15px; }
#share-dialog > .dialog-inline { margin-top: 8px; }
.embed-details { margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 9px; }
.embed-details summary { display: flex; align-items: center; gap: 6px; font-weight: 740; font-size: .9rem; }
.embed-details summary > .icon:last-child { margin-inline-start: auto; }
.embed-details form { margin-top: 10px; }
.embed-details textarea { resize: vertical; font-family: monospace; font-size: .825rem; }
.embed-details .button { width: fit-content; }
.alert-icon { color: var(--green); background: var(--green-soft); border-radius: 25%; width: 55px; height: 55px; display: grid; place-items: center; margin: 5px auto; }
.alert-icon .icon { width: 28px; height: 28px; }
.alert-label { margin: 10px 0 14px; text-align: center; font-size: 1.02rem; overflow-wrap: anywhere; }
.toast {
  z-index: 8;
  position: fixed;
  inset: auto 15px 18px auto;
  padding: 10px 14px;
  font-size: .9rem;
  font-weight: 720;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 10px;
}

.segment-set { display: inline-flex; align-items: center; gap: .075em; vertical-align: middle; letter-spacing: 0; font-size: .81em; }
.segment-digit { position: relative; width: .53em; height: 1em; }
.segment-colon { display: inline-flex; flex-direction: column; justify-content: center; gap: .2em; height: 1em; }
.segment-colon::before, .segment-colon::after { content: ''; width: .11em; height: .11em; background: currentColor; border-radius: 21%; }
.segment { position: absolute; opacity: .12; background: currentColor; }
.segment.on { opacity: 1; }
.segment:is(.a, .d, .g) { width: .39em; height: .085em; left: .07em; clip-path: polygon(10% 0,90% 0,100% 50%,90% 100%,10% 100%,0 50%); }
.segment:is(.b, .c, .e, .f) { width: .085em; height: .39em; clip-path: polygon(0 10%,50% 0,100% 10%,100% 90%,50% 100%,0 90%); }
.segment.a { top: 0; }
.segment.g { top: .4575em; }
.segment.d { bottom: 0; }
.segment:is(.b, .f) { top: .075em; }
.segment:is(.c, .e) { bottom: .075em; }
.segment:is(.b, .c) { right: 0; }
.segment:is(.e, .f) { left: 0; }

.tool-shell:fullscreen, .tool-shell.focus-view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
  border: 0;
  border-radius: 0;
  width: 100%;
  min-height: 100dvh;
  overflow: auto;
}
.tool-shell.focus-view { position: fixed; inset: 0; z-index: 5; }
.tool-shell:is(:fullscreen, .focus-view) .tool-panel { min-height: 0; flex: 1; justify-content: center; gap: 12px; }
.tool-shell:is(:fullscreen, .focus-view) .tool-top { position: absolute; inset: 16px 18px auto; width: auto; }
.tool-shell:is(:fullscreen, .focus-view) .readout-wrap { margin: 45px 0 0; }
.tool-shell:is(:fullscreen, .focus-view) .quick-set { border-top: 0; margin-top: 0; }
.tool-shell:is(:fullscreen, .focus-view) .all-presets { display: none; }
.tool-shell:is(:fullscreen, .focus-view) .cat-scene { height: clamp(160px, 29vh, 450px); }
.tool-shell:is(:fullscreen, .focus-view) .readout { --clock-size: clamp(3.5rem, 15vw, 12.5rem); }
.tool-shell:is(:fullscreen, .focus-view) .readout[data-long="true"] { --clock-size: clamp(2rem, 9vw, 9rem); }
.tool-shell:is(:fullscreen, .focus-view) .readout[data-extra="true"] { --clock-size: clamp(1.75rem, 7vw, 7.5rem); }
.focus-view .scene-toolbar, :fullscreen .scene-toolbar { display: none; }
:root[data-embed] :is(.site-header, .site-footer, .page-heading, .info-grid, .info-card, .guide, .scene-toolbar, .quick-set, #timer-list-card, .tool-top-actions) { display: none; }
:root[data-embed] body { min-height: 0; }
:root[data-embed] .main-width { max-width: none; padding: 0; }
:root[data-embed] .tool-shell { border-radius: 0; border: 0; }
:root[data-embed] .tool-panel { min-height: 190px; padding: 8px 10px 17px !important; }
:root[data-embed] .readout { --clock-size: clamp(2rem, 14vw, 5rem); }
:root[data-embed] .readout[data-long="true"] { --clock-size: clamp(1.6rem, 10vw, 4rem); }
:root[data-embed] .cat-scene { height: 132px; min-height: 132px; }
:root[data-embed="plain"] .tool-controls, :root[data-embed-scene="hide"] .cat-scene { display: none; }

@media (max-width: 790px) {
  .header-inner { gap: 8px; padding-inline: 14px; }
  .nav-link { padding-inline: 9px; gap: 4px; font-size: .85rem; }
  .header-actions { gap: 5px; }
  .main-width { padding-top: 28px; padding-inline: 16px; }
}
@media (max-width: 635px) {
  .header-inner { min-height: 0; grid-template-columns: 1fr auto; row-gap: 0; padding: 7px 12px 6px; }
  .wordmark { font-size: 1.23rem; gap: 7px; }
  .brand-icon { width: 32px; height: 32px; border-radius: 10px; }
  .brand-icon .icon { width: 21px; height: 21px; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .language-menu summary, .header-actions .icon-button { min-height: 36px; }
  .header-actions .icon-button { width: 36px; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; gap: 3px; }
  .nav-link { text-align: center; font-size: .81rem; min-height: 39px; line-height: 1.2; padding-inline: 4px; }
  .main-width { padding: 25px 13px 38px; }
  .page-heading { align-items: flex-start; gap: 5px; margin-bottom: 14px; }
  .page-heading p { font-size: .93rem; }
  .page-actions { gap: 4px; padding: 0; }
  .page-actions .icon-button, .share-button { width: 34px; min-height: 34px; padding: 0; border-radius: 8px; }
  .page-actions .icon { width: 16px; height: 16px; }
  .share-button span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .tool-shell { border-radius: 17px; }
  .tool-panel { min-height: 255px; padding: 8px 11px 13px; }
  .tool-top { min-height: 32px; }
  .readout { --clock-size: clamp(3.25rem, 15vw, 6rem); }
  .readout[data-long="true"] { --clock-size: clamp(1.78rem, 11.7vw, 4.4rem); }
  .readout[data-extra="true"] { --clock-size: clamp(1.75rem, 8.6vw, 3.4rem); }
  .tool-controls { gap: 5px; margin-top: 17px; }
  .tool-controls .primary { min-width: 88px; }
  .tool-controls .button { min-height: 39px; font-size: .82rem; padding-inline: 9px; gap: 4px; }
  .quick-set { padding-top: 9px; margin-top: 12px; gap: 6px 9px; }
  .quick-set .presets { gap: 4px; justify-content: center; }
  .quick-set .preset { min-height: 32px; padding-inline: 7px; font-size: .78rem; }
  .info-grid { grid-template-columns: 1fr; gap: 9px; margin-top: 12px; }
  .info-card { padding: 14px; }
  .guide { margin-top: 28px; }
  .footer-inner { padding: 14px 13px; }
  body:not([data-page="timer"]) .tool-panel { min-height: 220px; padding-bottom: 23px; }
}
@media (max-width: 460px) {
  .nav-link .icon { display: none; }
}
@media (max-width: 375px) {
  .dialog { width: calc(100% - 16px); padding: 12px 13px 16px; }
  .dialog .button { padding-inline: 8px; }
  .scene-choice img { height: 55px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
