:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --page: #f7f4fb;
  --page-accent: #efe8fa;
  --surface: rgba(255, 255, 255, .94);
  --surface-strong: #ffffff;
  --surface-soft: #f5f1fa;
  --text: #312d3c;
  --muted: #706b7c;
  --line: #ded7e8;
  --accent: #7669df;
  --accent-strong: #5c50c9;
  --accent-soft: #ece9ff;
  --pink: #e95f9d;
  --danger: #c94b64;
  --shadow: 0 14px 38px rgba(76, 61, 105, .12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #222330;
  --page-accent: #292a3a;
  --surface: rgba(44, 45, 61, .96);
  --surface-strong: #303142;
  --surface-soft: #38394b;
  --text: #f5f2fb;
  --muted: #c2bdcf;
  --line: #505165;
  --accent: #9a90f0;
  --accent-strong: #b1a8ff;
  --accent-soft: #46425e;
  --pink: #f178b0;
  --danger: #f08096;
  --shadow: 0 18px 40px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(118, 105, 223, .035) 48% 52%, transparent 52%) 0 0 / 48px 48px,
    radial-gradient(circle at 10% 0%, var(--page-accent), transparent 42%),
    var(--page);
}
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button {
  min-height: 42px;
  padding: .65rem .9rem;
  color: var(--text);
  font-weight: 750;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, opacity .15s ease;
}
button:hover { border-color: var(--accent); }
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .46; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent);
  outline-offset: 2px;
}
input {
  width: 100%;
  min-height: 44px;
  padding: .68rem .8rem;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
a { color: var(--accent-strong); }
.primary-button { color: #fff; background: var(--accent); border-color: var(--accent); }
.primary-button:hover { background: var(--accent-strong); }
.danger-quiet, .delete-button { color: var(--danger); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.topbar {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  width: min(1760px, calc(100% - clamp(24px, 5vw, 72px)));
  margin: 0 auto;
  padding: 12px 4px 10px;
}
.eyebrow, .section-kicker {
  margin: 0 0 .3rem;
  color: var(--accent-strong);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .13em;
}
.topbar h1 { margin: 0; font-size: clamp(1.35rem, 2vw, 2rem); letter-spacing: .035em; }
.hero-copy { max-width: 760px; margin: .25rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.theme-toggle { flex: 0 0 46px; min-height: 46px; padding: 0; border-radius: 50%; font-size: 1.35rem; }

.app-shell {
  display: grid;
  grid-template-columns: minmax(430px, 1.18fr) minmax(360px, 1fr) minmax(280px, .74fr);
  gap: clamp(12px, 1.25vw, 20px);
  width: min(1760px, calc(100% - clamp(24px, 5vw, 72px)));
  margin: 0 auto;
  padding-bottom: 18px;
  align-items: start;
}

.control-card, .tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.control-card { padding: 0; }
.tool-card-heading, .dialog-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.control-card h2, .tool-card h2, .dialog-card h2 { margin: 0; font-size: 1.25rem; }
.settings-column { min-width: 0; }
.settings-panel { overflow: hidden; }
.settings-heading { padding: 17px 18px 12px; border-bottom: 1px solid var(--line); }
.settings-heading .section-kicker { margin-bottom: .18rem; }
.settings-body { display: grid; gap: 10px; padding: 12px; }
.settings-body fieldset {
  min-width: 0;
  margin: 0;
  padding: 9px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}
.settings-body legend { padding: 0 5px; color: var(--muted); font-size: .75rem; font-weight: 850; }
.stream-settings-field { border-color: color-mix(in srgb, var(--accent) 36%, var(--line)) !important; }
.mini-launch-button { width: 100%; min-width: 0; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 5px 3px;
  cursor: pointer;
}
.switch-copy { display: grid; min-width: 0; }
.switch-copy strong { font-size: .85rem; }
.switch-copy small { margin-top: 1px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.switch-row > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.switch-track {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 25px;
  border: 1px solid color-mix(in srgb, var(--muted) 48%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 23%, var(--surface-strong));
  transition: background-color .18s ease, border-color .18s ease;
}
.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(35, 30, 48, .3);
  transition: transform .18s ease;
}
.switch-row > input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch-row > input:checked + .switch-track::after { transform: translateX(19px); }
.switch-row > input:focus-visible + .switch-track { outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent); outline-offset: 2px; }
.title-size-setting { display: grid; gap: 6px; margin-bottom: 5px; padding: 2px 3px 8px; border-bottom: 1px solid var(--line); }
.segmented-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.segmented-choice label { position: relative; cursor: pointer; }
.segmented-choice input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; pointer-events: none; }
.segmented-choice span {
  display: grid;
  min-height: 30px;
  padding: 4px;
  place-items: center;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.segmented-choice input:checked + span { color: var(--accent-strong); background: var(--accent-soft); border-color: var(--accent); }
.segmented-choice input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent); outline-offset: 2px; }
.operation-hint, .field-note { margin: .7rem 0 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.settings-body .operation-hint { margin-top: 7px; font-size: .72rem; }
.utility-button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.utility-button-row button { min-width: 0; padding-inline: .45rem; font-size: .76rem; }

.tool-dashboard { display: contents; }
.counter-panel { grid-column: 1; }
.middle-tool-stack { display: grid; grid-column: 2; min-width: 0; gap: clamp(12px, 1.25vw, 20px); grid-auto-rows: minmax(0, 1fr); }
.settings-column { grid-column: 3; }
.tool-card { padding: 20px; min-width: 0; }
.tool-card-heading { margin-bottom: 15px; }
.field-label { display: block; margin: .85rem 0 .35rem; font-size: .83rem; font-weight: 750; color: var(--muted); }
.compact-check { min-height: 38px; padding: .35rem .6rem; font-size: .78rem; }
.counter-add-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.counter-scroll-area { min-height: 0; margin-top: 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--accent-soft) transparent; }
.counter-edit-list { display: grid; gap: 8px; align-content: start; }
.counter-edit-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(100px, 1fr) minmax(82px, .34fr) auto;
  gap: 7px;
  align-items: center;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.counter-edit-row.is-dragging { opacity: .55; border-color: var(--accent); }
.drag-handle { min-height: 40px; padding: 0; cursor: grab; touch-action: none; font-size: 1.2rem; }
.drag-handle:active { cursor: grabbing; }
.counter-row-actions { display: flex; gap: 5px; }
.counter-row-actions button { min-width: 40px; min-height: 40px; padding: .4rem .45rem; }
.inline-empty {
  margin: 18px 0 0;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}
.counter-scroll-area .inline-empty { margin: 0; }
.operation-guide { margin: 14px 0 0; padding: .65rem .75rem; color: var(--muted); font-size: .78rem; line-height: 1.55; background: var(--surface-soft); border-radius: var(--radius-sm); }
.card-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.single-card-action { justify-content: flex-end; }

.goal-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.goal-input-grid label, .timer-setting label { display: grid; gap: .3rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.goal-preview { position: relative; margin-top: 14px; padding: 16px; background: var(--surface-soft); border-radius: var(--radius-md); overflow: hidden; }
.goal-numbers { display: flex; align-items: baseline; justify-content: center; gap: .45rem; font-variant-numeric: tabular-nums; }
.goal-numbers strong { font-size: clamp(2rem, 4vw, 3.1rem); }
.goal-numbers span { color: var(--muted); font-weight: 750; }
.goal-percent { display: block; margin: .1rem 0 .65rem; text-align: center; font-size: 1.08rem; }
.goal-track { position: relative; height: 24px; overflow: hidden; background: var(--gauge-under, #ccd0db); border: 2px solid color-mix(in srgb, var(--text) 22%, transparent); border-radius: 999px; }
.goal-track i { display: block; width: var(--gauge-fill, 0%); height: 100%; background: var(--gauge-over, #f39a45); border-radius: inherit; transition: width .18s ease, background-color .2s ease; }
.achievement-message {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 4;
  padding: .6rem .9rem;
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(47, 40, 66, .92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -40%) scale(.92);
  pointer-events: none;
}
.achievement-message.is-visible { animation: achievement-in 1.45s ease both; }
.step-button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mode-switch label { cursor: pointer; }
.mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mode-switch span { display: grid; place-items: center; min-height: 42px; padding: .5rem; text-align: center; font-size: .82rem; font-weight: 780; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.mode-switch input:checked + span { color: var(--accent-strong); background: var(--accent-soft); border-color: var(--accent); }
.timer-setting { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.time-preview { position: relative; display: grid; justify-items: center; margin-top: 14px; padding: 16px; background: var(--surface-soft); border-radius: var(--radius-md); overflow: hidden; }
.time-preview strong { font-size: clamp(2.5rem, 6vw, 4.2rem); line-height: 1; font-variant-numeric: tabular-nums; }
.time-preview > span:not(.time-up-message) { margin-top: .4rem; color: var(--muted); font-size: .8rem; font-weight: 750; }
.time-up-message { position: absolute; inset: 50% auto auto 50%; padding: .55rem .8rem; color: #fff; font-weight: 950; background: var(--pink); border-radius: 999px; opacity: 0; transform: translate(-50%, -50%) scale(.85); pointer-events: none; }
.time-up-message.is-visible { animation: time-up 1.3s ease both; }

.developer-card { display: grid; gap: 9px; padding: 11px 12px 12px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-soft) 64%, transparent); }
.developer-main-link { display: flex; gap: 12px; align-items: center; min-width: 0; color: var(--text); text-decoration: none; }
.developer-main-link img { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; }
.developer-main-link span { display: grid; }
.developer-main-link small, .developer-main-link em { color: var(--muted); font-size: .68rem; font-style: normal; }
.developer-main-link strong { font-size: .95rem; }
.developer-card nav { display: grid; grid-template-columns: .6fr 1.4fr; gap: 6px; }
.developer-card nav a { padding: .5rem .55rem; text-align: center; text-decoration: none; font-size: .73rem; font-weight: 780; background: var(--surface-strong); border: 1px solid var(--line); border-radius: var(--radius-sm); }

dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 30px); padding: 0; color: var(--text); background: transparent; border: 0; }
dialog::backdrop { background: rgba(24, 21, 34, .62); backdrop-filter: blur(4px); }
.dialog-card { padding: 22px; background: var(--surface-strong); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.wide-dialog { width: min(860px, calc(100% - 28px)); }
.dialog-heading { margin-bottom: 14px; }
.dialog-card p { line-height: 1.7; }
.icon-button { flex: 0 0 42px; width: 42px; padding: 0; border-radius: 50%; font-size: 1.3rem; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.mini-background-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.mini-background-buttons button { display: grid; gap: .2rem; min-height: 76px; align-content: center; }
.mini-background-buttons small { font-weight: 500; opacity: .78; }
.mini-tool-picker { margin: 14px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.mini-tool-picker legend { padding: 0 5px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.mini-tool-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-tool-options label { position: relative; min-width: 0; cursor: pointer; }
.mini-tool-options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mini-tool-options span { display: grid; min-height: 112px; padding: 10px 7px; place-items: center; align-content: center; text-align: center; background: var(--surface-soft); border: 2px solid var(--line); border-radius: var(--radius-sm); transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.mini-tool-options b { font-size: 1.45rem; }
.mini-tool-options strong { margin-top: 4px; font-size: .82rem; }
.mini-tool-options small { margin-top: 3px; color: var(--muted); font-size: .67rem; line-height: 1.35; }
.mini-tool-options input:checked + span { color: var(--accent-strong); background: var(--accent-soft); border-color: var(--accent); }
.mini-tool-options input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 38%, transparent); outline-offset: 2px; }
.mini-tool-options label:hover span { transform: translateY(-1px); }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.help-grid article { padding: 16px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-md); }
.help-grid article > b { font-size: 1.6rem; }
.help-grid h3 { margin: .5rem 0 .3rem; }
.help-grid p { margin: 0; color: var(--muted); font-size: .86rem; }
.streamer-guide, .page-about, .stream-permission-card { margin-top: 16px; padding: 16px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-md); }
.streamer-guide h3, .page-about h3, .stream-permission-card h3 { margin: 0 0 .55rem; }
.streamer-guide dl { display: grid; gap: 8px; margin: 12px 0 0; }
.streamer-guide dl div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.streamer-guide dt { font-weight: 850; }
.streamer-guide dd { margin: 0; color: var(--muted); }
.permission-badges { display: flex; gap: 7px; margin-bottom: 10px; }
.permission-badges span { padding: .35rem .6rem; color: #5b3370; font-weight: 850; background: #f2dcff; border-radius: 999px; }
.usage-limit { font-size: .86rem; color: var(--muted); }
.policy-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.policy-links a { padding: .7rem; text-align: center; text-decoration: none; font-weight: 750; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.undo-toast { position: fixed; z-index: 100; inset: auto 20px 20px auto; display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 16px; color: #fff; background: #353044; border-radius: var(--radius-md); box-shadow: var(--shadow); }
.undo-toast button { min-height: 36px; color: #fff; background: transparent; border-color: rgba(255,255,255,.35); }

.count-feedback { position: absolute; z-index: 8; inset: 50% 10% auto auto; font-size: 1.08rem; font-weight: 950; pointer-events: none; animation: count-float .8s ease-out both; }
.count-feedback.is-plus { color: #ff6ca8; }
.count-feedback.is-minus { color: #5f91f3; }
.is-popping { animation: value-pop .22s ease; }
.is-resetting { animation: reset-pop .3s ease; }

html.legal-document-root,
html.legal-document-root body { height: auto; min-height: 100%; overflow: auto; }
html.legal-document-root body { display: block; }
.legal-document { padding: 20px; }
.legal-topbar { width: min(860px, 100%); margin: 0 auto 12px; }
.legal-back-link { display: inline-block; padding: .7rem .9rem; text-decoration: none; font-weight: 750; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.legal-card { width: min(860px, 100%); margin: 0 auto; padding: clamp(22px, 5vw, 46px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.legal-card h1 { margin-top: 0; }
.legal-card h2 { margin-top: 2rem; padding-top: .4rem; border-top: 1px solid var(--line); }
.legal-card p, .legal-card li { line-height: 1.85; }

@keyframes count-float { from { opacity: 1; transform: translateY(0) scale(.9); } to { opacity: 0; transform: translateY(-34px) scale(1.05); } }
@keyframes value-pop { 50% { transform: scale(1.08); } }
@keyframes reset-pop { 45% { transform: scale(.78); opacity: .65; } }
@keyframes achievement-in { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); } 18%, 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -58%) scale(.98); } }
@keyframes time-up { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.82); } 20%, 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -58%) scale(.96); } }

@media (min-width: 1180px) {
  html, body { height: 100%; overflow: hidden; }
  body { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .app-shell { height: 100%; min-height: 0; padding-bottom: 12px; align-items: stretch; }
  .counter-panel, .middle-tool-stack, .settings-column, .settings-panel { height: 100%; min-height: 0; }
  .counter-panel { display: flex; flex-direction: column; }
  .counter-scroll-area { flex: 1; }
  .middle-tool-stack .tool-card { min-height: 0; padding: 13px 15px; overflow: hidden; }
  .middle-tool-stack .tool-card-heading { margin-bottom: 5px; }
  .middle-tool-stack .field-label { margin-top: .35rem; }
  .middle-tool-stack input { min-height: 38px; padding-block: .45rem; }
  .middle-tool-stack .goal-input-grid,
  .middle-tool-stack .mode-switch,
  .middle-tool-stack .timer-setting,
  .middle-tool-stack .step-button-row { margin-top: 7px; }
  .middle-tool-stack .goal-preview,
  .middle-tool-stack .time-preview { margin-top: 7px; padding: 8px 10px; }
  .middle-tool-stack .goal-numbers strong { font-size: clamp(1.75rem, 3.2vh, 2.65rem); }
  .middle-tool-stack .goal-percent { margin-bottom: .35rem; font-size: .92rem; }
  .middle-tool-stack .goal-track { height: 19px; }
  .middle-tool-stack .time-preview strong { font-size: clamp(2.3rem, 5.5vh, 3.8rem); }
  .middle-tool-stack .operation-guide { display: none; }
  .middle-tool-stack .card-actions { margin-top: 7px; padding-top: 7px; }
  .middle-tool-stack button { min-height: 36px; padding-block: .45rem; }
  .settings-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
  .settings-body { align-content: start; overflow: hidden; }
}

@media (max-width: 1179px) {
  .topbar, .app-shell { width: min(820px, calc(100% - 24px)); }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .counter-panel, .middle-tool-stack, .settings-column { grid-column: 1; }
  .counter-panel { order: 1; }
  .middle-tool-stack { order: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .settings-column { order: 3; }
}

@media (max-width: 760px) {
  .topbar, .app-shell { width: min(100% - 20px, 720px); }
  .topbar { padding-inline: 2px; }
  .hero-copy { font-size: .9rem; }
  .mini-launch-button { width: 100%; }
  .middle-tool-stack, .help-grid { grid-template-columns: 1fr; }
  .counter-edit-row { grid-template-columns: 34px minmax(0, 1fr) 92px; }
  .counter-row-actions { grid-column: 2 / -1; }
  .counter-row-actions button { flex: 1; }
  .streamer-guide dl div { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 500px) {
  .topbar h1 { font-size: 1.35rem; }
  .tool-card, .control-card { padding: 15px; border-radius: 18px; }
  .settings-panel { padding: 0; }
  .tool-card-heading { align-items: flex-start; }
  .counter-edit-row { grid-template-columns: 32px minmax(0, 1fr) 84px; padding: 6px; }
  .counter-row-actions { display: grid; grid-template-columns: repeat(4, 1fr); }
  .counter-row-actions button { min-width: 0; padding-inline: .35rem; }
  .card-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mini-tool-options, .mini-background-buttons, .policy-links { grid-template-columns: 1fr; }
  .mini-tool-options span { min-height: 72px; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; text-align: left; }
  .mini-tool-options b { grid-row: 1 / 3; }
  .undo-toast { inset: auto 10px 10px; justify-content: space-between; }
}
