/* =============================================================================
   Achi PWA – style.css
   Teljesítmény / achievement napló · Playfair Display + JetBrains Mono + Lora
   ============================================================================= */

/* =============================================================================
   1. CSS VÁLTOZÓK & ALAP RESET
   ============================================================================= */

:root {
  --brand:        #53664A;
  --brand-light:  #7a946f;
  --brand-bright: #94ad87;
  --brand-dim:    rgba(83, 102, 74, 0.18);
  --brand-glow:   rgba(83, 102, 74, 0.09);
  --brand-muted:  rgba(83, 102, 74, 0.55);

  --bg:           #0a0805;
  --surface-1:    rgba(16, 13, 11, 0.98);
  --surface-2:    rgba(22, 18, 14, 0.96);
  --glass:        rgba(255, 245, 235, 0.035);

  --shell-line:   rgba(83, 102, 74, 0.14);

  --text-1:       #f5ede0;
  --text-2:       #a09080;
  --text-3:       rgba(245, 237, 224, 0.25);

  --gold:         var(--brand-bright);
  --gold-light:   #a8c09c;
  --gold-dim:     var(--brand-dim);
  --gold-glow:    var(--brand-glow);

  --violet:       var(--brand);
  --violet-light: var(--brand-light);
  --violet-dim:   rgba(83, 102, 74, 0.12);
  --violet-glow:  rgba(83, 102, 74, 0.06);

  --rose:         #c47a6a;

  --sage:         var(--brand);
  --sage-light:   var(--brand-light);
  --sage-dim:     var(--brand-dim);

  --error:        #c44a4a;
  --error-dim:    rgba(196, 74, 74, 0.15);

  --border:       rgba(245, 237, 224, 0.08);
  --border-mid:   rgba(245, 237, 224, 0.14);
  --border-hi:    rgba(245, 237, 224, 0.25);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-body:    'Lora', Georgia, serif;

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:  cubic-bezier(0.4, 0, 0.2, 1);

  --sp-1:  0.5rem;
  --sp-2:  1rem;
  --sp-3:  1.5rem;
  --sp-4:  2rem;
  --sp-5:  2.5rem;
  --sp-6:  3rem;

  --cell-radius: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin:     0;
  padding:    0;
}

html {
  font-size:       16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme:    dark;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 130% 85% at 50% -35%, rgba(139, 126, 200, 0.12), transparent 52%),
    radial-gradient(ellipse 90% 60% at 100% 105%, rgba(232, 184, 74, 0.08), transparent 48%),
    radial-gradient(ellipse 70% 50% at -5% 60%, rgba(18, 15, 24, 0.35), transparent 45%);
  background-attachment: fixed;
  color:            var(--text-1);
  font-family:      var(--font-body);
  font-weight:      400;
  line-height:      1.65;
  min-height:       100dvh;
  overflow-x:       hidden;
}

ul, ol { list-style: none; }

button {
  cursor:     pointer;
  border:     none;
  background: none;
  font:       inherit;
  color:      inherit;
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select {
  font: inherit;
}

textarea { resize: vertical; }

code {
  font-family: var(--font-mono);
  font-size:   0.85em;
  color:       var(--gold-light);
}

/* =============================================================================
   2. GRAIN + AMBIENT BG
   ============================================================================= */

.grain-overlay {
  position:       fixed;
  inset:          0;
  z-index:        9999;
  pointer-events: none;
  opacity:        0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

.ambient-bg {
  position:       fixed;
  inset:          0;
  z-index:        0;
  pointer-events: none;
  overflow:       hidden;
}

.ambient-blob {
  position:      absolute;
  border-radius: 50%;
  filter:        blur(120px);
  opacity:       0.06;
  animation:     blobDrift 20s ease-in-out infinite;
}

.ambient-blob--1 {
  width:      600px;
  height:     600px;
  background: #8b7ec8;
  top:        -200px;
  left:       -100px;
}

.ambient-blob--2 {
  width:      500px;
  height:     500px;
  background: #e8b84a;
  bottom:     -100px;
  right:      -100px;
  animation-delay: -7s;
}

.ambient-blob--3 {
  width:      400px;
  height:     400px;
  background: #120f18;
  top:        50%;
  left:       50%;
  transform:  translate(-50%, -50%);
  animation-delay: -14s;
  opacity:    0.03;
}

@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.97); }
}

/* =============================================================================
   3. SCROLLBAR
   ============================================================================= */

::-webkit-scrollbar         { width: 8px; height: 8px; }
::-webkit-scrollbar-track   { background: var(--bg); }
::-webkit-scrollbar-thumb   { background: rgba(245, 237, 224, 0.1); border-radius: 4px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(245, 237, 224, 0.2); }
* { scrollbar-width: thin; scrollbar-color: rgba(245,237,224,0.1) transparent; }

/* =============================================================================
   4. ANIMÁCIÓK
   ============================================================================= */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

@keyframes dotPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes overlayOut {
  to { opacity: 0; pointer-events: none; }
}

@keyframes appReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes sync-status-collapse {
  0%, 52% { max-height: 2rem; opacity: 1; transform: translateY(0); }
  100%    { max-height: 0; opacity: 0; transform: translateY(6px); }
}

@keyframes sync-box-compact {
  0%, 52% { gap: 4px; padding: 7px 12px 7px 8px; }
  100%    { gap: 0; padding: 5px 10px 5px 8px; }
}

/* =============================================================================
   5. PIN OVERLAY
   ============================================================================= */

.pin-overlay {
  position:        fixed;
  inset:           0;
  z-index:         1000;
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         var(--sp-2);
  background:
    radial-gradient(ellipse 100% 75% at 50% 35%, rgba(32, 26, 18, 0.55), transparent 58%),
    radial-gradient(ellipse at 40% 38%, rgba(24, 18, 14, 0.96), rgba(5, 5, 4, 1));
  animation:       fadeIn 0.5s var(--ease-out) both;
}

.pin-overlay--exit { animation: overlayOut 0.5s var(--ease-smooth) forwards; }

.pin-card {
  position:      relative;
  width:         100%;
  max-width:     360px;
  padding:       var(--sp-5) var(--sp-4);
  background:    linear-gradient(168deg, rgba(26, 22, 18, 0.99) 0%, rgba(11, 9, 8, 0.99) 62%);
  border:        1px solid rgba(245, 237, 224, 0.09);
  border-radius: var(--radius-xl);
  box-shadow:
    0 0 0 1px rgba(139, 126, 200, 0.1),
    inset 0 1px 0 rgba(255, 245, 235, 0.04),
    0 46px 110px rgba(0, 0, 0, 0.72),
    0 0 90px rgba(139, 126, 200, 0.06);
}

.corner {
  position:     absolute;
  width:        14px;
  height:       14px;
  border-color: var(--border-mid);
  border-style: solid;
  pointer-events: none;
}
.corner--tl { top: 10px; left: 10px;   border-width: 1px 0 0 1px; }
.corner--tr { top: 10px; right: 10px;  border-width: 1px 1px 0 0; }
.corner--bl { bottom: 10px; left: 10px;  border-width: 0 0 1px 1px; }
.corner--br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

.pin-card__ornament {
  display:         flex;
  justify-content: center;
  margin-bottom:   var(--sp-3);
  color:           var(--gold);
}

.pin-card__ornament svg { width: 80px; opacity: 0.6; }

.pin-card__header { text-align: center; margin-bottom: var(--sp-4); }

.pin-card__eyebrow {
  font-family:    var(--font-mono);
  font-size:      0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--gold);
  opacity:        0.7;
  margin-bottom:  var(--sp-1);
}

.pin-card__title {
  font-family:    var(--font-display);
  font-size:      clamp(2rem, 6vw, 2.8rem);
  font-style:     italic;
  font-weight:    500;
  color:          var(--text-1);
  margin-bottom:  0.4rem;
  letter-spacing: -0.01em;
}

.pin-card__subtitle { font-size: 0.82rem; color: var(--text-2); font-style: italic; }

.pin-dots {
  display:         flex;
  justify-content: center;
  gap:             var(--sp-3);
  margin-bottom:   var(--sp-2);
}

.pin-dot {
  width:         12px;
  height:        12px;
  border-radius: 50%;
  border:        1.5px solid var(--border-mid);
  background:    transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.2s var(--ease-bounce);
}

.pin-dot--filled {
  background:   var(--gold);
  border-color: var(--gold);
  box-shadow:   0 0 12px rgba(83, 102, 74, 0.5);
  animation:    dotPop 0.2s var(--ease-bounce);
}

.pin-dot--error {
  background:   var(--error);
  border-color: var(--error);
  box-shadow:   0 0 12px rgba(196, 74, 74, 0.5);
}

.notify-pin-error {
  margin:        0 auto var(--sp-1);
  padding:       var(--sp-1) var(--sp-2);
  max-width:     16rem;
  text-align:    center;
  font-size:     0.8rem;
  line-height:   1.4;
  color:         #e89292;
  border-radius: var(--radius-md);
  border:        1px solid rgba(196, 74, 74, 0.38);
  background:    linear-gradient(135deg, rgba(196, 74, 74, 0.16) 0%, rgba(18, 14, 12, 0.82) 55%);
  backdrop-filter: blur(10px);
  min-height:    0;
  opacity:       0;
  transform:     translateY(-4px) scale(0.98);
  transition: opacity 0.22s, transform 0.24s;
  pointer-events: none;
}

.notify-pin-error:not(:empty) { min-height: 1.35em; }
.notify-pin-error--visible { opacity: 1; transform: translateY(0) scale(1); }
.pin-card--shake { animation: shake 0.4s var(--ease-smooth); }

.pin-keypad {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   0.5rem;
  margin-top:            var(--sp-2);
}

