/* ────────────────────────────────────────────
   Yumekai · Yume — visual system
   matches yumekai.hu garden palette
   ──────────────────────────────────────────── */

:root{
  --cream: #faf4e6;
  --cream-2: #f4ecd8;
  --paper: #fdf9ef;
  --sky-1: #d9ecf2;
  --sky-2: #f7e6df;
  --sage: #9cb38a;
  --sage-deep: #5d7a4f;
  --sakura: #f0b8be;
  --sakura-deep: #c97683;
  --lavender: #c8bcdc;
  --lavender-deep: #8676a9;
  --sun: #f5c66f;
  --ink: #3a3530;
  --ink-soft: #6b625a;
  --ink-faint: #a89e93;
  --line: #c5b8a5;
  --line-soft: rgba(197, 184, 165, 0.4);
  --shadow: 0 8px 24px -10px rgba(58, 53, 48, 0.18), 0 2px 6px -2px rgba(58, 53, 48, 0.08);
  --shadow-lift: 0 14px 28px -16px rgba(58, 53, 48, 0.25), 0 3px 8px -3px rgba(58, 53, 48, 0.1);
  --radius: 18px;
  --radius-sm: 10px;
}

*{ box-sizing: border-box; margin: 0; padding: 0; }
html, body{ height: 100%; }
body{
  font-family: 'Zen Maru Gothic', 'Klee One', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--sky-1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, var(--sky-2) 0%, transparent 60%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before{
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(180, 150, 100, 0.04) 0px, transparent 2px),
    radial-gradient(circle at 70% 80%, rgba(180, 150, 100, 0.04) 0px, transparent 2px),
    radial-gradient(circle at 40% 60%, rgba(180, 150, 100, 0.03) 0px, transparent 1px);
  background-size: 7px 7px, 11px 11px, 13px 13px;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}
button{ font-family: inherit; cursor: pointer; }
input, textarea{ font-family: inherit; color: inherit; }

/* ─── floating clouds ─── */
.cloud{
  position: fixed;
  background: white; border-radius: 999px;
  opacity: 0.5; z-index: 1;
  filter: blur(2px);
  pointer-events: none;
}
.cloud::before, .cloud::after{
  content:''; position: absolute; background: white; border-radius: 999px;
}
.cl-1{ top: 80px; left: -20px; width: 180px; height: 50px; animation: drift 60s linear infinite; }
.cl-1::before{ width: 80px; height: 80px; left: 30px; top: -30px; }
.cl-1::after{ width: 60px; height: 60px; right: 30px; top: -20px; }
.cl-2{ top: 60%; right: -40px; width: 140px; height: 40px; animation: drift 80s linear infinite reverse; opacity: 0.4; }
.cl-2::before{ width: 60px; height: 60px; left: 20px; top: -25px; }
.cl-2::after{ width: 50px; height: 50px; right: 20px; top: -15px; }
@keyframes drift{
  0%{ transform: translateX(0); } 50%{ transform: translateX(60px); } 100%{ transform: translateX(0); }
}

/* ─── app shell ─── */
.app{
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  min-height: 100vh;
  position: relative; z-index: 2;
}
aside{
  border-right: 1px dashed var(--line);
  padding: 24px 18px;
  display: flex; flex-direction: column;
  gap: 8px;
  background: rgba(253, 249, 239, 0.5);
  backdrop-filter: blur(8px);
}
.brand{
  display: flex; align-items: baseline; gap: 8px;
  font-family: 'Klee One'; font-weight: 600; font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 10px 18px;
}
.brand .dot{
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--sakura);
  box-shadow: 0 0 0 3px rgba(240, 184, 190, 0.25);
  align-self: center;
}
.brand .jp{ font-size: 14px; color: var(--sage-deep); margin-left: 2px; }
.brand .app-tag{
  font-family: 'DM Mono'; font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-soft);
  background: var(--cream-2); padding: 2px 6px; border-radius: 4px;
  margin-left: auto; align-self: center;
}

