    :root {
      --bg-deep: #000;
      --surface: #111;
      --surface-strong: #0a0a0a;
      --text-primary: #f5f5f7;
      --text-secondary: #b8b8b8;
      --text-muted: #6a6a6a;
      --text-subtle: #4a4a4a;
      --accent: #00ffff;
      --accent-strong: #00ffff;
      --accent-warm: #ff9f0a;
      --danger: #ff453a;
      --warning: #ffd60a;
      --stroke-soft: #1a1a1a;
      --stroke-strong: #2a2a2a;
      --cyan: #00ffff;
      --orange: #ff9f0a;
      --blue: #64d2ff;
      --red: #ff453a;
      --radius-xl: 12px;
      --radius-lg: 10px;
      --radius-md: 8px;
      --ease-smooth: cubic-bezier(0.2, 0, 0, 1);
    }

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

    html,
    body {
      min-height: 100%;
    }

    body {
      font-family: 'Outfit', -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
      font-weight: 200;
      color: var(--text-primary);
      background: var(--bg-deep);
      padding: 40px 20px 88px;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    body::before {
      content: "";
      position: fixed;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.12), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(102, 0, 255, 0.08), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 204, 0, 0.06), transparent 50%);
      z-index: -1;
      animation: subtle-rotate 60s linear infinite;
      pointer-events: none;
    }

    @keyframes subtle-rotate {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    
    .background-control {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: 16px;
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    
    .background-control label {
      margin: 0;
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    
    .background-control input[type="range"] {
      width: 80px;
      height: 4px;
      -webkit-appearance: none;
      background: var(--stroke-soft);
      border-radius: 2px;
      outline: none;
      padding: 0;
    }
    
    .background-control input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 12px;
      height: 12px;
      background: var(--accent);
      border-radius: 50%;
      cursor: pointer;
    }
    
    .background-control input[type="range"]::-moz-range-thumb {
      width: 12px;
      height: 12px;
      background: var(--accent);
      border-radius: 50%;
      cursor: pointer;
      border: none;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      padding: 16px 0;
      border-bottom: 1px solid var(--stroke-soft);
    }

    .toolbar .action-btn {
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--text-muted);
      background: none;
      border: none;
      cursor: pointer;
      padding: 8px 0;
      transition: color 0.2s ease;
      font-family: 'Outfit', sans-serif;
      width: auto;
      height: auto;
      border-radius: 0;
    }

    .toolbar .action-btn:hover {
      color: var(--text-secondary);
    }

    .page-shell {
      width: min(1200px, 100%);
      margin: 0 auto;
    }

    .header {
      margin-bottom: 24px;
      padding: 12px 0;
      border-bottom: 1px solid var(--stroke-soft);
    }

    h1 {
      font-family: 'Outfit', -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
      font-size: clamp(2rem, 5vw, 3.5rem);
      font-weight: 200;
      line-height: 0.92;
      letter-spacing: 0.1em;
      margin-bottom: 8px;
      color: var(--text-primary);
      text-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    }

    .view-controls {
      margin: 0 0 16px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      padding: 16px 0;
      border-bottom: 1px solid #1a1a1a;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
      max-width: 1200px;
      margin: 0 auto 36px;
    }

    .grid > * {
      animation: fade-in 0.3s ease forwards;
      opacity: 0;
    }

    .grid > *:nth-child(2) {
      animation-delay: 60ms;
    }

    .grid > *:nth-child(3) {
      animation-delay: 120ms;
    }

    .grid > *:nth-child(4) {
      animation-delay: 180ms;
    }

    @keyframes fade-in {
      to { opacity: 1; }
    }

    .tile,
    .add-btn {
      min-height: 220px;
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 24px;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .tile {
      --tile-accent: var(--accent);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 12px;
      padding: 24px;
      cursor: grab;
    }

    .tile::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--accent), transparent);
      opacity: 0.8;
    }

    .tile.dragging {
      opacity: 0.5;
      cursor: grabbing;
      transform: scale(1.02);
    }

    .tile.drag-over {
      border-color: var(--accent);
      box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    }

    .tile.urgent::before {
      background: linear-gradient(90deg, transparent, var(--danger), transparent);
    }

    .tile.urgent:hover {
      border-color: var(--danger);
      box-shadow: 0 0 30px rgba(255, 69, 58, 0.3);
    }

    .tile.urgent .days-number {
      color: var(--danger);
      text-shadow: 0 0 20px rgba(255, 69, 58, 0.5);
    }

    .tile.urgent .progress-ring-fill {
      stroke: var(--danger);
      filter: drop-shadow(currentColor 0 0 4px);
    }

    .tile.soon::before {
      background: linear-gradient(90deg, transparent, var(--warning), transparent);
    }

    .tile.soon:hover {
      border-color: var(--warning);
      box-shadow: 0 0 30px rgba(255, 214, 10, 0.3);
    }

    .tile.soon .days-number {
      color: var(--warning);
      text-shadow: 0 0 20px rgba(255, 214, 10, 0.5);
    }

    .tile.soon .progress-ring-fill {
      stroke: var(--warning);
      filter: drop-shadow(currentColor 0 0 4px);
    }

    .tile.past {
      opacity: 0.3;
      background: rgba(100, 100, 100, 0.1);
    }

    .tile.past::before {
      display: none;
    }

    .tile.pinned {
      order: -1 !important;
    }

    .tile.pinned::after {
      content: "";
      position: absolute;
      top: 12px;
      left: 12px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 10px var(--accent);
    }

    .tile-actions {
      position: absolute;
      top: 16px;
      right: 16px;
      display: flex;
      gap: 8px;
      z-index: 2;
    }

    .tile-action-btn {
      width: 32px;
      height: 32px;
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 10px;
      color: rgba(255, 255, 255, 0.6);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: 0.2s;
      font-size: 0.9rem;
    }

    .tile-action-btn:hover,
    .tile-action-btn:focus-visible {
      background: rgba(255, 255, 255, 0.2);
      color: var(--accent);
      border-color: var(--accent);
      box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
      outline: none;
    }

    .tile-action-btn.pinned {
      color: var(--accent);
    }

    .progress-container {
      position: absolute;
      bottom: 16px;
      right: 16px;
      width: 48px;
      height: 48px;
      z-index: 1;
    }

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

    .progress-ring-bg {
      fill: none;
      stroke: #2a2a2a;
      stroke-width: 3;
    }

    .progress-ring-fill {
      fill: none;
      stroke: var(--accent);
      stroke-width: 3;
      stroke-linecap: round;
      transition: stroke-dashoffset 0.5s;
      filter: drop-shadow(0 0 4px var(--accent));
    }

    .progress-text {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 300;
      letter-spacing: 0.05em;
    }

    .days-number {
      font-family: 'Outfit', -apple-system, 'SF Pro Display', sans-serif;
      font-size: clamp(2.55rem, 5vw, 3.75rem);
      line-height: 0.95;
      font-weight: 200;
      letter-spacing: -0.01em;
      color: var(--accent);
      text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    }

    .tile.tomorrow .days-number {
      font-size: clamp(1.95rem, 4.2vw, 2.6rem);
    }

    .days-label {
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 300;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    .additional-units {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 6px;
    }

    .unit-info {
      display: flex;
      flex-direction: column;
      align-items: center;
      min-width: 42px;
      padding: 5px 8px;
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.03);
    }

    .unit-number {
      color: var(--text-secondary);
      font-size: 0.9rem;
      line-height: 1;
      font-weight: 300;
    }

    .unit-label {
      font-size: 9px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-top: 3px;
    }

    .event-title {
      color: var(--text-primary);
      font-size: 1.08rem;
      line-height: 1.3;
      font-weight: 300;
      padding-right: 52px;
      text-wrap: balance;
    }

    .add-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      text-align: center;
      padding: 22px;
      gap: 10px;
      border: 2px dashed rgba(255, 255, 255, 0.2);
      transition: all 0.3s ease;
    }

    .add-btn:hover,
    .add-btn:focus-visible {
      background: rgba(255, 255, 255, 0.1);
      border-color: var(--accent);
      box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
      outline: none;
    }

    .add-icon {
      font-size: 3rem;
      color: var(--accent);
      text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
      margin-bottom: 10px;
      line-height: 1;
    }

    .add-copy {
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.15em;
      text-transform: uppercase;
    }

    .install-banner {
      display: none;
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 255, 255, 0.15);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(0, 255, 255, 0.4);
      border-radius: 16px;
      padding: 12px 20px;
      z-index: 100;
      align-items: center;
      gap: 12px;
      box-shadow: 0 10px 40px rgba(0, 255, 255, 0.3);
    }

    .install-banner.show {
      display: flex;
    }

    .install-banner span {
      color: rgba(255, 255, 255, 0.9);
      font-size: 0.9rem;
    }

    .install-btn {
      background: rgba(0, 255, 255, 0.3);
      border: 1px solid var(--accent);
      border-radius: 8px;
      padding: 8px 16px;
      color: var(--accent);
      cursor: pointer;
      font-size: 0.85rem;
      transition: 0.3s;
    }

    .install-btn:hover,
    .install-btn:focus-visible {
      background: rgba(0, 255, 255, 0.5);
      box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
      outline: none;
    }

    .install-dismiss {
      background: transparent;
      border: none;
      color: rgba(255, 255, 255, 0.5);
      cursor: pointer;
      font-size: 1.2rem;
      padding: 4px;
    }

    .install-dismiss:hover,
    .install-dismiss:focus-visible {
      color: var(--danger);
      outline: none;
    }

    .modal {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(0, 0, 0, 0.6);
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .modal.active {
      display: flex;
      animation: fade-in 0.2s ease-out;
    }

    .modal-content {
      width: min(460px, 100%);
      border-radius: 24px;
      border: 1px solid rgba(255, 255, 255, 0.2);
      background: rgba(20, 20, 20, 0.95);
      backdrop-filter: blur(20px);
      padding: 40px;
      position: relative;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .modal-header {
      font-family: 'Outfit', sans-serif;
      font-size: 1.5rem;
      font-weight: 200;
      letter-spacing: 0.1em;
      margin-bottom: 30px;
      text-align: center;
    }

    .close-btn {
      position: absolute;
      top: 20px;
      right: 20px;
      width: 36px;
      height: 36px;
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      color: rgba(255, 255, 255, 0.6);
      font-size: 1.2rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: 0.2s;
    }

    .close-btn:hover,
    .close-btn:focus-visible {
      border-color: var(--danger);
      color: var(--danger);
      box-shadow: 0 0 15px rgba(255, 69, 58, 0.5);
      outline: none;
    }

    .form-group {
      margin-bottom: 14px;
    }

    label {
      display: block;
      margin-bottom: 6px;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.15em;
      text-transform: uppercase;
    }

    input,
    select {
      width: 100%;
      padding: 12px 16px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      color: white;
      font-size: 1rem;
      transition: 0.3s;
    }

    input::placeholder {
      color: rgba(255, 255, 255, 0.4);
    }

    input:focus,
    select:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }

    select option {
      background: var(--bg-deep);
      color: var(--text-primary);
    }

    .button-group {
      margin-top: 22px;
      display: flex;
      gap: 10px;
    }

    .btn {
      flex: 1;
      padding: 12px 24px;
      border-radius: 12px;
      font-size: 1rem;
      cursor: pointer;
      transition: 0.3s;
      background: rgba(255, 255, 255, 0.1);
      color: white;
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .btn:hover,
    .btn:focus-visible {
      transform: translateY(-2px);
      outline: none;
    }

    .btn-primary {
      background: rgba(0, 255, 255, 0.2);
      border-color: rgba(0, 255, 255, 0.5);
      color: var(--accent);
    }

    .btn-primary:hover,
    .btn-primary:focus-visible {
      background: rgba(0, 255, 255, 0.3);
      box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    }

    .btn-danger {
      background: rgba(255, 69, 58, 0.2);
      border-color: rgba(255, 69, 58, 0.5);
      color: var(--danger);
    }

    .btn-danger:hover,
    .btn-danger:focus-visible {
      background: rgba(255, 69, 58, 0.3);
      box-shadow: 0 0 20px rgba(255, 69, 58, 0.5);
    }

    #deleteBtn {
      margin-top: 10px !important;
    }

    .stats-strip {
      margin-top: 20px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .stat-pill {
      border-radius: 999px;
      border: 1px solid var(--stroke-soft);
      background: none;
      color: var(--text-muted);
      padding: 6px 11px;
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.08em;
    }

    .view-controls {
      margin: 0 0 16px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      padding: 16px 0;
      border-bottom: 1px solid #1a1a1a;
    }

    .control-cluster {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .cluster-label {
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      margin-right: 2px;
    }

    .toggle-btn {
      border-radius: var(--radius-md);
      border: none;
      background: none;
      color: var(--text-muted);
      font-size: 11px;
      font-family: 'Outfit', sans-serif;
      font-weight: 300;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      padding: 8px 11px;
      cursor: pointer;
      transition: color 0.2s ease;
    }

    .toggle-btn:hover,
    .toggle-btn:focus-visible {
      color: var(--text-secondary);
      outline: none;
    }

    .toggle-btn.active {
      color: var(--text-primary);
    }

    .control-select {
      min-width: 148px;
      border-radius: var(--radius-md);
      border: 1px solid var(--stroke-soft);
      background: var(--bg-deep);
      color: var(--text-muted);
      font-family: 'Outfit', sans-serif;
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.05em;
      padding: 8px 10px;
      cursor: pointer;
    }

    .control-select:focus {
      outline: none;
      border-color: var(--text-muted);
    }

    .category-filter {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 0 0 20px;
      animation: fade-in 0.3s ease both;
    }

    .chip-btn {
      border-radius: 999px;
      border: 1px solid var(--stroke-soft);
      background: none;
      color: var(--text-muted);
      padding: 8px 12px;
      font-size: 11px;
      font-weight: 300;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      cursor: pointer;
      transition: color 0.2s ease;
    }

    .chip-btn:hover,
    .chip-btn:focus-visible {
      color: var(--text-secondary);
      outline: none;
    }

    .chip-btn.active {
      color: var(--text-primary);
      border-color: var(--text-muted);
    }

    .chip-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: rgb(var(--chip-rgb, 0, 255, 255));
    }

    .tile-footer {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 10px;
      margin-top: auto;
    }

    .event-meta {
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .category-chip {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      border-radius: 999px;
      border: 1px solid rgba(var(--chip-rgb, 0, 255, 255), 0.4);
      color: rgb(var(--chip-rgb, 0, 255, 255));
      font-size: 9px;
      line-height: 1;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      padding: 4px 8px;
      font-weight: 400;
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .event-date {
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 300;
    }

    .progress-bar-container {
      width: 112px;
      padding-bottom: 2px;
    }

    .progress-bar-track {
      width: 100%;
      height: 4px;
      border-radius: 999px;
      background: var(--stroke-soft);
      overflow: hidden;
    }

    .progress-bar-fill {
      height: 100%;
      border-radius: inherit;
      background: var(--accent);
      transition: width 0.22s ease;
    }

    .progress-bar-label {
      margin-top: 5px;
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 300;
      text-align: right;
    }

    body.progress-bar-mode .progress-container {
      display: none;
    }

    body:not(.progress-bar-mode) .progress-bar-container {
      display: none;
    }

    .field-hint {
      margin-top: 7px;
      color: var(--text-muted);
      font-size: 0.75rem;
      line-height: 1.3;
    }

    .field-hint.valid {
      color: var(--accent);
    }

    .field-hint.invalid {
      color: var(--danger);
    }

    .inline-builder {
      margin-top: 9px;
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .inline-builder input[type="text"] {
      flex: 1;
      min-width: 0;
    }

    .color-input {
      width: 42px;
      min-width: 42px;
      height: 40px;
      border-radius: var(--radius-md);
      border: 1px solid var(--stroke-strong);
      background: var(--bg-deep);
      padding: 4px;
      cursor: pointer;
    }

    .btn-quiet {
      flex: none;
      padding: 10px 12px;
      min-width: 74px;
    }

    .delete-note {
      margin-top: 8px;
      color: var(--danger);
      font-size: 0.74rem;
      line-height: 1.35;
    }

    .empty-state {
      margin: 12px 0 20px;
      padding: 16px;
      border-radius: var(--radius-lg);
      border: 1px dashed var(--stroke-soft);
      color: var(--text-muted);
      text-align: center;
      font-size: 0.9rem;
      line-height: 1.45;
    }

    .toast-stack {
      position: fixed;
      right: 18px;
      bottom: 18px;
      width: min(380px, calc(100% - 24px));
      display: flex;
      flex-direction: column;
      gap: 10px;
      z-index: 1100;
    }

    .toast {
      border-radius: var(--radius-lg);
      border: 1px solid var(--stroke-strong);
      background: var(--surface);
      padding: 11px 12px;
      color: var(--text-secondary);
      display: flex;
      gap: 10px;
      align-items: center;
      justify-content: space-between;
      animation: fade-in 0.2s ease-out both;
    }

    .toast-text {
      font-size: 0.81rem;
      line-height: 1.35;
      font-weight: 300;
    }

    .toast-actions {
      display: inline-flex;
      gap: 6px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .toast-btn {
      border-radius: var(--radius-md);
      border: 1px solid var(--stroke-soft);
      background: none;
      color: var(--text-muted);
      font-size: 10px;
      font-family: 'Outfit', sans-serif;
      font-weight: 300;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 6px 8px;
      cursor: pointer;
      transition: color 0.2s ease;
      white-space: nowrap;
    }

    .toast-btn:hover,
    .toast-btn:focus-visible {
      color: var(--text-secondary);
      outline: none;
    }

    body.layout-timeline .grid {
      grid-template-columns: 1fr;
      max-width: 920px;
      margin-left: auto;
      margin-right: auto;
    }

    body.layout-timeline .tile {
      min-height: 168px;
      padding-left: 24px;
    }

    body.layout-timeline .tile::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 2px;
      background: linear-gradient(180deg, var(--accent), transparent);
    }

    body.layout-timeline .tile-footer {
      margin-top: 8px;
    }

    body.compact-mode .tile,
    body.compact-mode .add-btn {
      min-height: 178px;
      padding: 16px;
    }

    body.compact-mode .days-number {
      font-size: clamp(1.95rem, 4vw, 2.65rem);
    }

    body.compact-mode .additional-units {
      display: none;
    }

    body.compact-mode .tile-actions {
      top: 10px;
      right: 10px;
    }

    @media (max-width: 940px) {
      body {
        padding-top: 24px;
      }

      .header {
        margin-bottom: 26px;
      }

      .view-controls {
        gap: 8px;
      }

      .control-select {
        min-width: 132px;
      }

      .grid {
        gap: 1px;
      }
    }

    @media (max-width: 760px) {
      body {
        padding: 18px 14px 84px;
      }

      .header {
        border-radius: var(--radius-lg);
      }

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

      .tile,
      .add-btn {
        min-height: 214px;
      }

      .install-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
      }

      .install-dismiss {
        align-self: center;
      }

      .modal {
        padding: 14px;
      }

      .modal-content {
        padding: 22px;
      }

      .button-group {
        flex-direction: column;
      }

      .inline-builder {
        flex-wrap: wrap;
      }

      .btn-quiet {
        width: 100%;
      }

      .toast-stack {
        right: 12px;
        left: 12px;
        width: auto;
      }

      .toast {
        flex-direction: column;
        align-items: flex-start;
      }

      .toast-actions {
        width: 100%;
        justify-content: flex-start;
      }
    }

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