.pin-key {
  aspect-ratio:  1;
  border-radius: var(--radius-md);
  font-family:   var(--font-mono);
  font-size:     clamp(1rem, 3vw, 1.2rem);
  font-weight:   500;
  background:    rgba(245, 237, 224, 0.04);
  border:        1px solid var(--border);
  color:         var(--text-1);
  transition: background 0.15s, transform 0.1s var(--ease-bounce);
  user-select: none;
}

.pin-key:hover { background: rgba(245, 237, 224, 0.08); border-color: var(--border-mid); }
.pin-key:active { transform: scale(0.91); background: var(--gold-dim); border-color: rgba(83, 102, 74, 0.3); }
.pin-key--empty { pointer-events: none; background: transparent; border: none; }
.pin-key--action { font-size: 1.1rem; color: var(--text-2); }
.pin-key--action:hover { color: var(--error); background: var(--error-dim); }

/* =============================================================================
   6. APP + HEADER
   ============================================================================= */

.app {
  position:       relative;
  z-index:        1;
  min-height:     100dvh;
  display:        flex;
  flex-direction: column;
  animation:      appReveal 0.6s var(--ease-out) both;
}

.app[hidden] { display: none !important; }

.site-header {
  position:        sticky;
  top:             0;
  z-index:         100;
  background:      linear-gradient(180deg, rgba(15, 12, 10, 0.94) 0%, rgba(7, 7, 6, 0.89) 100%);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border-bottom:   1px solid var(--shell-line);
  box-shadow:      0 1px 0 rgba(255, 245, 235, 0.03);
}

.site-header__inner {
  max-width:       900px;
  margin-inline:   auto;
  padding:         var(--sp-2) var(--sp-3);
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--sp-2);
  flex-wrap:       wrap;
}

.site-header__title {
  font-family:    var(--font-display);
  font-size:      clamp(1.2rem, 3vw, 1.6rem);
  font-style:     italic;
  font-weight:    500;
  color:          var(--text-1);
  letter-spacing: -0.01em;
}

.site-header__tagline {
  font-family:    var(--font-mono);
  font-size:      0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--text-2);
  margin-top:     0.1rem;
  opacity:        0.7;
}

.site-header__right {
  display:     flex;
  align-items: center;
  gap:         var(--sp-2);
  flex-wrap:   wrap;
}

.dac-progress-wrap {
  display:        flex;
  flex-direction: column;
  align-items:    flex-end;
  gap:            0.35rem;
  min-width:      0;
  max-width:      11rem;
}

.dac-progress-label {
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  letter-spacing: 0.06em;
  color:          var(--gold-light);
  white-space:    nowrap;
}

.dac-progress-track {
  width:         100%;
  min-width:     120px;
  height:        5px;
  border-radius: 100px;
  background:    rgba(245, 237, 224, 0.08);
  overflow:      hidden;
  border:        1px solid var(--border);
}

.dac-progress-fill {
  height:        100%;
  width:         0%;
  border-radius: 100px;
  background:    linear-gradient(90deg, var(--brand), var(--brand-bright));
  transition:    width 0.45s var(--ease-out);
}

/* =============================================================================
   7. MAIN + LEGEND + SEARCH + FILTERS + ADD
   ============================================================================= */

.dac-main {
  max-width:     900px;
  margin-inline: auto;
  padding:       var(--sp-3) var(--sp-3) var(--sp-5);
  flex:          1;
  width:         100%;
}

.legend {
  display:         flex;
  align-items:     center;
  flex-wrap:       wrap;
  gap:             var(--sp-2);
  justify-content: space-between;
  padding-bottom:  var(--sp-2);
}

.legend__items {
  display:     flex;
  flex-wrap:   wrap;
  gap:         var(--sp-2);
  align-items: center;
}

.legend__item {
  display:     flex;
  align-items: center;
  gap:         0.4rem;
}

.legend__swatch {
  display:       block;
  width:         12px;
  height:        12px;
  border-radius: var(--cell-radius);
  flex-shrink:   0;
}

.legend__swatch--pending {
  background: var(--violet);
  box-shadow: 0 0 6px rgba(83, 102, 74, 0.45);
}

.legend__swatch--done {
  background: var(--gold);
  box-shadow: 0 0 6px rgba(83, 102, 74, 0.45);
}

.legend__mark {
  display:       inline-block;
  width:         12px;
  height:        12px;
  border-radius: 4px;
  position:      relative;
  border:        1px solid var(--border-mid);
  background:    rgba(245, 237, 224, 0.04);
}

.legend__mark--description::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  left: 1px;
  top: 1px;
  background: var(--gold);
  transform: rotate(45deg);
  border: 1px solid rgba(8, 8, 8, 0.9);
}

.legend__mark--star {
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       0.62rem;
  line-height:     1;
  color:           var(--gold-light);
  border-color:    rgba(83, 102, 74, 0.35);
  background:      rgba(83, 102, 74, 0.12);
}

.legend__text {
  font-family:    var(--font-mono);
  font-size:      0.7rem;
  color:          var(--text-2);
  letter-spacing: 0.03em;
}

.legend__hint {
  font-family:    var(--font-mono);
  font-size:      0.65rem;
  color:          var(--text-3);
  font-style:     italic;
  letter-spacing: 0.02em;
}

.dac-search-wrap { margin-bottom: var(--sp-3); }

.dac-search__input {
  width:         100%;
  background:    rgba(245, 237, 224, 0.04);
  border:        1px solid var(--border);
  border-radius: var(--radius-md);
  color:         var(--text-1);
  padding:       0.65rem 0.95rem;
  font-family:   var(--font-body);
  font-size:     0.9rem;
  outline:       none;
  transition:    border-color 0.15s, box-shadow 0.15s;
}

.dac-search__input:focus {
  border-color: rgba(83, 102, 74, 0.45);
  box-shadow:   0 0 0 3px var(--violet-glow);
}

.dac-search__input::placeholder { color: var(--text-3); font-style: italic; }

.dac-filter-section { padding: var(--sp-1) 0 var(--sp-2); }

.dac-filter {
  display:       flex;
  gap:           0.5rem;
  flex-wrap:     wrap;
  margin-bottom: var(--sp-3);
}

.dac-filter__btn {
  padding:        0.3rem 0.9rem;
  border-radius:  100px;
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  letter-spacing: 0.04em;
  background:     var(--glass);
  border:         1px solid var(--border);
  color:          var(--text-2);
  transition:     all 0.15s;
}

.dac-filter__btn:hover { border-color: var(--border-mid); color: var(--text-1); }

.dac-filter__btn--active {
  background:   var(--violet-dim);
  border-color: rgba(83, 102, 74, 0.35);
  color:        var(--violet-light);
}

.dac-add {
  display:       flex;
  gap:           var(--sp-2);
  align-items:   stretch;
  margin-bottom: var(--sp-4);
  flex-wrap:     wrap;
}

.dac-add__input {
  flex:          1;
  min-width:     140px;
  background:    rgba(245, 237, 224, 0.04);
  border:        1px solid var(--border);
  border-radius: var(--radius-md);
  color:         var(--text-1);
  padding:       0.75rem 1rem;
  font-family:   var(--font-body);
  font-size:     0.95rem;
  outline:       none;
  transition:    border-color 0.15s, box-shadow 0.15s;
}

.dac-add__input:focus {
  border-color: rgba(83, 102, 74, 0.45);
  box-shadow:   0 0 0 3px var(--gold-glow);
}

.dac-add__input::placeholder { color: var(--text-3); font-style: italic; }

.dac-add__done-label {
  display:     flex;
  align-items: center;
  gap:         0.45rem;
  font-family: var(--font-mono);
  font-size:   0.72rem;
  color:       var(--text-2);
  white-space: nowrap;
  padding:     0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border:      1px solid var(--border);
  background:  var(--glass);
}

.dac-add__done-check { accent-color: var(--gold); cursor: pointer; }

.dac-add__date-btn {
  display:       inline-flex;
  align-items:   center;
  gap:           0.45rem;
  flex:          0 1 auto;
  background:    rgba(245, 237, 224, 0.04);
  border:        1px solid rgba(83, 102, 74, 0.35);
  border-radius: var(--radius-md);
  color:         var(--gold-light);
  padding:       0.65rem 0.85rem;
  font-family:   var(--font-mono);
  font-size:     0.72rem;
  letter-spacing: 0.04em;
  white-space:   nowrap;
  transition:    background 0.15s, border-color 0.15s, transform 0.1s var(--ease-bounce);
}

.dac-add__date-btn[hidden] {
  display: none !important;
}

.dac-add__date-btn:hover {
  background:   var(--gold-dim);
  border-color: rgba(83, 102, 74, 0.45);
}

.dac-add__date-btn:active { transform: scale(0.97); }

.dac-add__date-btn__icon {
  font-size:   0.82rem;
  line-height: 1;
  opacity:     0.85;
}

.dac-add__date-btn__label {
  font-variant-numeric: tabular-nums;
}

.dac-add__btn {
  padding:        0.75rem 1.25rem;
  border-radius:  var(--radius-sm);
  font-family:    var(--font-mono);
  font-size:      0.78rem;
  font-weight:    600;
  letter-spacing: 0.06em;
  background:     var(--gold-dim);
  border:         1px solid rgba(83, 102, 74, 0.35);
  color:          var(--gold-light);
  transition:     background 0.15s, transform 0.1s var(--ease-bounce);
  white-space:    nowrap;
}

.dac-add__btn:hover {
  background: rgba(83, 102, 74, 0.22);
  box-shadow: 0 0 20px rgba(83, 102, 74, 0.12);
}

.dac-add__btn:active { transform: scale(0.96); }

/* =============================================================================
   8. SECTION HEADER + STATS
   ============================================================================= */

.section-header { margin-bottom: var(--sp-3); }

.section-eyebrow {
  font-family:    var(--font-mono);
  font-size:      0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--gold);
  opacity:        0.7;
  margin-bottom:  0.3rem;
}

