    @font-face {
      font-family: "Inter";
      src: url("inter-regular.woff2?v=1") format("woff2");
      font-style: normal;
      font-weight: 400;
      font-display: swap;
    }

    :root {
      --background: #000000;
      --foreground: #ffffff;
      --panel-line: rgba(255, 255, 255, 0.52);
      --control-border: rgba(255, 255, 255, 0.46);
      --desktop-counter-max: 396px;
      --counter-font: "Inter", Arial, Helvetica, "Segoe UI", sans-serif;
      --ui-font: Arial, Helvetica, sans-serif;
      --settings-width: 284px;
      --site-header-height: 62px;
      --brand-text-size: 28px;
      --content-background: #f7f7f5;
      --content-foreground: #161616;
      --header-background: #0b0d14;
      --footer-background: #080a12;
    }

    * {
      box-sizing: border-box;
    }

    html {
      width: 100%;
      min-height: 100%;
      margin: 0;
      background: var(--content-background);
      color: var(--content-foreground);
      scroll-behavior: auto;
      -webkit-text-size-adjust: 100%;
      overflow-x: hidden;
      overflow-x: clip;
    }

    body {
      width: 100%;
      min-height: 100%;
      margin: 0;
      overflow-x: hidden;
      overflow-y: auto;
      background: var(--content-background);
      color: var(--content-foreground);
      font-family: var(--ui-font);
      -webkit-tap-highlight-color: transparent;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
    }

    button,
    input {
      font: inherit;
    }

    button {
      appearance: none;
      -webkit-appearance: none;
    }

    /* ---------- Site header ---------- */
    .site-header {
      position: relative;
      z-index: 20;
      height: var(--site-header-height);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      background: var(--header-background);
      color: #f7f7fb;
    }

    .site-header-inner {
      width: min(1180px, 100%);
      height: 100%;
      margin: 0 auto;
      padding: 0 28px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
    }

    .site-brand,
    .footer-brand-link {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: inherit;
      font-size: var(--brand-text-size);
      font-weight: 700;
      line-height: 1;
      text-decoration: none;
    }

    .site-logo,
    .footer-logo {
      display: block;
      flex: 0 0 auto;
      object-fit: contain;
      background: transparent;
    }

    .site-brand {
      letter-spacing: 0.01em;
    }

    .site-logo {
      width: 44px;
      height: 44px;
    }

    /* Header and tool together occupy exactly the initial viewport. */
    #app {
      position: relative;
      width: 100%;
      height: calc(100vh - var(--site-header-height));
      height: calc(100svh - var(--site-header-height));
      min-height: 0;
      background: var(--background);
      color: var(--foreground);
    }

    .screen {
      position: relative;
      width: 100%;
      height: 100%;
      min-height: 0;
      background: var(--background);
      color: var(--foreground);
    }

    .screen-viewport {
      position: relative;
      width: 100%;
      height: 100%;
      min-height: 0;
      background: var(--background);
      color: var(--foreground);
    }

    .seo-section {
      position: relative;
      z-index: 2;
      width: 100%;
      border-top: 1px solid rgba(22, 22, 22, 0.16);
      background: var(--content-background);
      color: var(--content-foreground);
    }

    .seo-content {
      width: min(860px, calc(100% - 48px));
      margin: 0 auto;
      padding: 72px 0 68px;
    }

    .seo-content h1,
    .seo-content h2 {
      font-weight: 400;
      line-height: 1.2;
    }

    .seo-content h1 {
      margin: 0 0 26px;
      font-size: clamp(36px, 4vw, 48px);
    }

    .seo-content h2 {
      margin: 42px 0 15px;
      font-size: clamp(25px, 2.6vw, 31px);
    }

    .seo-content p {
      margin: 0 0 20px;
      font-size: 18px;
      line-height: 1.68;
    }

    .seo-content > section:last-child > p:last-child {
      margin-bottom: 0;
    }

    /* ---------- Site footer ---------- */
    .site-footer {
      position: relative;
      z-index: 3;
      width: 100%;
      background: var(--footer-background);
      color: #d7dce5;
    }

    .footer-inner {
      width: min(1120px, 100%);
      margin: 0 auto;
      padding: 48px 32px 22px;
    }

    .footer-grid {
      display: grid;
      grid-template-columns: minmax(220px, 1.45fr) repeat(3, minmax(120px, 1fr));
      gap: 40px;
      align-items: start;
    }

    .footer-brand-link {
      color: #ffffff;
    }

    .footer-logo {
      width: 48px;
      height: 48px;
    }

    .footer-brand p {
      max-width: 230px;
      margin: 16px 0 0;
      color: #aeb6c4;
      font-size: 14px;
      line-height: 1.55;
    }

    .footer-column h2 {
      margin: 0 0 16px;
      color: #ffffff;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.2;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .footer-column ul {
      margin: 0;
      padding: 0;
      display: grid;
      gap: 11px;
      list-style: none;
    }

    .footer-column a,
    .footer-column span {
      color: #bec5d0;
      font-size: 14px;
      line-height: 1.4;
      text-decoration: none;
    }

    .footer-column a:hover,
    .footer-column a:focus-visible {
      color: #9186f6;
    }

    .footer-column [aria-current="page"] {
      color: #9186f6;
    }

    .footer-coming-soon {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
    }

    .footer-column .coming-soon-badge {
      display: inline-flex;
      align-items: center;
      border: 1px solid rgba(145, 134, 246, 0.45);
      border-radius: 999px;
      padding: 2px 6px;
      background: rgba(145, 134, 246, 0.08);
      color: #9186f6;
      font-size: 10px;
      font-weight: 700;
      line-height: 1.2;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .footer-bottom {
      margin-top: 38px;
      border-top: 1px solid rgba(255, 255, 255, 0.12);
      padding-top: 20px;
    }

    .footer-bottom p {
      margin: 0;
      color: #929baa;
      font-size: 13px;
      line-height: 1.5;
    }

    .hidden {
      display: none !important;
    }

    .noscript-message {
      position: fixed;
      left: 50%;
      bottom: 24px;
      z-index: 10;
      transform: translateX(-50%);
      margin: 0;
      padding: 10px 14px;
      border: 1px solid var(--panel-line);
      border-radius: 6px;
      background: var(--background);
      color: var(--foreground);
      font-size: 14px;
      white-space: nowrap;
    }

    /* ---------- Main counter ---------- */
    .counter-stage {
      position: absolute;
      inset: 0;
      overflow: hidden;
      overflow: clip;
    }

    .counter-controls {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }

    .top-icon {
      position: absolute;
      top: 20px;
      width: 24px;
      height: 24px;
      border: 0;
      padding: 0;
      background: transparent;
      color: var(--foreground);
      display: grid;
      place-items: center;
      cursor: pointer;
      z-index: 3;
      transform: translateX(-50%) scale(1);
      transform-origin: center;
      transition: transform 170ms ease;
    }

    .top-icon svg {
      width: 100%;
      height: 100%;
      display: block;
      fill: currentColor;
    }

    #settingsBtn {
      left: calc(50% - 18px);
    }

    #resetBtn {
      left: calc(50% + 18px);
    }

    @media (hover: hover) and (pointer: fine) {
      .top-icon:hover {
        transform: translateX(-50%) scale(1.18);
      }
    }

    #countDisplay {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      transform-origin: center;
      margin: 0;
      color: var(--foreground);
      font-family: var(--counter-font);
      /* 396px keeps Inter's visible desktop numeral height at 3in. */
      font-size: var(--desktop-counter-size, var(--desktop-counter-max));
      font-style: normal;
      font-weight: 400;
      line-height: 0.86;
      letter-spacing: 0.012em;
      white-space: nowrap;
      pointer-events: none;
      font-variant-numeric: tabular-nums lining-nums;
      font-kerning: none;
      font-feature-settings: "kern" 0, "tnum" 1;
      font-synthesis: none;
      transition: font-size 180ms ease-out;
    }

    .limit-status {
      position: absolute;
      left: 50%;
      top: auto;
      bottom: 0.75in;
      transform: translateX(-50%);
      min-width: 150px;
      text-align: center;
      color: var(--foreground);
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transition: opacity 260ms ease, visibility 0s linear 260ms;
    }

    .limit-status.visible {
      opacity: 1;
      visibility: visible;
      transition: opacity 260ms ease, visibility 0s linear 0s;
    }

    .remaining-value {
      display: block;
      font-family: var(--counter-font);
      font-size: 32px;
      font-style: normal;
      font-weight: 400;
      line-height: 1.05;
      font-variant-numeric: tabular-nums lining-nums;
      font-kerning: none;
      font-feature-settings: "kern" 0, "tnum" 1;
      font-synthesis: none;
    }

    .limit-label {
      display: block;
      margin-top: 6px;
      font-size: 14px;
      font-weight: 500;
      line-height: 1;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .limit-status.reached .limit-label {
      animation: limitPulse 2.5s ease-in-out infinite;
    }

    @keyframes limitPulse {
      0%, 100% {
        opacity: 0.22;
        text-shadow: 0 0 0 currentColor;
      }
      50% {
        opacity: 1;
        text-shadow: 0 0 9px currentColor;
      }
    }

    .count-btn {
      position: absolute;
      top: 50%;
      width: 84px;
      height: 84px;
      transform: translateY(-50%);
      border: 1px solid var(--control-border);
      border-radius: 50%;
      padding: 0;
      background: transparent;
      color: var(--foreground);
      outline: none;
      box-shadow: none;
      filter: none;
      display: grid;
      place-items: center;
      cursor: pointer;
      pointer-events: auto;
      touch-action: manipulation;
    }

    /* Half-inch space from each desktop screen edge, as specified. */
    #minusBtn {
      left: 0.5in;
    }

    #plusBtn {
      right: 0.5in;
    }

    .count-btn.invisible {
      visibility: hidden;
      pointer-events: none;
    }

    .count-btn svg {
      width: 48px;
      height: 48px;
      display: block;
    }

    /*
      The thin outline is always visible. The area between each icon and its
      circle uses the exact page background, with no fill, shadow, or glow.
    */
    .count-btn {
      opacity: 1;
      transition: border-color 180ms ease;
    }

    .count-btn.active-control,
    .count-btn:active {
      border-color: var(--foreground);
      background: transparent;
    }

    @media (hover: hover) and (pointer: fine) {
      .count-btn:hover {
        border-color: var(--foreground);
        background: transparent;
      }
    }

    /* ---------- Shared overlay controls ---------- */
    .close-btn {
      position: absolute;
      top: 18px;
      right: 18px;
      width: 46px;
      height: 46px;
      border: 1px solid var(--panel-line);
      border-radius: 50%;
      padding: 0;
      background: transparent;
      color: var(--foreground);
      cursor: pointer;
      display: grid;
      place-items: center;
      z-index: 4;
    }

    .close-btn::before,
    .close-btn::after {
      content: "";
      position: absolute;
      width: 25px;
      height: 2px;
      border-radius: 2px;
      background: currentColor;
    }

    .close-btn::before {
      transform: rotate(45deg);
    }

    .close-btn::after {
      transform: rotate(-45deg);
    }

    /* ---------- Settings ---------- */
    .settings-stack {
      position: absolute;
      left: 50%;
      top: 50%;
      width: min(var(--settings-width), calc(100vw - 32px));
      max-height: calc(100% - 32px);
      transform: translate(-50%, -50%);
      overflow-x: hidden;
      overflow-y: auto;
    }

    .settings-panel {
      border: 2px solid var(--panel-line);
      border-radius: 10px;
      padding: 19px 22px 22px;
      background: transparent;
      color: var(--foreground);
    }

    .settings-title {
      margin: 0 0 19px;
      font-size: 24px;
      font-weight: 400;
      line-height: 1.1;
    }

    .settings-section {
      width: 100%;
    }

    .settings-divider {
      width: 100%;
      height: 1px;
      margin: 16px 0;
      background: var(--panel-line);
    }

    .value-row {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 18px 82px;
      align-items: center;
      column-gap: 5px;
      color: var(--foreground);
      font-size: 19px;
      line-height: 1;
      white-space: nowrap;
    }

    .setting-label {
      justify-self: start;
      text-align: left;
    }

    .equals {
      text-align: center;
    }

    .num-input {
      width: 82px;
      height: 36px;
      border: 1px solid rgba(0, 0, 0, 0.24);
      border-radius: 2px;
      padding: 2px 7px;
      background: #ffffff;
      color: #111111;
      font-family: var(--ui-font);
      font-size: 20px;
      line-height: 1;
      outline: none;
      user-select: text;
    }

    .limit-section {
      display: grid;
      grid-template-rows: 36px 36px;
      row-gap: 16px;
    }

    .limit-toggle-row {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 18px 82px;
      align-items: center;
      column-gap: 5px;
      color: var(--foreground);
      font-size: 19px;
      line-height: 1;
      white-space: nowrap;
    }

    .limit-toggle-row .switch {
      grid-column: 3;
      justify-self: end;
    }

    .limit-toggle-row .setting-label {
      grid-column: 1 / 3;
    }

    /*
      The Maximum row always keeps its physical space. When limits are off it
      is only visually hidden, so the panel never jumps or changes size.
    */
    .max-row {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateY(-2px);
      transition:
        opacity 320ms ease,
        transform 320ms ease,
        visibility 0s linear 320ms;
    }

    .max-row.visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateY(0);
      transition:
        opacity 320ms ease,
        transform 320ms ease,
        visibility 0s linear 0s;
      animation: maximumReveal 420ms ease-out;
    }

    @keyframes maximumReveal {
      0% {
        opacity: 0;
        transform: translateY(-3px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .under {
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .switch {
      position: relative;
      width: 53px;
      height: 29px;
      flex: 0 0 auto;
      cursor: pointer;
    }

    .switch input {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
    }

    .track {
      position: absolute;
      inset: 0;
      border: 2px solid var(--foreground);
      border-radius: 999px;
      background: transparent;
    }

    .track::after {
      content: "";
      position: absolute;
      left: 4px;
      top: 3px;
      width: 19px;
      height: 19px;
      border-radius: 50%;
      background: var(--foreground);
      transition: transform 160ms ease;
    }

    .switch input:checked + .track::after {
      transform: translateX(22px);
    }

    .background-title {
      margin: 0 0 13px;
      font-size: 19px;
      font-weight: 400;
      line-height: 1.1;
    }

    .palette {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(4, 46px);
      justify-content: space-between;
      row-gap: 13px;
    }

    .swatch {
      --selection-ring: #ffffff;
      width: 42px;
      height: 42px;
      border: 2px solid rgba(255, 255, 255, 0.78);
      border-radius: 5px;
      padding: 0;
      cursor: pointer;
      outline: none;
    }

    .swatch[data-color="#000000"] { background: #000000; }
    .swatch[data-color="#ffffff"] { background: #ffffff; }
    .swatch[data-color="#ff1494"] { background: #ff1494; }
    .swatch[data-color="#ba56d4"] { background: #ba56d4; }
    .swatch[data-color="#8a2be1"] { background: #8a2be1; }
    .swatch[data-color="#708090"] { background: #708090; }
    .swatch[data-color="#01ced1"] { background: #01ced1; }
    .swatch[data-color="#20b1aa"] { background: #20b1aa; }
    .swatch[data-color="#4169e2"] { background: #4169e2; }
    .swatch[data-color="#1e90ff"] { background: #1e90ff; }
    .swatch[data-color="#00bffe"] { background: #00bffe; }
    .swatch[data-color="#4682b4"] { background: #4682b4; }

    .swatch.selected {
      border-color: var(--selection-ring);
      box-shadow: 0 0 9px 4px var(--selection-ring);
    }

    .swatch[data-color="#ffffff"].selected {
      --selection-ring: #000000;
    }

    /* ---------- Reset confirmation ---------- */
    .reset-title {
      position: absolute;
      left: 50%;
      top: 40.5%;
      transform: translate(-50%, -50%);
      margin: 0;
      color: var(--foreground);
      font-size: 34px;
      font-weight: 400;
      line-height: 1.1;
      white-space: nowrap;
    }

    .reset-action {
      width: 128px;
      min-height: 52px;
      transform: scale(1);
      border: 1px solid transparent;
      border-radius: 4px;
      padding: 13px 20px;
      background: transparent;
      color: var(--foreground);
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
      outline: none;
      touch-action: manipulation;
      transition:
        transform 150ms ease,
        border-color 150ms ease,
        background-color 150ms ease;
    }

    .reset-actions {
      position: absolute;
      left: 50%;
      top: calc(40.5% + 78px);
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 38px;
    }

    @media (hover: hover) and (pointer: fine) {
      .reset-action:hover {
        transform: scale(1.045);
        border-color: currentColor;
        background: transparent;
      }
    }

    .reset-action:active,
    .reset-action.touch-active {
      transform: scale(1.045);
      border-color: currentColor;
      background: transparent;
    }

    /* Give the settings panel a little more room on desktop only. */
    @media (min-width: 1025px) {
      :root {
        --settings-width: 304px;
      }

      .settings-panel {
        padding: 22px 26px 26px;
      }

      .settings-title {
        margin-bottom: 20px;
      }

      .settings-divider {
        margin: 17px 0;
      }

      .limit-section {
        row-gap: 18px;
      }

      .background-title {
        margin-bottom: 14px;
      }

      .palette {
        row-gap: 14px;
      }
    }

    @media (max-width: 768px), (orientation: landscape) and (max-width: 1024px) and (max-height: 600px) {
      :root {
        --site-header-height: 56px;
        --brand-text-size: 26px;
      }

      .site-header-inner {
        padding: 0 16px;
      }

      .site-brand {
        gap: 9px;
      }

      .site-logo {
        width: 40px;
        height: 40px;
      }

      .footer-inner {
        padding: 42px 24px 22px;
      }

      .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px 44px;
      }
    }

    @media (max-width: 600px) {
      .footer-inner {
        padding: 40px 20px 20px;
      }

      .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
      }

      .footer-bottom {
        margin-top: 32px;
        text-align: center;
      }
    }

    /* ---------- Mobile layout ---------- */
    @media (max-width: 600px), (orientation: landscape) and (max-width: 1024px) and (max-height: 600px) {
      :root {
        --settings-width: 214px;
      }

      .seo-content {
        width: min(860px, calc(100% - 40px));
        padding: 48px 0 44px;
      }

      .seo-content h1 {
        margin-bottom: 24px;
        font-size: 32px;
      }

      .seo-content h2 {
        margin: 36px 0 14px;
        font-size: 24px;
      }

      .seo-content p {
        margin-bottom: 18px;
        font-size: 16px;
        line-height: 1.6;
      }

      .top-icon {
        top: 14px;
        width: 25px;
        height: 25px;
      }

      #resetBtn {
        left: calc(50% + 23.5px);
      }

      #settingsBtn {
        left: calc(50% - 23.5px);
      }

      .counter-stage {
        inset: 64px 0 0;
        display: grid;
        grid-template-rows: minmax(0, 1fr) 48px 84px;
        align-items: center;
        gap: clamp(16px, 3svh, 28px);
        padding: clamp(18px, 5svh, 42px) 16px calc(34px + env(safe-area-inset-bottom));
      }

      #countDisplay {
        position: relative;
        left: auto;
        top: auto;
        align-self: center;
        justify-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        height: min(245.52px, 64.24vw);
        transform: none;
        font-size: min(279px, 73vw);
        line-height: 0.88;
        transition: none;
      }

      #countDisplay.digits-2 {
        font-size: min(226px, 58vw);
      }

      #countDisplay.digits-3 {
        font-size: min(172px, 45.1vw);
      }

      #countDisplay.digits-4 {
        font-size: min(150px, calc((100vw - 48px) / 2.64));
      }

      .limit-status {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        grid-row: 2;
        align-self: center;
        justify-self: center;
        height: 48px;
        min-width: 122px;
        transform: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
      }

      .remaining-value {
        font-size: 25px;
        letter-spacing: 0.012em;
      }

      .limit-label {
        margin-top: 5px;
        font-size: 11px;
        letter-spacing: 0.18em;
      }

      .counter-controls {
        position: relative;
        inset: auto;
        grid-row: 3;
        align-self: center;
        justify-self: center;
        width: min(72vw, 300px);
        height: 84px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .count-btn {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        flex: 0 0 84px;
        width: 84px;
        height: 84px;
        transform: none;
      }

      #minusBtn,
      #plusBtn {
        right: auto;
        left: auto;
      }

      .count-btn svg {
        width: 48px;
        height: 48px;
      }

      .close-btn {
        top: 12px;
        right: 19px;
        width: 52px;
        height: 52px;
      }

      .close-btn::before,
      .close-btn::after {
        width: 30px;
        height: 2px;
      }

      .settings-panel {
        border-radius: 9px;
        padding: 13px 15px 15px;
      }

      .settings-title {
        margin-bottom: 11px;
        font-size: 20px;
      }

      .settings-divider {
        margin: 9px 0;
      }

      .value-row {
        grid-template-columns: minmax(0, 1fr) 14px 64px;
        column-gap: 3px;
        font-size: 16px;
      }

      .num-input {
        width: 64px;
        height: 29px;
        padding: 1px 6px;
        font-size: 18px;
      }

      .num-input::-webkit-inner-spin-button,
      .num-input::-webkit-outer-spin-button {
        margin: 0;
        -webkit-appearance: none;
      }

      .limit-section {
        grid-template-rows: 30px 29px;
        row-gap: 9px;
      }

      .limit-toggle-row {
        grid-template-columns: minmax(0, 1fr) 14px 64px;
        column-gap: 3px;
        font-size: 16px;
      }

      .switch {
        width: 55px;
        height: 30px;
      }

      .track::after {
        width: 20px;
        height: 20px;
        left: 4px;
        top: 3px;
      }

      .switch input:checked + .track::after {
        transform: translateX(23px);
      }

      .background-title {
        margin-bottom: 7px;
        font-size: 16px;
      }

      .palette {
        grid-template-columns: repeat(4, 36px);
        row-gap: 12px;
      }

      .swatch {
        width: 36px;
        height: 36px;
      }

      .reset-title {
        top: 37.2%;
        font-size: 24px;
      }

      .reset-action {
        width: 120px;
        min-height: 48px;
        font-size: 20px;
        padding: 11px 18px;
      }

      .reset-actions {
        top: calc(37.2% + 61px);
        gap: 28px;
      }
    }

    @media (orientation: landscape) and (max-width: 1024px) and (max-height: 600px) {
      .counter-stage {
        inset: 52px 0 0;
        grid-template-rows: minmax(0, 1fr) 34px;
        gap: 6px;
        padding: clamp(32px, 9svh, 44px) 14px calc(clamp(24px, 7svh, 36px) + env(safe-area-inset-bottom));
      }

      #countDisplay {
        height: min(161.04px, 37.84svh);
        font-size: min(183px, 43svh);
        transform: none;
      }

      #countDisplay.digits-2 {
        font-size: min(156px, 36.5svh);
      }

      #countDisplay.digits-3 {
        font-size: min(124px, 30.1svh);
      }

      #countDisplay.digits-4 {
        font-size: min(102px, 24.7svh);
      }

      .limit-status {
        height: 34px;
        transform: none;
      }

      .remaining-value {
        font-size: 19px;
      }

      .limit-label {
        margin-top: 2px;
        font-size: 9px;
      }

      .counter-controls {
        position: absolute;
        left: max(32px, calc(14px + env(safe-area-inset-left)));
        right: max(32px, calc(14px + env(safe-area-inset-right)));
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: auto;
        height: 62px;
        justify-self: auto;
        margin: 0;
      }

      .count-btn {
        flex-basis: 62px;
        width: 62px;
        height: 62px;
      }

      .count-btn svg {
        width: 38px;
        height: 38px;
      }
    }

    /* A clean indicator appears only for keyboard navigation. */
    button:focus-visible,
    .num-input:focus-visible {
      outline: 3px solid var(--foreground);
      outline-offset: 4px;
    }

    /* Phones use the button circle itself; PC keyboard focus is restored below. */
    .count-btn:focus,
    .count-btn:focus-visible {
      outline: none;
      outline-offset: 0;
      border-color: var(--foreground);
      box-shadow: none;
      filter: none;
    }

    .num-input:focus-visible {
      outline-color: #111111;
      outline-offset: 2px;
    }

    .switch input:focus-visible + .track {
      outline: 3px solid var(--foreground);
      outline-offset: 4px;
    }

    @media (hover: hover) and (pointer: fine) {
      .count-btn.space-focus {
        outline: 3px solid var(--foreground);
        outline-offset: 4px;
      }

      .num-input {
        cursor: text;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
      }
    }