.nav-tab{
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 0; background: transparent;
  text-align: left; width: 100%;
  font-family: 'Klee One'; font-size: 15px;
  color: var(--ink-soft);
  transition: all .15s;
}
.nav-tab:hover{ background: rgba(156, 179, 138, 0.1); color: var(--ink); }
.nav-tab.active{
  background: var(--sage-deep); color: var(--cream);
  box-shadow: 0 4px 12px -4px rgba(93, 122, 79, 0.4);
}
.nav-tab .ico{ width: 22px; text-align: center; font-size: 16px; }
.nav-tab .count{
  margin-left: auto;
  font-family: 'DM Mono'; font-size: 10px;
  background: rgba(255,255,255,0.15);
  padding: 2px 6px; border-radius: 999px;
}
.nav-tab:not(.active) .count{
  background: var(--cream-2); color: var(--ink-soft);
}

.aside-foot{ margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.lang-toggle{
  display: flex; align-items: center; gap: 0;
  font-family: 'DM Mono'; font-size: 11px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper);
  align-self: flex-start;
}
.lang-toggle button{
  border: 0; background: transparent;
  padding: 4px 12px; border-radius: 999px;
  font-family: inherit; font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  transition: all .2s;
}
.lang-toggle button.active{ background: var(--sage); color: white; }

.promnet-badge{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-family: 'Klee One'; font-size: 12px;
  color: var(--ink-soft);
  transition: all .2s;
}
.promnet-badge:hover{ border-color: var(--sage); color: var(--sage-deep); transform: translateY(-1px); }
.promnet-badge strong{ color: var(--ink); font-weight: 600; }

/* ─── main ─── */
main{ padding: 32px 40px 80px; max-width: 920px; }
.view{ display: none; animation: fadeIn .35s ease; }
.view.active{ display: block; }
@keyframes fadeIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}

.view-head{ margin-bottom: 28px; }
.greeting{
  font-family: 'DM Mono'; font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 8px;
  display: inline-flex; gap: 10px; align-items: center;
}
.greeting::before{ content: ''; width: 24px; height: 1px; background: var(--sage); }
.view-title{
  font-family: 'Klee One'; font-weight: 600;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  margin-bottom: 6px;
}
.view-title .accent{
  color: var(--sakura-deep); position: relative; display: inline-block;
}
.view-title .accent::after{
  content: ''; position: absolute; left: -3%; right: -3%; bottom: 8%;
  height: 18%; background: var(--sakura); opacity: 0.3; z-index: -1;
  border-radius: 999px; transform: rotate(-1deg);
}
.view-sub{
  font-family: 'Klee One'; font-size: 17px;
  color: var(--ink-soft);
  max-width: 540px; text-wrap: pretty;
}

/* ─── write card ─── */
.write-card{
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-top: 28px;
  position: relative;
}
.write-card::before{
  content: ''; position: absolute; top: -8px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 80px; height: 22px;
  background: linear-gradient(90deg, rgba(240,184,190,0.7), rgba(240,184,190,0.5));
  border-left: 1px dashed rgba(255,255,255,0.5);
  border-right: 1px dashed rgba(255,255,255,0.5);
}
.write-row{ display: flex; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.write-title{
  flex: 1; min-width: 200px;
  border: 0; border-bottom: 1.5px dashed var(--line);
  background: transparent;
  font-family: 'Klee One'; font-weight: 600; font-size: 22px;
  padding: 6px 2px;
  outline: none;
  color: var(--ink);
}
.write-title:focus{ border-bottom-color: var(--sakura); }
.write-title::placeholder{ color: var(--ink-faint); font-weight: 400; font-style: italic; }
.date-pill{
  font-family: 'DM Mono'; font-size: 11px;
  color: var(--ink-soft);
  background: var(--cream-2);
  padding: 6px 12px; border-radius: 999px;
  letter-spacing: 0.08em;
}
.lucid-toggle{
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer; user-select: none;
}
.lucid-toggle input{ accent-color: var(--sage-deep); }

.write-text{
  width: 100%;
  min-height: 180px;
  border: 0;
  background: transparent;
  font-family: 'Klee One'; font-size: 17px;
  line-height: 1.7;
  outline: none;
  resize: vertical;
  color: var(--ink);
  padding: 8px 0;
}
.write-text::placeholder{ color: var(--ink-faint); font-style: italic; }

.mood-picker{
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 16px 0;
}
.mood-chip{
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line);
  background: transparent;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft);
  transition: all .15s;
}
.mood-chip:hover{ border-color: var(--sage); }
.mood-chip.active{
  color: var(--ink);
  border-color: transparent;
  box-shadow: inset 0 0 0 2px var(--mood-color, var(--sage));
  background: color-mix(in oklab, var(--mood-color, var(--sage)) 18%, white);
}
.mood-chip .emoji{ font-size: 16px; }