.section-title {
  font-family:    var(--font-display);
  font-style:     italic;
  font-size:      clamp(1.3rem, 3vw, 1.8rem);
  font-weight:    500;
  color:          var(--text-1);
  letter-spacing: -0.01em;
}

.stats-section {
  padding:       var(--sp-3) 0 var(--sp-4);
  margin-top:    var(--sp-1);
}

.stats-section__head { margin-bottom: var(--sp-2); }

.stats-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.stats-hero {
  position:      relative;
  overflow:      hidden;
  padding:       var(--sp-3);
  border-radius: var(--radius-lg);
  border:        1px solid rgba(139, 126, 200, 0.2);
  background:
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(139, 126, 200, 0.1), transparent 50%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(232, 184, 74, 0.08), transparent 45%),
    linear-gradient(145deg, rgba(32, 26, 20, 0.95), rgba(18, 14, 11, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(245, 237, 224, 0.06),
    0 8px 28px rgba(0, 0, 0, 0.28);
}

.stats-hero__glow {
  position:   absolute;
  inset:      auto -15% -35% -15%;
  height:     55%;
  background: radial-gradient(ellipse at 50% 100%, rgba(232, 184, 74, 0.12), transparent 68%);
  pointer-events: none;
}

.stats-hero__main {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            var(--sp-2);
  margin-bottom:  var(--sp-2);
}

.stats-hero__primary { width: 100%; }

.stats-hero__eyebrow {
  font-family:    var(--font-mono);
  font-size:      0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--gold);
  opacity:        0.75;
  margin-bottom:  0.35rem;
}

.stats-hero__value {
  font-family:    var(--font-display);
  font-size:      clamp(2.6rem, 10vw, 3.6rem);
  font-weight:    500;
  line-height:    0.95;
  letter-spacing: -0.03em;
  color:          var(--text-1);
}

.stats-hero__label {
  font-family: var(--font-body);
  font-style:  italic;
  font-size:   clamp(0.88rem, 2.2vw, 1rem);
  color:       var(--text-2);
  margin-top:  0.2rem;
}

.stats-hero__year-line {
  display:       inline-flex;
  align-items:   baseline;
  flex-wrap:     wrap;
  gap:           0.3rem 0.45rem;
  padding:       0.38rem 0.75rem;
  border-radius: 100px;
  background:    rgba(83, 102, 74, 0.1);
  border:        1px solid rgba(83, 102, 74, 0.28);
}

.stats-hero__year-num {
  font-family: var(--font-mono);
  font-size:   1rem;
  font-weight: 700;
  color:       var(--gold-light);
}

.stats-hero__year-text {
  font-family:    var(--font-mono);
  font-size:      0.64rem;
  color:          var(--text-2);
  letter-spacing: 0.02em;
}

.stats-hero__year-text span { color: var(--gold-light); font-weight: 500; }

.stats-ribbon {
  display:               grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:                   1px;
  border-radius:         var(--radius-sm);
  overflow:              hidden;
  border:                1px solid var(--border);
  background:            var(--border);
}

.stats-ribbon__cell {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             0.45rem;
  padding:         0.65rem 0.55rem;
  background:      var(--surface-2);
  min-width:       0;
}

.stats-ribbon__icon {
  flex-shrink:     0;
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           1.65rem;
  height:          1.65rem;
  border-radius:   50%;
  font-size:       0.8rem;
  border:          1px solid var(--border-mid);
  background:      var(--glass);
}

.stats-ribbon__cell--starred .stats-ribbon__icon {
  border-color: rgba(83, 102, 74, 0.45);
  background:   rgba(83, 102, 74, 0.18);
  color:        var(--gold-light);
}

.stats-ribbon__cell--pending .stats-ribbon__icon {
  border-color: rgba(83, 102, 74, 0.35);
  background:   var(--violet-dim);
}

.stats-ribbon__cell--done .stats-ribbon__icon {
  border-color: rgba(83, 102, 74, 0.35);
  background:   var(--gold-dim);
}

.stats-ribbon__value {
  font-family: var(--font-mono);
  font-size:   clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 700;
  line-height: 1;
}

.stats-ribbon__cell--starred .stats-ribbon__value { color: var(--gold-light); }
.stats-ribbon__cell--pending .stats-ribbon__value { color: var(--violet-light); }
.stats-ribbon__cell--done .stats-ribbon__value { color: var(--gold-light); }

.stats-ribbon__label {
  font-family:    var(--font-mono);
  font-size:      0.58rem;
  letter-spacing: 0.03em;
  color:          var(--text-2);
  line-height:    1.25;
  text-align:     left;
  flex:           1;
  min-width:      0;
}

@media (min-width: 520px) {
  .stats-hero__main {
    flex-direction:  row;
    align-items:     flex-end;
    justify-content: space-between;
    gap:             var(--sp-3);
  }

  .stats-hero__primary { width: auto; flex: 1; min-width: 0; }
  .stats-ribbon__cell { padding: 0.7rem 0.85rem; gap: 0.55rem; }
}

/* =============================================================================
   9. CONTENT – TIMELINE + PENDING GRID + CARDS
   ============================================================================= */

.dac-pending-section {
  margin-top: var(--sp-3);
}

.dac-pending-section[hidden] { display: none !important; }

.dac-pending-section__shell {
  position:      relative;
  padding:       var(--sp-2) var(--sp-2) var(--sp-1);
  border-radius: var(--radius-lg);
  border:        1px solid rgba(83, 102, 74, 0.28);
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(83, 102, 74, 0.12), transparent 55%),
    linear-gradient(168deg, rgba(22, 18, 14, 0.96) 0%, rgba(12, 10, 8, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(245, 237, 224, 0.05),
    0 10px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.dac-pending-section__shell::before {
  content:    '';
  position:   absolute;
  left:       0;
  top:        0;
  bottom:     0;
  width:      3px;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  opacity:    0.85;
  pointer-events: none;
}

.dac-pending-section__toggle {
  width:           100%;
  display:         flex;
  align-items:     flex-start;
  justify-content: space-between;
  gap:             var(--sp-2);
  padding:         0.35rem 0.35rem 0.75rem 0.55rem;
  border:          none;
  background:      transparent;
  color:           inherit;
  cursor:          pointer;
  text-align:      left;
}

.dac-pending-section__intro {
  display:        flex;
  flex-direction: column;
  gap:            0.28rem;
  min-width:      0;
}

.dac-pending-section__eyebrow {
  font-family:    var(--font-mono);
  font-size:      0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--gold);
  opacity:        0.72;
}

.dac-pending-section__title-row {
  display:     flex;
  align-items: baseline;
  flex-wrap:   wrap;
  gap:         0.45rem 0.65rem;
}

.dac-pending-section__title {
  font-family: var(--font-display);
  font-style:  italic;
  font-size:   clamp(1.05rem, 3.2vw, 1.25rem);
  font-weight: 500;
  color:       var(--text-1);
  transition:  color 0.15s;
}

.dac-pending-section__toggle:hover .dac-pending-section__title {
  color: var(--gold-light);
}

.dac-pending-section__count {
  font-family:    var(--font-mono);
  font-size:      0.64rem;
  font-weight:    700;
  letter-spacing: 0.04em;
  color:          var(--gold-light);
  padding:        0.2rem 0.55rem;
  border-radius:  100px;
  border:         1px solid rgba(83, 102, 74, 0.38);
  background:     rgba(83, 102, 74, 0.16);
}

.dac-pending-section__hint {
  font-family: var(--font-body);
  font-style:  italic;
  font-size:   0.78rem;
  color:       var(--text-3);
  line-height: 1.4;
}

.dac-pending-section--collapsed .dac-pending-section__hint {
  display: none;
}

.dac-pending-section__chevron {
  flex-shrink:    0;
  width:          1.75rem;
  height:         1.75rem;
  display:        inline-flex;
  align-items:    center;
  justify-content: center;
  border-radius:  var(--radius-sm);
  border:         1px solid rgba(83, 102, 74, 0.28);
  background:     rgba(83, 102, 74, 0.1);
  font-size:      0.68rem;
  color:          var(--gold-light);
  line-height:    1;
  transition:     background 0.15s, border-color 0.15s;
}

.dac-pending-section__toggle:hover .dac-pending-section__chevron {
  background:   rgba(83, 102, 74, 0.2);
  border-color: rgba(83, 102, 74, 0.42);
}

.dac-pending-panel {
  display:    grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.38s var(--ease-out), opacity 0.28s;
  opacity:    1;
}

.dac-pending-panel--collapsed {
  grid-template-rows: 0fr;
  opacity:            0;
  pointer-events:     none;
}

.dac-pending-panel__inner {
  overflow:  hidden;
  min-height: 0;
}

.dac-pending-toolbar {
  display:         flex;
  flex-wrap:       wrap;
  align-items:     center;
  gap:             var(--sp-2);
  margin-bottom:   var(--sp-2);
  padding:         0 0.35rem 0 0.55rem;
}

.dac-pending-search__input {
  flex:          1 1 160px;
  min-width:     0;
  background:    rgba(245, 237, 224, 0.04);
  border:        1px solid var(--border);
  border-radius: var(--radius-md);
  color:         var(--text-1);
  padding:       0.58rem 0.75rem;
  font-family:   var(--font-mono);
  font-size:     0.72rem;
  outline:       none;
  transition:    border-color 0.15s, box-shadow 0.15s;
}

.dac-pending-search__input:focus {
  border-color: rgba(83, 102, 74, 0.45);
  box-shadow:   0 0 0 3px var(--gold-glow);
}

.dac-pending-search__input::placeholder {
  color:      var(--text-3);
  font-style: italic;
}

.dac-pending-view {
  display:       inline-flex;
  flex-shrink:   0;
  gap:           0.2rem;
  padding:       0.2rem;
  border-radius: var(--radius-md);
  border:        1px solid var(--border);
  background:    rgba(0, 0, 0, 0.22);
}

.dac-pending-view__btn {
  padding:        0.45rem 0.7rem;
  border-radius:  var(--radius-sm);
  font-family:    var(--font-mono);
  font-size:      0.64rem;
  letter-spacing: 0.04em;
  color:          var(--text-2);
  border:         1px solid transparent;
  background:     transparent;
  transition:     color 0.12s, background 0.12s, border-color 0.12s;
}

.dac-pending-view__btn:hover {
  color: var(--text-1);
}

.dac-pending-view__btn--active {
  color:        var(--gold-light);
  background:   rgba(83, 102, 74, 0.2);
  border-color: rgba(83, 102, 74, 0.35);
}

.dac-pending-list {
  display:       flex;
  flex-direction: row;
  align-items:   stretch;
  gap:           var(--sp-2);
  overflow-x:    auto;
  overflow-y:    visible;
  padding:       0.15rem 0.35rem 0.65rem 0.55rem;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 0.55rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(83, 102, 74, 0.4) transparent;
}

.dac-pending-list--grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  overflow-x:            visible;
  overflow-y:            visible;
  scroll-snap-type:      none;
  padding-bottom:        0.35rem;
}

