  :root {
    --bg: #07070f;
    --bg-surface: #0f0f1c;
    --bg-elevated: #171728;
    --bg-glass: rgba(7, 7, 15, 0.88);
    --border: rgba(255, 255, 255, 0.07);
    --border-hi: rgba(255, 255, 255, 0.14);
    --text-primary: #edeaf4;
    --text-secondary: #857fa0;
    --text-muted: #3e3a55;
    --col-focus: #22c55e;
    --col-focus-dim: rgba(34, 197, 94, 0.13);
    --col-focus-glow: rgba(34, 197, 94, 0.22);
    --col-short: #00cfa8;
    --col-short-dim: rgba(0, 207, 168, 0.13);
    --col-short-glow: rgba(0, 207, 168, 0.22);
    --col-long: #a78bfa;
    --col-long-dim: rgba(167, 139, 250, 0.13);
    --col-long-glow: rgba(167, 139, 250, 0.22);
    --accent: var(--col-focus);
    --accent-dim: var(--col-focus-dim);
    --accent-glow: var(--col-focus-glow);
    --ring-r: 122;
    --ring-size: 284px;
    --radius: 14px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t: 0.25s var(--ease);
    --t-slow: 0.45s var(--ease);
    --max-w: 1200px;
  }

  [data-theme="light"] {
    --bg: #f3f0ec;
    --bg-surface: #ffffff;
    --bg-elevated: #ebe7e1;
    --bg-glass: rgba(243, 240, 236, 0.92);
    --border: rgba(0, 0, 0, 0.07);
    --border-hi: rgba(0, 0, 0, 0.14);
    --text-primary: #1a1726;
    --text-secondary: #6a657e;
    --text-muted: #b0abc4;
    --col-focus-dim: rgba(34, 197, 94, 0.10);
    --col-short-dim: rgba(0, 207, 168, 0.10);
    --col-long-dim: rgba(167, 139, 250, 0.10);
    --col-focus-glow: rgba(34, 197, 94, 0.15);
    --col-short-glow: rgba(0, 207, 168, 0.15);
    --col-long-glow: rgba(167, 139, 250, 0.15);
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
  }

  html {
    scroll-behavior: smooth
  }

  body {
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.5;
    transition: background var(--t-slow), color var(--t-slow);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: .018;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  .orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    z-index: 0;
    transition: background var(--t-slow)
  }

  .orb-a {
    width: 560px;
    height: 560px;
    top: -180px;
    right: -120px;
    background: var(--accent-glow);
    opacity: .5
  }

  .orb-b {
    width: 380px;
    height: 380px;
    bottom: -80px;
    left: -80px;
    background: var(--col-long-glow);
    opacity: .35
  }

  .app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    isolation: isolate
  }

  .header {
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: var(--bg-glass);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Shift entire header UP by the exact height of the banner */
  .header.hide-banner {
    transform: translateY(calc(-1 * var(--banner-h, 0px)));
  }

  .header.banner-closed .top-banner {
    display: none !important;
  }

  .header.banner-closed {
    transform: translateY(0) !important;
  }

  .top-banner {
    background: #16a34a;
    color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .top-banner-inner {
    position: relative;
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    padding: 10px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }

  .top-banner-text {
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
  }

  .top-banner-actions {
    display: flex;
    gap: 8px;
  }

  .top-btn {
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all var(--t);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
  }

  .chrome-btn {
    background: #ffffff;
    color: #16a34a;
  }

  .chrome-btn:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
  }

  .edge-btn {
    background: #000000;
    color: #ffffff;
  }

  .edge-btn:hover {
    background: #111111;
    transform: translateY(-1px);
  }

  .top-banner-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--t);
  }

  .top-banner-close:hover {
    color: #ffffff;
  }

  @media (max-width: 768px) {
    .top-banner {
      display: none !important;
    }
  }

  .header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 32px;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary)
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: background var(--t);
    box-shadow: 0 4px 14px var(--accent-glow);
  }

  .logo-name {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -.025em
  }

  .logo-pill {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 2px 7px;
    border-radius: 20px;
  }

  .nav-tabs {
    display: flex;
    gap: 3px;
    background: var(--bg-elevated);
    padding: 4px;
    border-radius: 11px;
    border: 1px solid var(--border);
  }

  .nav-tab {
    padding: 7px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t);
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .nav-tab.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25)
  }

  .nav-tab:hover:not(.active) {
    color: var(--text-primary)
  }

  .hdr-actions {
    display: flex;
    align-items: center;
    gap: 8px
  }

  .streak-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--col-focus-dim);
    border: 1px solid var(--col-focus-glow);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--col-focus);
    transition: all var(--t);
  }

  .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--t);
  }

  .icon-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hi);
    background: var(--bg-surface)
  }

  .lang-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
  }

  .lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t);
    white-space: nowrap;
  }

  .lang-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hi);
    background: var(--bg-surface)
  }

  .lang-btn .chevron {
    font-size: 10px;
    transition: transform var(--t)
  }

  .lang-picker.open .lang-btn .chevron {
    transform: rotate(180deg)
  }

  .lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 200;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 5px;
    min-width: 160px;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity var(--t), transform var(--t);
  }

  .lang-dropdown::-webkit-scrollbar {
    width: 3px
  }

  .lang-dropdown::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px
  }

  .lang-picker.open .lang-dropdown {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0)
  }

  .lang-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--t);
    text-decoration: none;
  }

  .lang-option:hover {
    background: var(--bg-elevated);
    color: var(--text-primary)
  }

  .lang-option.active {
    color: var(--accent);
    background: var(--accent-dim)
  }

  .lang-flag {
    font-size: 16px
  }

  .lang-name-label {
    font-weight: 500
  }

  .tools-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
  }
  .tools-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t);
    white-space: nowrap;
    text-decoration: none;
  }
  .tools-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hi);
    background: var(--bg-surface)
  }
  .tools-btn .chevron {
    font-size: 10px;
    transition: transform var(--t)
  }
  .tools-picker:hover .tools-btn .chevron {
    transform: rotate(180deg)
  }
  .tools-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 200;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 5px;
    min-width: 200px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity var(--t), transform var(--t);
  }
  .tools-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
  }
  .tools-picker:hover .tools-dropdown {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }
  .tools-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--t);
    text-decoration: none;
  }
  .tools-option:hover {
    background: var(--bg-elevated);
    color: var(--text-primary)
  }

  .main {
    flex: 1 1 auto;
    padding: 24px 32px;
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%
  }

  .view {
    display: none;
    animation: fadeUp .28s var(--ease)
  }

  .view.active {
    display: block
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(10px)
    }

    to {
      opacity: 1;
      transform: translateY(0)
    }
  }

  .timer-grid {
    display: grid;
    grid-template-columns: 1fr 328px;
    gap: 22px;
    align-items: start
  }

  .mode-row {
    display: flex;
    gap: 6px;
    margin-bottom: 32px;
    justify-content: center;
    flex-wrap: wrap
  }

  .mode-pill {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t);
  }

  .mode-pill.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent)
  }

  .mode-pill:hover:not(.active) {
    border-color: var(--border-hi);
    color: var(--text-primary)
  }

  .ring-wrap {
    display: flex;
    flex-direction: column;
    align-items: center
  }

  .ring-holder {
    position: relative;
    width: var(--ring-size);
    height: var(--ring-size);
    margin-bottom: 28px
  }

  .ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg)
  }

  .ring-track {
    fill: none;
    stroke: var(--border)
  }

  .ring-prog {
    fill: none;
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke var(--t-slow)
  }

  .ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px
  }

  .ring-time {
    font-family: 'DM Mono', monospace;
    font-size: 60px;
    font-weight: 400;
    letter-spacing: -.02em;
    color: var(--text-primary);
    line-height: 1;
    transition: color var(--t);
  }

  .ring-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600
  }

  .running .ring-prog {
    animation: ringGlow 2.5s ease-in-out infinite
  }

  @keyframes ringGlow {

    0%,
    100% {
      filter: drop-shadow(0 0 5px var(--accent-glow))
    }

    50% {
      filter: drop-shadow(0 0 16px var(--accent-glow))
    }
  }

  .ctrl-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px
  }

  .ctrl-btn {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--t);
  }

  .ctrl-btn:hover {
    border-color: var(--border-hi);
    color: var(--text-primary);
    transform: translateY(-1px)
  }

  .ctrl-primary {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all var(--t);
    box-shadow: 0 5px 22px var(--accent-glow);
  }

  .ctrl-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow)
  }

  .ctrl-primary:active {
    transform: translateY(0)
  }

  .dots-row {
    display: flex;
    gap: 9px;
    margin-bottom: 28px
  }

  .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all var(--t)
  }

  .dot.done {
    background: var(--accent)
  }

  .dot.cur {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim)
  }

  .panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px
  }

  .panel:last-child {
    margin-bottom: 0
  }

  .panel-hdr {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between
  }

  .panel-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-secondary)
  }

  .panel-meta {
    font-size: 11px;
    color: var(--text-muted)
  }

  .panel-body {
    padding: 14px
  }

  .task-input-row {
    display: flex;
    gap: 7px;
    margin-bottom: 12px
  }

  .task-field {
    flex: 1;
    padding: 9px 13px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color var(--t);
  }

  .task-field:focus {
    border-color: var(--accent)
  }

  .task-field::placeholder {
    color: var(--text-muted)
  }

  .task-add {
    padding: 9px 14px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 9px;
    color: var(--accent);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t);
    line-height: 1;
  }

  .task-add:hover {
    background: var(--accent);
    color: #fff
  }

  .task-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 240px;
    overflow-y: auto
  }

  .task-list::-webkit-scrollbar {
    width: 3px
  }

  .task-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px
  }

  .task-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    background: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    transition: all var(--t);
    animation: slideIn .18s var(--ease);
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateX(-6px)
    }

    to {
      opacity: 1;
      transform: translateX(0)
    }
  }

  .task-item:hover {
    border-color: var(--border-hi)
  }

  .task-item.cur-task {
    border-color: var(--accent);
    background: var(--accent-dim)
  }

  .task-item.done-task .task-name {
    text-decoration: line-through;
    color: var(--text-muted)
  }

  .task-check {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-hi);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
    transition: all var(--t);
    color: transparent;
    background: transparent;
  }

  .done-task .task-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff
  }

  .task-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    word-break: break-word
  }

  .task-pomos {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0
  }

  .task-del {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all var(--t);
    opacity: 0;
    flex-shrink: 0;
  }

  .task-item:hover .task-del {
    opacity: 1
  }

  .task-del:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, .1)
  }

  .tasks-empty {
    text-align: center;
    padding: 22px 16px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6
  }

  .tasks-empty-icon {
    font-size: 30px;
    margin-bottom: 8px
  }

  .sound-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px
  }

  .sound-btn {
    padding: 12px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all var(--t);
    font-weight: 500;
  }

  .sound-icon {
    font-size: 22px
  }

  .sound-btn:hover {
    border-color: var(--border-hi);
    color: var(--text-primary)
  }

  .sound-btn.on {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent)
  }

  .vol-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 11px
  }

  .vol-lbl {
    font-size: 14px;
    color: var(--text-muted)
  }

  .vol-slider {
    flex: 1;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
  }

  .vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px var(--accent-glow);
  }

  .stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px
  }

  .stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--t)
  }

  .stat-card:hover {
    border-color: var(--border-hi)
  }

  .stat-icon {
    font-size: 26px;
    margin-bottom: 12px
  }

  .stat-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px
  }

  .stat-val {
    font-family: 'DM Mono', monospace;
    font-size: 34px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px
  }

  .stat-sub {
    font-size: 12px;
    color: var(--text-secondary)
  }

  .chart-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px
  }

  .sect-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary)
  }

  .bar-chart {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    height: 110px
  }

  .bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    height: 100%
  }

  .bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end
  }

  .bar {
    width: 100%;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 4px 4px 0 0;
    min-height: 3px;
    transition: height .7s var(--ease), background var(--t-slow);
    position: relative;
    overflow: hidden
  }

  .bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .09), transparent)
  }

  .bar.today {
    background: var(--accent)
  }

  .bar-day {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em
  }

  .bar-num {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    color: var(--text-secondary)
  }

  .badges-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 10px
  }

  .badge {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: all var(--t)
  }

  .badge.unlocked {
    border-color: var(--accent);
    background: var(--accent-dim)
  }

  .badge.locked {
    opacity: .45;
    filter: grayscale(.3)
  }

  .badge-icon-big {
    font-size: 28px;
    margin-bottom: 8px
  }

  .badge-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px
  }

  .badge-desc {
    font-size: 11px;
    color: var(--text-muted)
  }

  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t)
  }

  .overlay.open {
    opacity: 1;
    pointer-events: all
  }

  .modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    max-height: 88vh;
    overflow-y: auto;
    transform: translateY(18px) scale(.97);
    transition: transform var(--t);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .55)
  }

  .overlay.open .modal {
    transform: translateY(0) scale(1)
  }

  .modal-hdr {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 1
  }

  .modal-title {
    font-size: 16px;
    font-weight: 600
  }

  .modal-x {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all var(--t)
  }

  .modal-x:hover {
    color: var(--text-primary)
  }

  .modal-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 20px
  }

  .grp-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 10px
  }

  .set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px
  }

  .set-lbl {
    font-size: 13px;
    font-weight: 500
  }

  .set-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px
  }

  .num-inp {
    width: 68px;
    padding: 7px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: border-color var(--t)
  }

  .num-inp:focus {
    border-color: var(--accent)
  }

  .toggle-wrap {
    position: relative;
    width: 40px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0
  }

  .toggle-wrap input {
    display: none
  }

  .toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 11px;
    transition: all var(--t)
  }

  .toggle-wrap input:checked+.toggle-track {
    background: var(--accent);
    border-color: var(--accent)
  }

  .toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--t);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3)
  }

  .toggle-wrap input:checked~.toggle-thumb {
    transform: translateX(18px)
  }

  .divider {
    height: 1px;
    background: var(--border);
    margin: 2px 0
  }

  kbd {
    display: inline-block;
    padding: 1px 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--text-muted)
  }

  .btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t)
  }

  .btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 3px 12px var(--accent-glow)
  }

  .btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px)
  }

  .btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border)
  }

  .btn-secondary:hover {
    border-color: var(--border-hi)
  }

  .btn-danger {
    background: rgba(239, 68, 68, .1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, .2)
  }

  .btn-danger:hover {
    background: rgba(239, 68, 68, .2)
  }

  .complete-overlay {
    position: fixed;
    inset: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(9px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t)
  }

  .complete-overlay.show {
    opacity: 1;
    pointer-events: all
  }

  .complete-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 38px 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    transform: scale(.9);
    transition: transform var(--t);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
    position: relative;
  }

  .complete-overlay.show .complete-card {
    transform: scale(1)
  }

  .complete-emoji {
    font-size: 52px;
    margin-bottom: 14px
  }

  .complete-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px
  }

  .complete-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5
  }

  .complete-btns {
    display: flex;
    gap: 9px;
    justify-content: center
  }

  .confetti-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 22px
  }

  .confetti-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: confettiFall 1s ease-out forwards
  }

  @keyframes confettiFall {
    0% {
      opacity: 1;
      transform: translateY(0) rotate(0)
    }

    100% {
      opacity: 0;
      transform: translateY(120px) rotate(360deg)
    }
  }

  .toast-host {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 7px
  }

  .toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 11px 15px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .32);
    animation: toastIn .25s var(--ease);
    max-width: 290px
  }

  @keyframes toastIn {
    from {
      opacity: 0;
      transform: translateY(8px) scale(.95)
    }

    to {
      opacity: 1;
      transform: none
    }
  }

  .toast.out {
    animation: toastOut .25s var(--ease) forwards
  }

  @keyframes toastOut {
    from {
      opacity: 1
    }

    to {
      opacity: 0;
      transform: translateY(8px)
    }
  }

  .shortcuts-bar {
    text-align: center;
    padding: 12px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px
  }

  .shortcut {
    display: flex;
    align-items: center;
    gap: 6px
  }

  .static-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 32px 80px
  }

  .static-page h1 {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    letter-spacing: -.03em;
    margin-bottom: 16px;
    color: var(--text-primary)
  }

  .static-page h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 36px 0 12px;
    color: var(--text-primary)
  }

  .static-page p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 14px
  }

  .static-page ul,
  .static-page ol {
    padding-left: 22px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px
  }

  .static-page li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7
  }

  .static-page a {
    color: var(--accent);
    text-decoration: none
  }

  .static-page a:hover {
    text-decoration: underline
  }

  .static-page .updated {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 32px
  }

  .static-page .card-block {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px
  }

  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 28px
  }

  .contact-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    transition: border-color var(--t)
  }

  .contact-card:hover {
    border-color: var(--border-hi)
  }

  .contact-card .icon {
    font-size: 32px;
    margin-bottom: 12px
  }

  .contact-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px
  }

  .contact-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.5
  }

  /* â”€â”€ Page H1 â€” above-fold primary SEO heading â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .page-h1 {
    text-align: center;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.02em;
    margin: 0 auto 24px;
    max-width: 760px;
    width: 100%;
    line-height: 1.25;
    padding: 8px 24px;
    display: block;
  }

  @media(max-width:900px) {
    .header-inner {
      padding: 14px 20px
    }

    .main {
      padding: 20px 20px
    }
  }

  @media(max-width:780px) {

    .logo-pill,
    .streak-chip {
      display: none
    }

    .timer-grid {
      grid-template-columns: 1fr
    }

    .stats-cards {
      grid-template-columns: 1fr 1fr
    }

    :root {
      --ring-size: 240px
    }

    .ring-time {
      font-size: 48px
    }

    .shortcuts-bar {
      display: none
    }

    .nav-tab .tab-label {
      display: none
    }

    .lang-name-label {
      display: none
    }
  }

  @media(max-width:600px) {
    .static-page {
      padding: 40px 20px 60px
    }

    .contact-grid {
      grid-template-columns: 1fr
    }
  }

  @media(max-width:480px) {
    .stats-cards {
      grid-template-columns: 1fr
    }

    :root {
      --ring-size: 200px
    }

    .ring-time {
      font-size: 40px
    }
  }

  [dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0
  }

  [dir="rtl"] .toast-host {
    right: auto;
    left: 22px
  }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
  }

  ::-webkit-scrollbar {
    width: 4px
  }

  ::-webkit-scrollbar-track {
    background: transparent
  }

  ::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px
  }