.tag-row{
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px dashed var(--line-soft);
  margin-top: 12px;
}
.tag-row .label{
  font-family: 'DM Mono'; font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); margin-right: 4px;
}
.tag-suggest{
  border: 1px dashed var(--line);
  background: transparent;
  padding: 4px 10px; border-radius: 999px;
  font-family: 'Klee One'; font-size: 12px;
  color: var(--ink-soft);
  transition: all .15s;
}
.tag-suggest:hover{ border-style: solid; border-color: var(--sakura); color: var(--sakura-deep); }
.tag-suggest.active{
  background: var(--sakura); border-color: var(--sakura); color: white; border-style: solid;
}
.tag-input{
  border: 0; background: transparent;
  font-family: 'Klee One'; font-size: 13px;
  outline: none; min-width: 100px;
}

.write-actions{
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-soft);
}
.btn{
  font-family: 'Klee One'; font-weight: 600; font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary{
  background: var(--sage-deep); color: var(--cream);
  box-shadow: 0 3px 0 0 #3e5635, 0 6px 12px -3px rgba(0,0,0,0.12);
}
.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 4px 0 0 #3e5635, 0 8px 14px -3px rgba(0,0,0,0.15); }
.btn-primary:active{ transform: translateY(2px); box-shadow: 0 1px 0 0 #3e5635; }
.btn-ghost{
  background: transparent; color: var(--ink-soft);
  border: 1px dashed var(--line);
}
.btn-ghost:hover{ background: var(--paper); border-color: var(--sage); color: var(--ink); }

.toast{
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: var(--cream);
  padding: 12px 22px; border-radius: 999px;
  font-family: 'Klee One'; font-size: 14px;
  box-shadow: var(--shadow-lift);
  z-index: 100;
  transition: transform .35s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.toast.show{ transform: translateX(-50%) translateY(0); }

/* ─── journal / list ─── */
.journal-grid{
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px;
  margin-top: 28px;
}
.cal-card, .list-card{
  background: white; border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.cal-head{
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.cal-title{ font-family: 'Klee One'; font-weight: 600; font-size: 18px; }
.cal-nav{ display: flex; gap: 4px; }
.cal-nav button{
  border: 0; background: var(--cream-2);
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--ink-soft); font-size: 14px;
  display: inline-grid; place-items: center;
}
.cal-nav button:hover{ background: var(--sakura); color: white; }
.cal-grid{
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-grid .dow{
  font-family: 'DM Mono'; font-size: 10px;
  text-align: center; color: var(--ink-faint);
  padding: 6px 0;
  letter-spacing: 0.08em;
}
.cal-cell{
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft);
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  transition: all .15s;
}
.cal-cell.muted{ color: var(--ink-faint); opacity: 0.5; }
.cal-cell.has-dream{
  background: rgba(240, 184, 190, 0.15);
  color: var(--ink);
}
.cal-cell.has-dream::after{
  content: ''; position: absolute; bottom: 4px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--sakura-deep);
}
.cal-cell.today{
  box-shadow: inset 0 0 0 2px var(--sage);
  font-weight: 600;
}
.cal-cell:hover{ background: var(--cream-2); }
.cal-cell.has-dream:hover{ background: var(--sakura); color: white; }

.list-head{
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.list-head h3{ font-family: 'Klee One'; font-weight: 600; font-size: 18px; }
.list-head .count{
  font-family: 'DM Mono'; font-size: 11px;
  color: var(--ink-soft);
}
.dream-list{ display: flex; flex-direction: column; gap: 2px; max-height: 540px; overflow-y: auto; padding-right: 4px; }
.dream-list::-webkit-scrollbar{ width: 6px; }
.dream-list::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 3px; }

.dream-item{
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 10px;
  border-bottom: 1px dashed var(--line-soft);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.dream-item:hover{ background: var(--cream-2); }
.dream-item .mood-dot{
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.dream-item .meta{ flex: 1; min-width: 0; }
.dream-item h4{
  font-family: 'Klee One'; font-weight: 600; font-size: 15px;
  margin-bottom: 2px;
}
.dream-item .date{
  font-family: 'DM Mono'; font-size: 10px;
  color: var(--ink-soft); letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.dream-item .preview{
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-clamp: 2;
}
.dream-item .lucid-mark{
  font-size: 11px; color: var(--lavender-deep);
  margin-left: 4px;
}

.empty{
  text-align: center; padding: 40px 20px;
  font-family: 'Caveat'; font-size: 22px;
  color: var(--ink-faint);
}

/* ─── modal ─── */
.modal-back{
  position: fixed; inset: 0;
  background: rgba(58, 53, 48, 0.45);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-back.show{ display: flex; animation: fadeIn .25s; }
.modal{
  background: var(--paper);
  border-radius: var(--radius);
  max-width: 600px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  box-shadow: var(--shadow-lift);
  padding: 28px;
  position: relative;
}
.modal-close{
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: var(--cream-2);
  font-size: 16px; color: var(--ink-soft);
}
.modal-close:hover{ background: var(--sakura); color: white; }
.modal h2{
  font-family: 'Klee One'; font-weight: 600; font-size: 26px;
  margin-bottom: 8px;
  padding-right: 40px;
}
.modal .modal-date{
  font-family: 'DM Mono'; font-size: 11px;
  color: var(--ink-soft); letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.modal-mood{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: 'Klee One'; font-size: 13px;
  margin-bottom: 16px;
}
.modal-text{
  font-family: 'Klee One'; font-size: 16px;
  line-height: 1.75;
  white-space: pre-wrap;
  color: var(--ink);
  padding: 16px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.modal-tags{
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 16px;
}
.modal-tags .tag{
  font-family: 'Klee One'; font-size: 12px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--cream-2); color: var(--ink-soft);
}
.modal-symbols{ margin-top: 20px; }
.modal-symbols h4{
  font-family: 'DM Mono'; font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage-deep); margin-bottom: 10px;
}
.sym-mini{
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft);
}
.sym-mini .e{ font-size: 18px; }
.sym-mini strong{ color: var(--ink); font-weight: 600; }
.modal-actions{ display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ─── symbols view ─── */
.sym-search{
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: white;
  border-radius: 999px;
  border: 1.5px solid var(--line-soft);
  box-shadow: var(--shadow);
  margin: 24px 0;
}
.sym-search input{
  flex: 1; border: 0; background: transparent;
  font-family: 'Klee One'; font-size: 15px;
  outline: none;
}
.sym-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.sym-card{
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--sym-color);
  display: flex; gap: 12px; align-items: flex-start;
  transition: transform .2s;
}
.sym-card:hover{ transform: translateY(-3px); }
.sym-card .e{
  width: 44px; height: 44px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--sym-color) 25%, white);
  display: grid; place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.sym-card .body h4{
  font-family: 'Klee One'; font-weight: 600; font-size: 16px;
  margin-bottom: 4px;
}
.sym-card .body .seen{
  font-family: 'DM Mono'; font-size: 9px;
  color: var(--sage-deep); letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: inline-block;
  background: rgba(156, 179, 138, 0.15);
  padding: 2px 6px; border-radius: 4px;
}
.sym-card .body p{
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft); line-height: 1.55;
  text-wrap: pretty;
}

/* ─── insights ─── */
.stats-row{
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 24px 0;
}
.stat{
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat .num{
  font-family: 'Klee One'; font-weight: 600;
  font-size: 36px; line-height: 1;
  color: var(--ink);
  margin-bottom: 4px;
}
.stat .lbl{
  font-family: 'DM Mono'; font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.stat .ico{ font-size: 22px; margin-bottom: 8px; }

.chart-card, .top-card{
  background: white; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.chart-card h3, .top-card h3{
  font-family: 'Klee One'; font-weight: 600; font-size: 18px;
  margin-bottom: 4px;
}
.chart-card .lbl, .top-card .lbl{
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft); margin-bottom: 18px;
}
.bars{
  display: flex; align-items: flex-end; gap: 4px;
  height: 140px;
}
.bar{
  flex: 1;
  background: linear-gradient(180deg, var(--bar-color, var(--sakura)) 0%, color-mix(in oklab, var(--bar-color, var(--sakura)) 70%, white) 100%);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  position: relative;
  transition: opacity .15s;
}
.bar:hover{ opacity: 0.8; }
.bar-labels{
  display: flex; gap: 4px;
  margin-top: 6px;
  font-family: 'DM Mono'; font-size: 9px;
  color: var(--ink-faint); letter-spacing: 0.04em;
}
.bar-labels span{ flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tops{ display: flex; flex-direction: column; gap: 10px; }
.top-row{
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0;
}
.top-row .e{ font-size: 18px; width: 28px; text-align: center; }
.top-row .name{
  font-family: 'Klee One'; font-size: 14px;
  flex: 1; color: var(--ink);
}
.top-row .barwrap{ flex: 2; height: 8px; background: var(--cream-2); border-radius: 4px; overflow: hidden; }
.top-row .fill{ height: 100%; background: var(--top-color, var(--sage)); border-radius: 4px; }
.top-row .n{
  font-family: 'DM Mono'; font-size: 11px;
  color: var(--ink-soft); width: 28px; text-align: right;
}

/* ─── settings ─── */
.settings-card{
  background: white; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  margin-top: 24px;
}
.set-row{
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.set-row:last-child{ border-bottom: 0; }
.set-row .info h4{
  font-family: 'Klee One'; font-weight: 600; font-size: 15px;
  margin-bottom: 2px;
}
.set-row .info p{
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft);
}
.set-row .btn{ flex-shrink: 0; }

.promnet-call{
  margin-top: 28px;
  background:
    radial-gradient(ellipse 60% 80% at 20% 30%, rgba(156, 179, 138, 0.25), transparent 70%),
    radial-gradient(ellipse 50% 60% at 90% 80%, rgba(240, 184, 190, 0.25), transparent 70%),
    var(--cream-2);
  border-radius: var(--radius);
  padding: 28px;
  border: 1.5px dashed rgba(93, 122, 79, 0.25);
  text-align: center;
}
.promnet-call h3{
  font-family: 'Klee One'; font-weight: 600; font-size: 22px;
  margin-bottom: 6px;
}
.promnet-call .leaf{ color: var(--sage-deep); }
.promnet-call p{
  font-family: 'Klee One'; font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  max-width: 460px; margin-left: auto; margin-right: auto;
}

/* language */
html[data-lang="hu"] .en{ display: none; }
html[data-lang="en"] .hu{ display: none; }

/* ─── top strip (promnet ribbon) ─── */
.top-strip{
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--sage-deep) 0%, #6a8a58 50%, var(--sage-deep) 100%);
  color: var(--cream);
  font-family: 'Klee One'; font-size: 13px;
  padding: 8px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: opacity .4s ease;
}
.top-strip a{ color: white; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; font-weight: 600; }
.top-strip .star{ display: inline-block; animation: spin 6s linear infinite; }
@keyframes spin{ to { transform: rotate(360deg); } }
body{ padding-top: 38px; }

/* ─── right rail ─── */
.rail{
  border-left: 1px dashed var(--line);
  padding: 24px 18px;
  display: flex; flex-direction: column;
  gap: 16px;
  background: rgba(253, 249, 239, 0.5);
  backdrop-filter: blur(8px);
  position: sticky; top: 38px;
  align-self: start;
  max-height: calc(100vh - 38px);
  overflow-y: auto;
}
.rail::-webkit-scrollbar{ width: 4px; }
.rail::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 2px; }
.rail-polaroid{
  background: white;
  padding: 10px 10px 32px;
  box-shadow: var(--shadow-lift);
  border-radius: 3px;
  transform: rotate(-2deg);
  position: relative;
  transition: transform .4s;
}
.rail-polaroid:hover{ transform: rotate(0deg); }
.rail-polaroid::before{
  content:''; position: absolute; top: -8px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 70px; height: 20px;
  background: linear-gradient(90deg, rgba(240,184,190,0.7), rgba(240,184,190,0.5));
  border-left: 1px dashed rgba(255,255,255,0.5);
  border-right: 1px dashed rgba(255,255,255,0.5);
}
.rail-polaroid .img-wrap{
  width: 100%; aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--lavender), var(--sakura));
  position: relative;
}
.rail-polaroid img{ width: 100%; height: 100%; object-fit: cover; transition: opacity .5s; opacity: 0; display: block; }
.rail-polaroid img.show{ opacity: 1; }
.rail-polaroid .ph-mini{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: 'DM Mono'; font-size: 10px;
  color: rgba(255,255,255,0.85); letter-spacing: 0.14em;
  text-transform: uppercase;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.3) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, var(--lavender), var(--sakura));
}
.rail-polaroid .caption{
  font-family: 'Caveat'; font-size: 19px;
  color: var(--ink-soft);
  text-align: center; margin-top: 8px;
}
.rail-polaroid .next-btn{
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(255,255,255,0.95); border: 1px solid var(--line-soft);
  border-radius: 50%; width: 26px; height: 26px;
  font-size: 11px; color: var(--ink-soft);
  display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.rail-polaroid .next-btn:hover{ background: var(--sakura); color: white; }
.rail-card{
  background: white; border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.rail-eyebrow{
  font-family: 'DM Mono'; font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 10px;
  display: inline-flex; gap: 8px; align-items: center;
}
.rail-eyebrow::before{ content:'✿'; color: var(--sakura); }
.seed-card .e{ font-size: 32px; margin-bottom: 6px; }
.seed-card h4{ font-family: 'Klee One'; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.seed-card p{ font-family: 'Klee One'; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.rail-quote p{ font-family: 'Caveat'; font-size: 20px; line-height: 1.4; color: var(--ink); text-wrap: pretty; }
.rail-quote .attr{ font-family: 'DM Mono'; font-size: 10px; color: var(--ink-soft); margin-top: 8px; text-align: right; letter-spacing: 0.04em; }
.rail-promo{
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(156, 179, 138, 0.3), transparent 60%),
    radial-gradient(ellipse 60% 60% at 50% 100%, rgba(240, 184, 190, 0.2), transparent 70%),
    var(--cream-2);
  border-radius: var(--radius);
  padding: 18px;
  border: 1.5px dashed rgba(93, 122, 79, 0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.rail-promo .ribbon{
  position: absolute; top: 14px; right: -34px;
  background: var(--sakura-deep); color: white;
  font-family: 'DM Mono'; font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 38px;
  transform: rotate(35deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.rail-promo .price{
  font-family: 'Klee One'; font-weight: 600;
  font-size: 38px; line-height: 1;
  color: var(--sage-deep);
  margin: 8px 0 4px;
}
.rail-promo .price small{ font-size: 13px; color: var(--ink-soft); font-weight: 400; margin-left: 2px; }
.rail-promo .lbl{
  font-family: 'DM Mono'; font-size: 9px;
  letter-spacing: 0.18em; color: var(--ink-soft);
  text-transform: uppercase;
}
.rail-promo .pitch{
  font-family: 'Klee One'; font-size: 13px;
  color: var(--ink-soft); margin: 10px 0 12px;
  line-height: 1.5; text-wrap: pretty;
}
.rail-promo ul{
  list-style: none; text-align: left;
  margin-bottom: 14px;
  font-family: 'Klee One'; font-size: 12px;
  color: var(--ink);
}
.rail-promo ul li{ padding: 3px 0; display: flex; gap: 8px; }
.rail-promo ul li::before{ content:'✿'; color: var(--sakura-deep); flex-shrink: 0; }
.rail-promo .btn-mini{
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sage-deep); color: var(--cream);
  font-family: 'Klee One'; font-weight: 600; font-size: 13px;
  padding: 9px 20px; border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 3px 0 #3e5635, 0 6px 12px -4px rgba(0,0,0,0.15);
  transition: transform .2s;
}
.rail-promo .btn-mini:hover{ transform: translateY(-2px); }

/* tips block under write card */
.tips{
  margin-top: 22px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.tip{
  background: rgba(255,255,255,0.7);
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: 'Klee One'; font-size: 12.5px;
  color: var(--ink-soft); line-height: 1.5;
}
.tip .e{ font-size: 18px; display: block; margin-bottom: 4px; }
.tip strong{ color: var(--ink); font-weight: 600; }

@media (max-width: 1180px){
  .app{ grid-template-columns: 240px 1fr; }
  .rail{ display: none; }
}

/* responsive */
@media (max-width: 900px){
  .app{ grid-template-columns: 1fr; }
  aside{
    border-right: 0; border-bottom: 1px dashed var(--line);
    flex-direction: row; flex-wrap: wrap; padding: 14px;
    align-items: center;
  }
  .brand{ padding: 4px 8px; }
  .nav-tab{ width: auto; padding: 8px 12px; flex: 0 0 auto; }
  .nav-tab .count{ display: none; }
  .aside-foot{ margin-top: 0; margin-left: auto; flex-direction: row; }
  .promnet-badge{ display: none; }
  main{ padding: 20px 18px 60px; }
  .journal-grid{ grid-template-columns: 1fr; }
  .stats-row{ grid-template-columns: repeat(2, 1fr); }
}