.dac-pending-list--grid .dac-card {
  flex: none;
  width: 100%;
}

.dac-pending-list .dac-card {
  flex:              0 0 clamp(220px, 72vw, 270px);
  scroll-snap-align: start;
}

.dac-pending-list .dac-empty {
  flex:       1 1 100%;
  min-width:  min(100%, 320px);
  padding:    var(--sp-4) var(--sp-2);
}

.dac-timeline-section {
  margin-top:  var(--sp-5);
  padding-top: var(--sp-4);
}

.dac-timeline-section[hidden] { display: none !important; }

/* —— Teljesítés heatmap —— */

.dac-heatmap-section {
  margin-top: var(--sp-4);
}

.dac-heatmap-section[hidden] { display: none !important; }

.dac-heatmap-section__shell {
  position:      relative;
  border:        1px solid var(--border);
  border-radius: var(--radius-md);
  background:    linear-gradient(165deg, rgba(83, 102, 74, 0.08) 0%, rgba(12, 10, 8, 0.92) 55%);
  overflow:      hidden;
}

.dac-heatmap-section__shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(83, 102, 74, 0.12), transparent 70%);
  pointer-events: none;
}

.dac-heatmap-section__toggle {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--sp-2);
  width:           100%;
  padding:         var(--sp-3);
  border:          none;
  background:      transparent;
  color:           inherit;
  text-align:      left;
  cursor:          pointer;
}

.dac-heatmap-section__intro {
  display:        flex;
  flex-direction: column;
  gap:            0.2rem;
  min-width:      0;
}

.dac-heatmap-section__eyebrow {
  font-family:    var(--font-mono);
  font-size:      0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--text-3);
}

.dac-heatmap-section__title-row {
  display:     flex;
  align-items: baseline;
  gap:         0.55rem;
  flex-wrap:   wrap;
}

.dac-heatmap-section__title {
  font-family: var(--font-display);
  font-size:   clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 500;
  color:       var(--text-1);
}

.dac-heatmap-section__year {
  font-family:    var(--font-mono);
  font-size:      0.72rem;
  letter-spacing: 0.06em;
  color:          var(--gold-light);
  padding:        0.1rem 0.45rem;
  border-radius:  100px;
  border:         1px solid rgba(83, 102, 74, 0.35);
  background:     rgba(83, 102, 74, 0.12);
}

.dac-heatmap-section__hint {
  font-family: var(--font-body);
  font-size:   0.72rem;
  font-style:  italic;
  color:       var(--text-3);
}

.dac-heatmap-section--collapsed .dac-heatmap-section__hint { opacity: 0.6; }

.dac-heatmap-section__chevron {
  flex-shrink:   0;
  width:         1.75rem;
  height:        1.75rem;
  display:       flex;
  align-items:     center;
  justify-content: center;
  border-radius: 50%;
  border:        1px solid var(--border-mid);
  font-size:     0.65rem;
  color:         var(--text-2);
}

.dac-heatmap-panel {
  display:            grid;
  grid-template-rows: 1fr;
  transition:         grid-template-rows 0.38s var(--ease-out), opacity 0.28s;
  opacity:            1;
}

.dac-heatmap-panel--collapsed {
  grid-template-rows: 0fr;
  opacity:            0;
  pointer-events:     none;
}

.dac-heatmap-panel__inner {
  overflow:   hidden;
  min-height: 0;
  padding:    0 var(--sp-3) var(--sp-3);
}

.dac-heatmap-toolbar {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--sp-2);
  flex-wrap:       wrap;
  margin-bottom:   var(--sp-2);
}

.dac-heatmap-nav {
  display:     flex;
  align-items: center;
  gap:         0.35rem;
}

.dac-heatmap-nav__btn {
  width:         1.85rem;
  height:        1.85rem;
  border-radius: 6px;
  border:        1px solid var(--border-mid);
  background:    rgba(8, 8, 8, 0.4);
  color:         var(--text-1);
  font-size:     1rem;
  cursor:        pointer;
}

.dac-heatmap-nav__btn:hover {
  border-color: rgba(83, 102, 74, 0.45);
  color:        var(--gold-light);
}

.dac-heatmap-nav__btn:disabled {
  opacity:        0.35;
  cursor:         not-allowed;
  pointer-events: none;
}

.dac-heatmap-nav__year {
  min-width:      3.5rem;
  text-align:     center;
  font-family:    var(--font-mono);
  font-size:      0.85rem;
  letter-spacing: 0.06em;
  color:          var(--gold-light);
}

.dac-heatmap-legend {
  display:     flex;
  flex-wrap:   wrap;
  gap:         0.55rem;
  font-family: var(--font-mono);
  font-size:   0.58rem;
  color:       var(--text-3);
}

.dac-heatmap-legend__item {
  display:     flex;
  align-items: center;
  gap:         0.3rem;
}

.dac-heatmap-legend__swatch {
  width:         10px;
  height:        10px;
  border-radius: 2px;
  border:        1px solid var(--border-mid);
}

.dac-heatmap-legend__swatch--0 { background: rgba(245, 237, 224, 0.04); }
.dac-heatmap-legend__swatch--1 { background: rgba(83, 102, 74, 0.55); border-color: rgba(83, 102, 74, 0.5); }
.dac-heatmap-legend__swatch--2 { background: rgba(83, 102, 74, 0.95); box-shadow: 0 0 6px rgba(83, 102, 74, 0.5); }

.dac-heatmap-grid-wrap {
  --dac-heatmap-cell: 14px;
  --dac-heatmap-gap:  3px;

  overflow-x:                 auto;
  overflow-y:                 hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width:            thin;
  scrollbar-color:            rgba(83, 102, 74, 0.4) transparent;
  padding:                    0.35rem 0 0.5rem;
}

@media (min-width: 640px) {
  .dac-heatmap-grid-wrap {
    --dac-heatmap-cell: 16px;
    --dac-heatmap-gap:  4px;
  }
}

@media (min-width: 900px) {
  .dac-heatmap-grid-wrap {
    --dac-heatmap-cell: 18px;
    --dac-heatmap-gap:  4px;
  }
}

.dac-heatmap-grid {
  display:         flex;
  flex-direction:  row;
  flex-wrap:       nowrap;
  align-items:     flex-end;
  width:           max-content;
  min-width:       min(100%, max-content);
}

.dac-heatmap-grid[hidden] {
  display: none !important;
}

.dac-heatmap-month {
  display:        flex;
  flex-direction: column;
  align-items:    stretch;
  flex-shrink:    0;
  padding:        0 14px;
  border-left:    1px solid rgba(245, 237, 224, 0.1);
}

.dac-heatmap-month:first-child {
  padding-left: 0;
  border-left:  none;
}

.dac-heatmap-month__title {
  font-family:    var(--font-mono);
  font-size:      0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--text-3);
  margin-bottom:  8px;
  text-align:     center;
  white-space:    nowrap;
}

.dac-heatmap-month__weeks {
  display:        flex;
  flex-direction: row;
  gap:            var(--dac-heatmap-gap);
}

.dac-heatmap-week {
  display:               grid;
  grid-template-rows:    repeat(7, var(--dac-heatmap-cell));
  grid-template-columns: var(--dac-heatmap-cell);
  gap:                   var(--dac-heatmap-gap);
}

.dac-heatmap-cell {
  width:         var(--dac-heatmap-cell);
  height:        var(--dac-heatmap-cell);
  box-sizing:    border-box;
  border-radius: 2px;
  background:    rgba(245, 237, 224, 0.05);
  border:        1px solid rgba(245, 237, 224, 0.06);
  flex-shrink:   0;
}

.dac-heatmap-cell--pad {
  visibility:   hidden;
  background:   transparent;
  border-color: transparent;
}

.dac-heatmap-cell--future {
  opacity: 0.28;
}

.dac-heatmap-cell--today {
  outline:        1px solid rgba(245, 237, 224, 0.45);
  outline-offset: 1px;
}

.dac-heatmap-cell--1 {
  background:   rgba(83, 102, 74, 0.58);
  border-color: rgba(83, 102, 74, 0.5);
}

.dac-heatmap-cell--2 {
  background:   rgba(83, 102, 74, 0.95);
  border-color: rgba(83, 102, 74, 0.75);
  box-shadow:   0 0 6px rgba(83, 102, 74, 0.45);
}

@keyframes dacHeatmapCelebrate {
  0%   { transform: scale(1); box-shadow: 0 0 0 rgba(83, 102, 74, 0); }
  40%  { transform: scale(1.35); box-shadow: 0 0 10px rgba(83, 102, 74, 0.85); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(83, 102, 74, 0); }
}

.dac-heatmap-cell--celebrate {
  z-index:   2;
  position:  relative;
  animation: dacHeatmapCelebrate 0.75s var(--ease-out) both;
}

.dac-heatmap-empty {
  margin:      0;
  padding:     var(--sp-2) 0 0;
  font-family: var(--font-body);
  font-size:   0.8rem;
  font-style:  italic;
  color:       var(--text-3);
  text-align:  center;
}

.dac-timeline-section__head {
  display:         flex;
  align-items:     flex-end;
  justify-content: space-between;
  gap:             var(--sp-2);
  flex-wrap:       wrap;
  margin-bottom:   var(--sp-2);
  padding-bottom:  var(--sp-2);
  border-bottom:   1px solid rgba(245, 237, 224, 0.07);
}

.dac-timeline-section__head .section-header {
  margin-bottom: 0;
}

.dac-timeline-section__hint {
  font-family: var(--font-mono);
  font-size:   0.62rem;
  letter-spacing: 0.06em;
  color:       var(--text-3);
  white-space: nowrap;
}

.dac-timeline {
  position: relative;
}

.dac-timeline__rail {
  position:      relative;
  border-radius: var(--radius-lg);
  border:        1px solid rgba(83, 102, 74, 0.22);
  background:
    radial-gradient(ellipse 90% 70% at 50% 50%, rgba(83, 102, 74, 0.07), transparent 62%),
    linear-gradient(180deg, rgba(14, 12, 10, 0.92) 0%, rgba(8, 7, 6, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(245, 237, 224, 0.04);
  overflow:      hidden;
}

.dac-timeline__fade {
  position:   absolute;
  top:        0;
  bottom:     0;
  width:      clamp(28px, 8vw, 52px);
  z-index:    3;
  pointer-events: none;
}

.dac-timeline__fade--left {
  left: 0;
  background: linear-gradient(90deg, rgba(8, 7, 6, 0.95), transparent);
}

.dac-timeline__fade--right {
  right: 0;
  background: linear-gradient(270deg, rgba(8, 7, 6, 0.95), transparent);
}

.dac-timeline__track {
  --tl-lane-h:  clamp(108px, 16vh, 158px);
  --tl-spine-h: 1.5rem;

  overflow-x:   auto;
  overflow-y:   visible;
  padding:      var(--sp-3);
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--sp-3);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(83, 102, 74, 0.45) transparent;
}

.dac-timeline__track-inner {
  position:       relative;
  display:        flex;
  flex-direction: row;
  align-items:    stretch;
  gap:            var(--sp-3);
  width:          max-content;
  min-width:      100%;
  padding-inline: 0 var(--sp-4);
}

.dac-timeline__track-inner::before {
  content:    '';
  position:   absolute;
  left:       0;
  right:      0;
  top:        50%;
  height:     2px;
  transform:  translateY(-50%);
  background: linear-gradient(
    90deg,
    rgba(83, 102, 74, 0.08) 0%,
    rgba(83, 102, 74, 0.5) 6%,
    rgba(83, 102, 74, 0.5) 94%,
    rgba(83, 102, 74, 0.08) 100%
  );
  border-radius: 2px;
  pointer-events: none;
}

.dac-timeline__track-inner::after {
  content:    '';
  position:   absolute;
  left:       0;
  right:      0;
  top:        50%;
  height:     8px;
  transform:  translateY(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(83, 102, 74, 0.06) 15%,
    rgba(83, 102, 74, 0.06) 85%,
    transparent
  );
  filter: blur(4px);
  pointer-events: none;
}

.dac-timeline__year-stamp {
  flex:           0 0 auto;
  display:        grid;
  grid-template-rows: 1fr var(--tl-spine-h) 1fr;
  align-items:    center;
  justify-items:  center;
  align-self:     stretch;
  min-height:     calc(var(--tl-lane-h) * 2 + var(--tl-spine-h));
  padding-inline: 0.25rem;
  scroll-snap-align: start;
}

.dac-timeline__year-label {
  grid-row:       2;
  z-index:        2;
  font-family:    var(--font-mono);
  font-size:      0.62rem;
  font-weight:    700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--gold-light);
  padding:        0.28rem 0.55rem;
  border-radius:  100px;
  border:         1px solid rgba(83, 102, 74, 0.45);
  background:     rgba(12, 10, 8, 0.92);
  box-shadow:     0 0 12px rgba(83, 102, 74, 0.18);
  white-space:    nowrap;
}

.dac-timeline__year-node {
  grid-row:      2;
  width:         16px;
  height:        16px;
  border-radius: 50%;
  background:    var(--brand);
  border:        2px solid rgba(12, 10, 8, 0.95);
  box-shadow:
    0 0 0 2px rgba(83, 102, 74, 0.4),
    0 0 14px rgba(83, 102, 74, 0.35);
  z-index:       1;
}

.dac-timeline__spine {
  display:         flex;
  align-items:     center;
  justify-content: center;
  height:          var(--tl-spine-h);
  flex-shrink:     0;
  position:        relative;
  z-index:         2;
}

.dac-timeline__entry {
  position:      relative;
  flex:          0 0 clamp(210px, 38vw, 260px);
  display:       grid;
  grid-template-rows: minmax(var(--tl-lane-h), auto) var(--tl-spine-h) minmax(var(--tl-lane-h), auto);
  align-items:   stretch;
  align-self:    stretch;
  min-height:    calc(var(--tl-lane-h) * 2 + var(--tl-spine-h));
  scroll-snap-align: start;
  animation:     cardIn 0.4s var(--ease-out) both;
}

.dac-timeline__entry--above .dac-timeline__content {
  grid-row:       1;
  align-self:     end;
  padding-bottom: 0.5rem;
}

.dac-timeline__entry--above .dac-timeline__spine { grid-row: 2; }

.dac-timeline__entry--below .dac-timeline__spine { grid-row: 2; }

.dac-timeline__entry--below .dac-timeline__content {
  grid-row:    3;
  align-self:  start;
  padding-top: 0.5rem;
}

.dac-timeline__entry--above .dac-timeline__content::after,
.dac-timeline__entry--below .dac-timeline__content::before {
  content:       '';
  display:       block;
  width:         1px;
  height:        0.75rem;
  margin-inline: auto;
  background:    rgba(83, 102, 74, 0.35);
  border-radius: 1px;
}

.dac-timeline__entry--above .dac-timeline__content::after {
  margin-top: 0.35rem;
}

.dac-timeline__entry--below .dac-timeline__content::before {
  margin-bottom: 0.35rem;
}

.dac-timeline__marker {
  width:         10px;
  height:        10px;
  border-radius: 50%;
  background:    var(--brand-bright);
  border:        2px solid rgba(12, 10, 8, 0.95);
  box-shadow:
    0 0 0 2px rgba(83, 102, 74, 0.35),
    0 0 10px rgba(83, 102, 74, 0.4);
  flex-shrink:   0;
}

.dac-timeline__content {
  display:        flex;
  flex-direction: column;
  align-items:    stretch;
  min-width:      0;
  flex:           1;
}

.dac-timeline__date-pill {
  align-self:     flex-start;
  display:        inline-block;
  max-width:      100%;
  font-family:    var(--font-mono);
  font-size:      0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color:          var(--gold-light);
  padding:        0.22rem 0.5rem;
  margin-bottom:  0.4rem;
  border-radius:  100px;
  border:         1px solid rgba(83, 102, 74, 0.32);
  background:     rgba(83, 102, 74, 0.12);
  white-space:    nowrap;
  overflow:       hidden;
  text-overflow:  ellipsis;
}

.dac-card--timeline {
  width: 100%;
  flex:  1;
  border-radius: var(--radius-md);
  border-color:  rgba(83, 102, 74, 0.32);
  background:
    linear-gradient(165deg, rgba(83, 102, 74, 0.14) 0%, rgba(14, 12, 10, 0.94) 55%);
  box-shadow:
    inset 0 1px 0 rgba(245, 237, 224, 0.05),
    0 6px 18px rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s, background 0.15s, transform 0.2s var(--ease-out);
}

.dac-card--timeline::before {
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
}

.dac-card--timeline .dac-card__actions {
  border-top-color: rgba(83, 102, 74, 0.16);
}

@media (hover: hover) and (pointer: fine) {
  .dac-card--timeline:hover {
    transform:    translateY(-2px);
    border-color: rgba(83, 102, 74, 0.48);
    background:
      linear-gradient(165deg, rgba(83, 102, 74, 0.18) 0%, rgba(14, 12, 10, 0.94) 55%);
  }
}

.dac-timeline .dac-empty {
  padding: var(--sp-5) var(--sp-3);
}

.dac-card {
  position:      relative;
  display:       flex;
  flex-direction: column;
  padding:       var(--sp-2) var(--sp-2) var(--sp-1);
  border-radius: var(--radius-md);
  border:        1px solid var(--border);
  background:    rgba(245, 237, 224, 0.03);
  box-shadow:    inset 0 1px 0 rgba(255, 245, 235, 0.03);
  animation:     cardIn 0.35s var(--ease-out) both;
  transition:    border-color 0.15s, background 0.15s, transform 0.15s;
  overflow:      hidden;
}

.dac-card::before {
  content:    '';
  position:   absolute;
  left:       0;
  top:        0;
  bottom:     0;
  width:      3px;
  background: rgba(245, 237, 224, 0.18);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .dac-card:hover {
    transform:    translateY(-1px);
    border-color: var(--border-mid);
    background:   rgba(245, 237, 224, 0.05);
  }
}

.dac-card--pending {
  border-color: rgba(83, 102, 74, 0.32);
  background:   rgba(83, 102, 74, 0.08);
}

.dac-card--pending::before { background: var(--brand-muted); }

.dac-card--done {
  border-color: rgba(148, 173, 135, 0.32);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 4px,
      rgba(0, 0, 0, 0.04) 4px,
      rgba(0, 0, 0, 0.04) 5px
    ),
    rgba(83, 102, 74, 0.12);
}

.dac-card--done::before { background: var(--gold); }

.dac-card--done .dac-card__title {
  color: var(--text-1);
}

.dac-card--trash {
  border-color: rgba(196, 122, 106, 0.28);
  background:   rgba(196, 122, 106, 0.07);
}

.dac-card--trash::before { background: var(--rose); }

.dac-card--has-description .dac-card__head::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--gold);
  transform: rotate(45deg);
  border: 1px solid rgba(8, 8, 8, 0.85);
}

.dac-card__head {
  position:    relative;
  display:     flex;
  align-items: flex-start;
  gap:         0.35rem;
  margin-bottom: 0.35rem;
}

.dac-star-btn {
  flex-shrink:   0;
  width:         1.65rem;
  height:        1.65rem;
  margin:        0;
  padding:       0;
  border:        1px solid rgba(83, 102, 74, 0.25);
  border-radius: 6px;
  background:    rgba(8, 8, 8, 0.35);
  color:         var(--text-3);
  font-size:     0.85rem;
  line-height:   1;
  cursor:        pointer;
  transition:    color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}

.dac-star-btn:hover {
  color:        var(--gold-light);
  border-color: rgba(83, 102, 74, 0.45);
}

.dac-star-btn--on {
  color:        var(--gold-light);
  border-color: rgba(83, 102, 74, 0.55);
  background:   rgba(83, 102, 74, 0.2);
  text-shadow:  0 0 8px rgba(83, 102, 74, 0.65);
}

.dac-card__grip {
  margin-left: auto;
  padding:     0 0.15rem;
  font-size:   0.85rem;
  line-height: 1;
  color:       var(--text-3);
  opacity:     0.55;
  cursor:      grab;
  user-select: none;
}

.dac-card--draggable .dac-card__grip { opacity: 0.85; }

.dac-card--starred {
  border-color: rgba(83, 102, 74, 0.55) !important;
  box-shadow:
    0 0 0 1px rgba(83, 102, 74, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.35);
}

.dac-card--dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.dac-card--drag-over {
  outline: 2px dashed rgba(83, 102, 74, 0.65);
  outline-offset: 3px;
}

@keyframes dacCompleteFly {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
  35% {
    opacity: 1;
    transform: scale(1.04) translateY(-10px);
    filter: brightness(1.15);
  }
  100% {
    opacity: 0;
    transform: scale(0.78) translate(56px, 28px);
    filter: brightness(1.3);
  }
}

.dac-card--completing {
  position:       relative;
  z-index:        40;
  pointer-events: none;
  animation:      dacCompleteFly 0.85s var(--ease-out) both;
}

.dac-card--completing::after {
  content:    '✓';
  position:   absolute;
  inset:      auto 0.65rem 0.55rem auto;
  font-size:  1.1rem;
  color:      var(--gold-light);
  text-shadow: 0 0 12px rgba(83, 102, 74, 0.8);
  animation:  dacCompleteSpark 0.85s var(--ease-out) both;
}

@keyframes dacCompleteSpark {
  0%   { opacity: 0; transform: scale(0.4); }
  40%  { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(0.9) translateY(-12px); }
}

.dac-card__check {
  width:         17px;
  height:        17px;
  margin:        1px 0 0;
  accent-color:  var(--gold);
  cursor:        pointer;
  border-radius: 2px;
  flex-shrink:   0;
}

.dac-card__body { flex: 1; min-width: 0; }

.dac-card__title {
  font-family: var(--font-body);
  font-size:   0.92rem;
  font-weight: 500;
  line-height: 1.4;
  color:       var(--text-1);
  word-break:  break-word;
  margin-bottom: 0.35rem;
}

.dac-card__desc-preview {
  margin-bottom: 0.35rem;
  font-family:   var(--font-body);
  font-size:     0.72rem;
  font-style:    italic;
  line-height:   1.35;
  color:         var(--text-3);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

.dac-card__date {
  font-family:    var(--font-mono);
  font-size:      0.62rem;
  letter-spacing: 0.05em;
  color:          var(--gold-light);
  opacity:        0.8;
  margin-bottom:  0.25rem;
}

.dac-card__actions {
  display:         flex;
  flex-wrap:       wrap;
  justify-content: flex-end;
  gap:             0.2rem;
  margin-top:      auto;
  padding-top:     0.4rem;
  border-top:      1px solid rgba(0, 0, 0, 0.28);
}

.dac-card--pending .dac-card__actions { border-top-color: rgba(83, 102, 74, 0.18); }
.dac-card--done .dac-card__actions { border-top-color: rgba(83, 102, 74, 0.2); }

.dac-icon-btn {
  width:           32px;
  height:          32px;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  border-radius:   var(--radius-sm);
  background:      rgba(245, 237, 224, 0.04);
  border:          1px solid var(--border);
  color:           var(--text-2);
  font-size:       0.82rem;
  line-height:     1;
  transition:      color 0.12s, background 0.12s, border-color 0.12s;
}

.dac-icon-btn:hover {
  color:        var(--text-1);
  border-color: var(--border-mid);
  background:   rgba(245, 237, 224, 0.07);
}

.dac-icon-btn--danger:hover {
  color:        var(--error);
  background:   var(--error-dim);
  border-color: rgba(196, 74, 74, 0.35);
}

.dac-icon-btn--date { font-size: 0.72rem; letter-spacing: -0.04em; }

.dac-trash-bar {
  display:         flex;
  justify-content: flex-end;
  margin-bottom:   var(--sp-2);
}

.dac-trash-bar__btn {
  padding:        0.4rem 0.9rem;
  border-radius:  var(--radius-sm);
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  letter-spacing: 0.05em;
  background:     var(--error-dim);
  border:         1px solid rgba(196, 74, 74, 0.35);
  color:          #e89292;
  transition:     background 0.15s;
}

.dac-trash-bar__btn:hover { background: rgba(196, 74, 74, 0.22); }

.dac-trash-list {
  overflow: visible;
  scroll-snap-type: none;
  padding:  0.35rem 0.55rem 0.65rem;
}

.dac-empty {
  text-align: center;
  padding:    var(--sp-6) var(--sp-3);
  color:      var(--text-2);
}

.dac-empty__glyph {
  font-size:     2.2rem;
  margin-bottom: var(--sp-2);
  opacity:       0.45;
}

.dac-empty__text {
  font-family: var(--font-display);
  font-style:  italic;
  font-size:   1.05rem;
  color:       var(--text-3);
}

/* =============================================================================
   10. DESCRIPTION MODAL
   ============================================================================= */

.description-modal {
  position: fixed;
  inset: 0;
  z-index: 610;
  display: grid;
  place-items: center;
  padding: 1rem;
  animation: fadeIn 0.2s var(--ease-out) both;
}

.description-modal[hidden] { display: none !important; }

.description-modal__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(24, 20, 14, 0.78), rgba(7, 7, 7, 0.92));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.description-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: min(88vh, 860px);
  padding: var(--sp-4);
  background: var(--surface-1);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 100px rgba(0,0,0,0.72);
  animation: fadeUp 0.25s var(--ease-out) both;
  display: grid;
  grid-template-rows: auto auto minmax(250px, 1fr) auto;
  gap: 0.45rem;
  overflow: hidden;
}

.description-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

.description-modal__header-main { min-width: 0; }

.description-modal__header-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.description-modal__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.7;
  margin-bottom: 0.18rem;
}

.description-modal__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.1;
}

.description-modal__date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  color: var(--text-2);
  margin-top: 0.26rem;
}

.description-modal__status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.description-modal__status,
.description-modal__save-hint {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.description-modal--editing .description-modal__status { color: var(--gold-light); }

.description-modal__editor-shell {
  background: rgba(245,237,224,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  overflow: hidden;
}

.description-modal__textarea {
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: 55vh;
  background: rgba(245,237,224,0.01);
  border: 1px solid rgba(245, 237, 224, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 0.85rem 0.95rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  outline: none;
  resize: none;
  overflow: auto;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.description-modal__textarea:focus {
  border-color: rgba(83, 102, 74, 0.4);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.description-modal__textarea[readonly] {
  color: var(--text-2);
  background: rgba(245, 237, 224, 0.02);
}

.description-modal__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

.description-modal__char-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-3);
}

.description-modal__actions {
  display: flex;
  margin-left: auto;
  gap: var(--sp-1);
}

.description-modal__btn {
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  transition: all 0.14s;
}

.description-modal__btn:active { transform: scale(0.95); }

.description-modal__btn--accent {
  background: rgba(83, 102, 74, 0.12);
  color: var(--gold-light);
  border-color: rgba(83, 102, 74, 0.35);
}

.description-modal__btn--accent:hover { background: rgba(83, 102, 74, 0.2); }

.description-modal__btn--cancel {
  background: rgba(245, 237, 224, 0.03);
  color: var(--text-2);
}

.description-modal__btn--cancel:hover {
  background: rgba(245, 237, 224, 0.09);
  color: var(--text-1);
}

.description-modal__btn--save {
  background: var(--gold-dim);
  border-color: rgba(83, 102, 74, 0.35);
  color: var(--gold-light);
}

.description-modal__btn--save:disabled { opacity: 0.45; cursor: not-allowed; }

.description-modal__btn--save:not(:disabled):hover {
  background: rgba(83, 102, 74, 0.22);
  box-shadow: 0 0 20px rgba(83, 102, 74, 0.12);
}

/* =============================================================================
   11. NOTE MODAL (done-date panel header/actions)
   ============================================================================= */

.note-modal__header { margin-bottom: var(--sp-3); }

.note-modal__eyebrow {
  font-family:    var(--font-mono);
  font-size:      0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color:          var(--gold);
  opacity:        0.7;
  margin-bottom:  0.3rem;
}

.note-modal__title {
  font-family:  var(--font-display);
  font-style:   italic;
  font-size:    1.6rem;
  font-weight:  500;
  color:        var(--text-1);
}

.note-modal__date {
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  letter-spacing: 0.08em;
  color:          var(--text-2);
  margin-top:     0.3rem;
}

.note-modal__actions {
  display:         flex;
  justify-content: flex-end;
  gap:             var(--sp-1);
  margin-top:      var(--sp-2);
}

.note-modal__btn {
  padding:        0.55rem 1.4rem;
  border-radius:  var(--radius-sm);
  font-family:    var(--font-mono);
  font-size:      0.78rem;
  font-weight:    500;
  letter-spacing: 0.05em;
  border:         1px solid transparent;
  transition:     all 0.15s;
}

.note-modal__btn:active { transform: scale(0.95); }

.note-modal__btn--cancel {
  background:   var(--glass);
  border-color: var(--border);
  color:        var(--text-2);
}

.note-modal__btn--cancel:hover {
  background: rgba(245,237,224,0.06);
  color:      var(--text-1);
}

.note-modal__btn--save {
  background:   var(--gold-dim);
  border-color: rgba(83, 102, 74, 0.35);
  color:        var(--gold-light);
}

.note-modal__btn--save:hover {
  background: rgba(83, 102, 74, 0.22);
  box-shadow: 0 0 20px rgba(83, 102, 74, 0.12);
}

/* =============================================================================
   12. DONE-DATE MODAL + PICKER
   ============================================================================= */

.done-date-modal {
  position: fixed;
  inset: 0;
  z-index: 630;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2);
  animation: fadeIn 0.2s var(--ease-out) both;
}

.done-date-modal[hidden] { display: none !important; }

.done-date-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.done-date-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: var(--sp-4);
  background: var(--surface-1);
  border: 1px solid rgba(83, 102, 74, 0.28);
  border-radius: var(--radius-xl);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  animation: fadeUp 0.25s var(--ease-out) both;
}

.done-date-modal__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.done-date-picker {
  --picker-cell: clamp(30px, 9vw, 38px);
  margin-bottom: 0.35rem;
}

.done-date-picker__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: 0.55rem;
}

.done-date-picker__month {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-1);
  text-align: center;
  flex: 1;
  margin: 0;
}

.done-date-picker__nav-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(245, 237, 224, 0.04);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 1rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.done-date-picker__nav-btn:hover:not(:disabled) {
  color: var(--text-1);
  border-color: rgba(83, 102, 74, 0.4);
  background: rgba(83, 102, 74, 0.1);
}

.done-date-picker__nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.done-date-picker__weekdays {
  display: grid;
  grid-template-columns: repeat(7, var(--picker-cell));
  gap: 4px;
  margin-bottom: 4px;
}

.done-date-picker__weekdays span {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-3);
}

.done-date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, var(--picker-cell));
  gap: 4px;
}

.done-date-picker__day {
  width: var(--picker-cell);
  height: var(--picker-cell);
  border-radius: var(--cell-radius);
  border: 1px solid rgba(245, 237, 224, 0.06);
  background: rgba(245, 237, 224, 0.04);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.done-date-picker__day:hover:not(:disabled):not(.done-date-picker__day--pad) {
  border-color: var(--border-mid);
  background: rgba(245, 237, 224, 0.08);
  color: var(--text-1);
}

.done-date-picker__day--pad { visibility: hidden; pointer-events: none; }
.done-date-picker__day--future { opacity: 0.22; cursor: not-allowed; }
.done-date-picker__day--today { outline: 1px solid rgba(245, 237, 224, 0.45); outline-offset: 1px; }

.done-date-picker__day--selected {
  background: linear-gradient(145deg, rgba(83, 102, 74, 0.55), rgba(83, 102, 74, 0.32));
  border-color: rgba(148, 173, 135, 0.75);
  color: var(--text-1);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(83, 102, 74, 0.35);
}

.done-date-picker__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: 0.55rem;
}

.done-date-picker__today {
  padding: 0.28rem 0.65rem;
  border-radius: 100px;
  border: 1px solid rgba(83, 102, 74, 0.35);
  background: rgba(83, 102, 74, 0.12);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.done-date-picker__today:hover {
  background: rgba(83, 102, 74, 0.22);
}

.done-date-picker__selection {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-2);
  margin: 0;
  text-align: right;
  flex: 1;
}

/* =============================================================================
   13. IO SECTION
   ============================================================================= */

.io-section {
  margin-top:    var(--sp-4);
  padding-top:   var(--sp-4);
  border-top:    1px solid var(--border);
  padding-bottom: var(--sp-6);
}

.io-header { margin-bottom: var(--sp-2); }

.io-eyebrow {
  font-family:    var(--font-mono);
  font-size:      0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--gold);
  opacity:        0.6;
  margin-bottom:  0.3rem;
}

.io-title {
  font-family: var(--font-display);
  font-style:  italic;
  font-size:   clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 500;
  color:       var(--text-1);
  margin-bottom: 0.3rem;
}

.io-desc {
  font-size:  0.78rem;
  color:      var(--text-2);
  font-style: italic;
}

.io-buttons {
  display:       flex;
  gap:           var(--sp-2);
  flex-wrap:     wrap;
  margin-top:    var(--sp-2);
  margin-bottom: var(--sp-1);
}

.io-btn {
  display:        flex;
  align-items:    center;
  gap:            0.5rem;
  padding:        0.55rem 1.3rem;
  border-radius:  var(--radius-sm);
  font-family:    var(--font-mono);
  font-size:      0.78rem;
  font-weight:    500;
  letter-spacing: 0.05em;
  border:         1px solid transparent;
  transition:     all 0.15s;
}

.io-btn:active { transform: scale(0.95); }
.io-btn__icon { font-size: 1rem; line-height: 1; }

.io-btn--export {
  background:   var(--sage-dim);
  border-color: rgba(107, 158, 122, 0.3);
  color:        var(--sage-light);
}

.io-btn--export:hover {
  background: rgba(107, 158, 122, 0.22);
  box-shadow: 0 0 20px rgba(107, 158, 122, 0.1);
}

.io-btn--import {
  background:   rgba(245,237,224,0.05);
  border-color: var(--border-mid);
  color:        var(--text-2);
}

.io-btn--import:hover {
  background: rgba(245,237,224,0.08);
  color:      var(--text-1);
}

.io-btn--sync {
  background:   rgba(83, 102, 74, 0.12);
  border-color: rgba(83, 102, 74, 0.35);
  color:        var(--violet-light);
}

.io-btn--sync:hover {
  background: rgba(83, 102, 74, 0.22);
  box-shadow: 0 0 20px rgba(83, 102, 74, 0.12);
}

.io-btn--sync:disabled { opacity: 0.5; cursor: not-allowed; }

.io-btn--sync.is-syncing .io-btn__icon {
  display: inline-block;
  animation: spin 1s linear infinite;
}

.io-note {
  font-size:  0.7rem;
  color:      var(--text-3);
  font-style: italic;
  line-height: 1.45;
}

/* =============================================================================
   14. NOTIFY – TOAST + UNDO
   ============================================================================= */

.notify { box-sizing: border-box; }

.notify__glyph {
  flex-shrink:     0;
  width:           2rem;
  height:          2rem;
  border-radius:   50%;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  font-family:     var(--font-mono);
  font-weight:     700;
  font-size:       0.88rem;
  line-height:     1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 14px rgba(0, 0, 0, 0.35);
}

.notify__text {
  margin:      0;
  font-family: var(--font-body);
  font-size:   0.86rem;
  line-height: 1.45;
  color:       var(--text-1);
  font-weight: 500;
}

.notify__text--compact {
  flex:        1;
  min-width:   0;
  font-family: var(--font-mono);
  font-size:   0.72rem;
  color:       var(--text-2);
  font-weight: 500;
  letter-spacing: 0.035em;
}

.notify__btn {
  flex-shrink:    0;
  cursor:         pointer;
  border:         1px solid var(--border-mid);
  border-radius:  999px;
  font-family:    var(--font-mono);
  font-size:      0.65rem;
  font-weight:    600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding:        0.45rem 0.95rem;
  transition:     background 0.2s, border-color 0.2s, color 0.2s;
}

.notify__btn--amber {
  border-color: rgba(83, 102, 74, 0.42);
  background:   linear-gradient(165deg, rgba(83, 102, 74, 0.32) 0%, rgba(83, 102, 74, 0.12) 100%);
  color:        var(--gold-light);
}

.notify__btn--amber:hover {
  background:   rgba(83, 102, 74, 0.38);
  border-color: rgba(83, 102, 74, 0.55);
}

.notify--toast {
  position:       fixed;
  left:           50%;
  bottom:         max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index:        10100;
  display:        flex;
  align-items:    center;
  gap:            0.75rem;
  max-width:      min(22rem, calc(100vw - 1.5rem));
  padding:        0.75rem 1.1rem 0.75rem 0.85rem;
  border-radius:  var(--radius-lg);
  border:         1px solid var(--notify-toast-border, rgba(245, 237, 224, 0.12));
  background:     var(--notify-toast-bg, rgba(16, 13, 11, 0.88));
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 245, 235, 0.06);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  opacity:        0;
  visibility:     hidden;
  transform:      translateX(-50%) translateY(18px) scale(0.96);
  transition:     opacity 0.32s, transform 0.38s, visibility 0.32s;
  pointer-events: none;
}

.notify--toast[hidden] { display: none !important; }

.notify--toast.notify--visible {
  opacity:    1;
  visibility: visible;
  transform:  translateX(-50%) translateY(0) scale(1);
}

.notify--toast.notify--success {
  --notify-toast-border: rgba(107, 158, 122, 0.28);
  --notify-toast-bg: linear-gradient(145deg, rgba(107, 158, 122, 0.14) 0%, rgba(14, 12, 10, 0.92) 46%);
}

.notify--toast.notify--success .notify__glyph {
  background: var(--sage-dim);
  color:      var(--sage-light);
  border:     1px solid rgba(107, 158, 122, 0.45);
}

.notify--toast.notify--error {
  --notify-toast-border: rgba(196, 74, 74, 0.35);
  --notify-toast-bg: linear-gradient(145deg, rgba(196, 74, 74, 0.16) 0%, rgba(14, 12, 10, 0.94) 50%);
}

.notify--toast.notify--error .notify__glyph {
  background: var(--error-dim);
  color:      #f0a0a0;
  border:     1px solid rgba(196, 74, 74, 0.45);
}

.notify--undo {
  position:       fixed;
  bottom:         72px;
  left:           16px;
  z-index:        10120;
  display:        flex;
  align-items:    center;
  gap:            0.62rem;
  max-width:      min(340px, calc(100vw - 1.75rem));
  padding:        8px 10px;
  border-radius:  var(--radius-lg);
  pointer-events: auto;
  border:         1px solid rgba(83, 102, 74, 0.32);
  background: linear-gradient(150deg, rgba(83, 102, 74, 0.2) 0%, rgba(14, 12, 10, 0.94) 48%);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  opacity:        0;
  visibility:     hidden;
  transform:      translateY(16px);
  transition:     opacity 0.3s, transform 0.34s, visibility 0.3s;
}

.notify--undo[hidden] { display: none !important; }

.notify--undo.notify--visible {
  opacity:    1;
  visibility: visible;
  transform:  translateY(0);
}

.notify--undo .notify__glyph {
  width:      1.75rem;
  height:     1.75rem;
  font-size:  0.8rem;
  background: var(--gold-dim);
  border:     1px solid rgba(83, 102, 74, 0.45);
  color:      var(--gold-light);
}

/* =============================================================================
   15. SYNC INDICATOR
   ============================================================================= */

.sync-indicator {
  position: fixed;
  bottom: 72px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 7px 12px 7px 8px;
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.036em;
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(245, 237, 224, 0.12);
  background: rgba(14, 12, 10, 0.82);
  color: var(--text-2);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.5);
  z-index: 10110;
  max-width: min(280px, calc(100vw - 2rem));
  pointer-events: none;
  user-select: none;
  transition: opacity 0.32s, transform 0.32s, background 0.32s, border-color 0.32s;
}

.sync-indicator__status-wrap { overflow: hidden; max-height: 2rem; }

.sync-indicator__main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sync-indicator__saved {
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: rgba(245, 237, 224, 0.42);
  padding-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sync-indicator--synced {
  background: linear-gradient(145deg, rgba(107, 158, 122, 0.16) 0%, rgba(14, 12, 10, 0.88) 55%);
  border-color: rgba(107, 158, 122, 0.32);
  color: var(--sage-light);
  animation: sync-box-compact 2.6s var(--ease-out) forwards 1.35s;
}

.sync-indicator--synced .sync-indicator__status-wrap {
  animation: sync-status-collapse 2.6s var(--ease-out) forwards 1.35s;
}

.sync-indicator--synced .sync-indicator__saved { color: rgba(142, 193, 158, 0.72); }

.sync-indicator--synced .sync-indicator__icon {
  background: var(--sage-dim);
  color: var(--sage-light);
  border: 1px solid rgba(107, 158, 122, 0.35);
}

.sync-indicator--syncing {
  background: linear-gradient(145deg, rgba(83, 102, 74, 0.18) 0%, rgba(14, 12, 10, 0.9) 50%);
  border-color: rgba(83, 102, 74, 0.35);
  color: var(--gold-light);
}

.sync-indicator--syncing .sync-indicator__icon {
  background: var(--gold-dim);
  color: var(--gold-light);
  border: 1px solid rgba(83, 102, 74, 0.35);
  animation: spin 1.2s linear infinite;
}

.sync-indicator--offline {
  background: rgba(12, 10, 9, 0.75);
  border-color: rgba(245, 237, 224, 0.08);
  color: rgba(245, 237, 224, 0.38);
}

.sync-indicator--offline .sync-indicator__icon { opacity: 0.42; }

.sync-indicator--error {
  background: linear-gradient(145deg, rgba(196, 74, 74, 0.22) 0%, rgba(16, 10, 10, 0.9) 50%);
  border-color: rgba(196, 74, 74, 0.42);
  color: #ea9a9a;
}

.sync-indicator--error .sync-indicator__icon {
  background: var(--error-dim);
  border: 1px solid rgba(196, 74, 74, 0.4);
}

.sync-indicator__icon {
  flex-shrink: 0;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.56rem;
  height: 1.56rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sync-indicator__text { min-width: 0; }

/* =============================================================================
   16. FOOTER
   ============================================================================= */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding:    var(--sp-3);
}

.site-footer__inner {
  max-width:       900px;
  margin-inline:   auto;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding-inline:  var(--sp-3);
}

.site-footer__text {
  font-family:    var(--font-display);
  font-style:     italic;
  font-size:      0.85rem;
  color:          var(--text-3);
  letter-spacing: 0.02em;
}

.site-footer__version {
  font-family:    var(--font-mono);
  font-size:      0.6rem;
  letter-spacing: 0.12em;
  color:          var(--text-3);
  text-transform: uppercase;
}

/* =============================================================================
   17. RESZPONZÍV
   ============================================================================= */

@media (min-width: 600px) {
  .pin-card { padding: var(--sp-6) var(--sp-5); }
  .pin-key  { aspect-ratio: 1.15; }
}

@media (min-width: 900px) {
  .site-header__inner,
  .dac-main,
  .site-footer__inner { padding-inline: var(--sp-4); }
}

@media (max-width: 768px) {
  body {
    padding-inline: calc(var(--sp-1) + env(safe-area-inset-left, 0px))
      calc(var(--sp-1) + env(safe-area-inset-right, 0px));
  }

  .site-header__inner {
    flex-direction: column;
    align-items:    stretch;
    gap:            var(--sp-2);
    padding-top:    calc(var(--sp-2) + env(safe-area-inset-top, 0px));
    padding-inline: clamp(14px, 4.2vw, 22px);
  }

  .site-header__right {
    display:               grid;
    grid-template-columns: 1fr;
    width:                 100%;
  }

  .dac-progress-wrap {
    width:      100%;
    max-width:  none;
    align-items: stretch;
  }

  .dac-progress-track { min-width: 0; }

  .legend {
    flex-direction: column;
    align-items:    stretch;
    gap:            var(--sp-2);
  }

  .legend__items {
    display:               grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap:            var(--sp-3);
    row-gap:               var(--sp-2);
  }

  .legend__hint {
    width:       100%;
    padding-top: var(--sp-2);
    border-top:  1px solid var(--border);
    font-size:   0.68rem;
    line-height: 1.45;
  }

  .dac-filter {
    flex-wrap:      nowrap;
    overflow-x:     auto;
    margin-inline:  calc(-1 * clamp(14px, 4.2vw, 22px));
    padding-inline: clamp(14px, 4.2vw, 22px);
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .dac-filter::-webkit-scrollbar { display: none; }

  .dac-filter__btn {
    flex-shrink: 0;
    min-height:  36px;
  }

  .dac-add { flex-direction: column; }

  .dac-add__btn,
  .dac-add__done-label,
  .dac-add__date-btn { width: 100%; justify-content: center; }

  .dac-pending-toolbar {
    flex-direction: column;
    align-items:    stretch;
  }

  .dac-pending-view {
    width: 100%;
    justify-content: center;
  }

  .dac-pending-view__btn {
    flex: 1;
  }

  .dac-pending-list--grid {
    grid-template-columns: 1fr;
  }

  .dac-pending-list .dac-card {
    flex-basis: min(88vw, 260px);
  }

  .dac-timeline-section__head {
    flex-direction: column;
    align-items:    flex-start;
  }

  .dac-timeline-section__hint {
    white-space: normal;
  }

  .dac-timeline__track {
    padding: var(--sp-2);
    scroll-padding-inline: var(--sp-2);
  }

  .dac-timeline__track-inner {
    padding-inline-end: var(--sp-3);
  }

  .dac-timeline__entry {
    flex-basis: clamp(200px, 78vw, 250px);
  }

  .io-section {
    padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  }

  .io-buttons {
    flex-direction: column;
    align-items:    stretch;
  }

  .io-btn {
    width:           100%;
    justify-content: center;
    min-height:      46px;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items:    flex-start;
    gap:            var(--sp-1);
    padding-bottom: calc(var(--sp-1) + env(safe-area-inset-bottom, 0px));
  }

  .pin-overlay {
    padding: calc(var(--sp-2) + env(safe-area-inset-top, 0px)) var(--sp-2)
      calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  }

  .pin-card {
    max-width: min(380px, 100%);
    width:     100%;
  }

  .description-modal { padding: 0.35rem; }

  .description-modal__panel {
    max-height: 92vh;
    padding:    0.75rem;
    grid-template-rows: auto auto minmax(170px, 1fr) auto;
  }

  .description-modal__header { flex-direction: column; }

  .description-modal__footer {
    flex-direction: column;
    align-items:    stretch;
  }

  .description-modal__actions {
    width:       100%;
    margin-left: 0;
  }

  .description-modal__actions .description-modal__btn { flex: 1; }

  .sync-indicator {
    bottom: max(52px, env(safe-area-inset-bottom, 0px));
    right:  12px;
    font-size: 0.62rem;
  }

  .notify--undo {
    bottom: max(52px, env(safe-area-inset-bottom, 0px));
    left:   12px;
  }

  .notify--toast {
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .legend__items { grid-template-columns: 1fr; }

  .stats-ribbon { grid-template-columns: 1fr; }

  .done-date-modal__panel { padding: var(--sp-3); }

  .note-modal__actions { flex-direction: column; }

  .note-modal__btn { width: 100%; text-align: center; }
}

/* =============================================================================
   18. PREFERS-REDUCED-MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ambient-blob { animation: none !important; }

  .sync-indicator--synced {
    gap: 0;
    padding: 5px 10px 5px 8px;
  }

  .sync-indicator--synced .sync-indicator__status-wrap {
    max-height: 0;
    opacity: 0;
  }
}
