:root{--bg:#f7f4f0;--card:#fff;--ink:#211b19;--muted:#81766f;--accent:#9a6b59;--accent2:#d8b8a8;--border:#e8dfda;--danger:#ad3b3b;--shadow:0 12px 35px rgba(67,45,37,.08)}*{box-sizing:border-box}body{margin:0;background-image:url("galina-diary-background.png");background-size:cover;background-position:center center;background-repeat:no-repeat;background-attachment:fixed;color:var(--ink);font-family:Manrope,Arial,sans-serif}.container{width:min(1180px,calc(100% - 32px));margin:34px auto 60px}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1180px)/2));background:rgba(255,255,255,.88);backdrop-filter:blur(16px);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:10}.brand{font-family:"Playfair Display",serif;font-weight:700;font-size:25px;text-decoration:none;color:var(--ink)}.brand span{color:#e57ba3}nav{display:flex;gap:20px}nav a{color:var(--ink);text-decoration:none;font-weight:600;font-size:14px}.hero{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}.hero h1,h1,h2{font-family:"Playfair Display",serif;margin:0}.hero h1{font-size:42px}.sub{color:var(--muted);margin:8px 0 0}.card{background:var(--card);border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow);padding:22px}.calendar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.calendar-nav{display:flex;gap:9px}.btn,.icon-btn{border:0;border-radius:12px;background:var(--accent);color:white;text-decoration:none;padding:11px 15px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.btn.secondary,.icon-btn{background:#efe6e1;color:var(--ink)}.btn.danger{background:var(--danger)}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.weekday{text-align:center;padding:10px;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase}.day{min-height:115px;border:1px solid var(--border);border-radius:16px;padding:11px;background:#fff;text-decoration:none;color:var(--ink);transition:.18s}.day:hover{transform:translateY(-2px);box-shadow:0 10px 25px rgba(70,45,37,.08);border-color:var(--accent2)}.day.empty{background:transparent;border-style:dashed;opacity:.45}.day.today{outline:2px solid var(--accent)}.day-number{font-weight:800}.day-meta{margin-top:18px;font-size:12px;color:var(--muted)}.badge{display:inline-block;padding:6px 9px;border-radius:999px;background:#f1e7e2;color:#6b493d;font-size:12px;font-weight:700}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:22px}.form-grid{display:grid;gap:16px}.field label{display:block;font-weight:700;margin-bottom:7px;font-size:13px}.field input,.field textarea,.field select{width:100%;border:1px solid var(--border);border-radius:13px;padding:12px 13px;font:inherit;background:#fff;outline:none}.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--accent)}textarea{min-height:120px;resize:vertical}.stars{display:flex;gap:3px;flex-direction:row-reverse;justify-content:flex-end}.stars input{display:none}.stars label{font-size:32px;cursor:pointer;color:#ddd}.stars label:hover,.stars label:hover~label,.stars input:checked~label{color:#d4a43d}.preview{width:100%;aspect-ratio:1/1;border-radius:18px;border:1px dashed var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden;background:#faf7f5;color:var(--muted)}.preview img{width:100%;height:100%;object-fit:cover}.entry{display:grid;grid-template-columns:110px 1fr auto;gap:18px;padding:16px 0;border-bottom:1px solid var(--border)}.entry:last-child{border-bottom:0}.entry img{width:110px;height:110px;object-fit:cover;border-radius:16px;background:#eee}.entry h3{margin:0 0 6px}.stars-text{color:#d4a43d;letter-spacing:2px}.muted{color:var(--muted)}.stats-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:20px 0}.metric{padding:18px;background:#fff;border:1px solid var(--border);border-radius:18px}.metric .value{font-size:28px;font-weight:800}.metric .label{font-size:12px;color:var(--muted)}.filters{display:grid;grid-template-columns:1fr 1fr 1.2fr auto;gap:12px;align-items:end}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:13px 10px;border-bottom:1px solid var(--border);text-align:left}.table th{font-size:12px;text-transform:uppercase;color:var(--muted)}.login-shell{min-height:78vh;display:grid;place-items:center}.login-card{width:min(430px,100%);padding:34px}.login-card h1{font-size:36px;margin-bottom:8px}.alert{padding:12px 14px;border-radius:12px;background:#fff0ef;color:#812f2a;margin-bottom:16px}.success{background:#edf7ef;color:#30633a}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.photo-status{font-size:12px;color:var(--muted);margin-top:7px}@media(max-width:850px){.grid-2{grid-template-columns:1fr}.stats-cards{grid-template-columns:1fr 1fr}.filters{grid-template-columns:1fr 1fr}.calendar-grid{gap:4px}.day{min-height:85px;padding:8px}.day-meta{font-size:10px;margin-top:10px}}@media(max-width:560px){.topbar{padding:0 16px}.brand{font-size:20px}nav{gap:10px}nav a{font-size:12px}.hero h1{font-size:32px}.calendar-grid{grid-template-columns:repeat(7,minmax(42px,1fr));overflow-x:auto}.weekday{font-size:10px}.day{min-height:68px}.day-meta{display:none}.stats-cards{grid-template-columns:1fr}.filters{grid-template-columns:1fr}.entry{grid-template-columns:80px 1fr}.entry img{width:80px;height:80px}.entry .actions{grid-column:1/-1}}
.inline-input{display:grid;grid-template-columns:1fr auto;gap:10px}.mini-grid{display:grid;grid-template-columns:2fr 1fr;gap:12px}.meta-line{font-size:11.5px;color:var(--muted);margin:7px 0}.meta-line b{color:var(--ink)}.text-link{font-size:13px;font-weight:700;color:var(--accent);text-decoration:none}.text-link:hover{text-decoration:underline}.info-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:20px;margin-top:20px}.info-grid h3{margin:22px 0 8px}.price-big{font-size:28px;font-weight:800;margin:8px 0}.small{font-size:12px}.source-list{display:grid;gap:9px}.source-list a{display:block;padding:10px 12px;border:1px solid var(--border);border-radius:12px;text-decoration:none;color:var(--ink);background:#faf7f5}.source-list a:hover{border-color:var(--accent2)}.perfume-search{grid-template-columns:1fr auto}.filters-wide{grid-template-columns:1fr 1fr 1.1fr 1.1fr auto}@media(max-width:900px){.filters-wide{grid-template-columns:1fr 1fr}.info-grid{grid-template-columns:1fr}}@media(max-width:560px){.inline-input{grid-template-columns:1fr}.mini-grid{grid-template-columns:1fr}.perfume-search{grid-template-columns:1fr}}
.notes-form{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.notes-form textarea{min-height:90px}.notes-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.notes-grid>div{padding:14px;border:1px solid var(--border);border-radius:14px;background:#faf7f5}.notes-grid p{margin:7px 0 0}.perfume-meta{display:grid;grid-template-columns:1fr 1fr;gap:4px 18px;margin-top:16px}.perfume-meta p{margin:5px 0}@media(max-width:760px){.notes-form,.notes-grid,.perfume-meta{grid-template-columns:1fr}}

/* Calendar perfume thumbnails */
.day-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.day-rating{font-size:10px;color:#b27d13;font-weight:800}.calendar-photos{display:grid;grid-template-columns:repeat(2,1fr);gap:4px;margin-top:8px;height:64px;overflow:hidden}.calendar-photos img{width:100%;height:100%;min-height:0;object-fit:cover;border-radius:8px;background:#f1ece9;border:1px solid var(--border)}.calendar-photos.count-1{grid-template-columns:1fr}.calendar-photos.count-1 img{object-fit:contain;background:#faf7f5}.calendar-photos.count-2{grid-template-columns:repeat(2,1fr)}.calendar-photos.count-3,.calendar-photos.count-4{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}.calendar-photos.count-3 img:first-child{grid-row:span 2}.day:has(.calendar-photos){min-height:165px}.day:has(.calendar-photos) .day-meta{margin-top:7px}@media(max-width:850px){.calendar-photos{height:50px}.day:has(.calendar-photos){min-height:128px}}@media(max-width:560px){.calendar-photos{height:42px;gap:2px}.calendar-photos img{border-radius:5px}.day:has(.calendar-photos){min-height:92px}.day:has(.calendar-photos) .day-meta{display:none}.day-rating{display:none}}
.saved-perfume-picker{padding:14px;border:1px solid var(--accent2);border-radius:16px;background:#fbf6f3}.saved-perfume-picker select{background:#fff}.saved-perfume-picker label{color:#6b493d}

/* v11.1: on mobile, show "Записи за день" before the new-entry form */
@media(max-width:850px){
  .grid-2 > .card:first-child{order:2}
  .grid-2 > .card:nth-child(2){order:1}
}

/* v12 books & movies */
.topbar nav{flex-wrap:wrap;justify-content:flex-end}.media-form h3{margin:8px 0 0}.media-cover{aspect-ratio:2/3;max-width:280px}.score-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}@media(max-width:850px){.media-day-grid>.card:first-child{order:2}.media-day-grid>.card:nth-child(2){order:1}.score-grid{grid-template-columns:1fr 1fr}.topbar{height:auto;min-height:72px;padding-top:10px;padding-bottom:10px}.topbar nav{gap:9px}}@media(max-width:560px){.score-grid{grid-template-columns:1fr}.topbar{align-items:flex-start}.topbar nav{max-width:75%;justify-content:flex-end}.topbar nav a{font-size:11px}}


/* v13: "Моя полка" в статистике */
.shelf-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.perfume-shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:14px;align-items:stretch}
.shelf-item{display:block;text-decoration:none;color:var(--ink);border:1px solid var(--border);border-radius:18px;background:#fff;overflow:hidden;transition:.18s;min-width:0}
.shelf-item:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(70,45,37,.10);border-color:var(--accent2)}
.shelf-photo{position:relative;aspect-ratio:1/1;background:#faf7f5;overflow:hidden;border-bottom:1px solid var(--border)}
.shelf-photo img{display:block;width:100%;height:100%;object-fit:contain;padding:7px}
.shelf-no-photo{width:100%;height:100%;align-items:center;justify-content:center;text-align:center;padding:12px;color:var(--muted);font-size:12px;background:linear-gradient(145deg,#faf7f5,#f1e7e2)}
.shelf-count{position:absolute;top:8px;right:8px;min-width:34px;padding:6px 8px;border-radius:999px;background:rgba(33,27,25,.82);color:#fff;font-size:12px;font-weight:800;text-align:center;backdrop-filter:blur(4px)}
.shelf-info{padding:11px 12px 13px}
.shelf-name{font-weight:800;font-size:14px;line-height:1.25;min-height:35px;overflow-wrap:anywhere}
.shelf-perfumer{margin-top:5px;color:var(--muted);font-size:12px;line-height:1.3;min-height:31px}
.shelf-used{margin-top:7px;font-size:12px;color:#6b493d}
@media(max-width:700px){
  .perfume-shelf{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .shelf-heading{align-items:center}
  .shelf-photo img{padding:4px}
  .shelf-info{padding:8px}
  .shelf-name{font-size:11px;min-height:28px}
  .shelf-perfumer{font-size:10px;min-height:26px}
  .shelf-used{font-size:10px}
  .shelf-count{top:5px;right:5px;padding:4px 6px;font-size:10px;min-width:28px}
}
@media(max-width:420px){
  .perfume-shelf{grid-template-columns:repeat(3,minmax(0,1fr))}
  .shelf-section{padding:14px}
}


/* v13.1: compact perfume shelf */
.shelf-section{padding:18px}
.shelf-heading{margin-bottom:12px}
.perfume-shelf{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(86px,100px));
  gap:10px;
  justify-content:start;
  align-items:start;
}
.shelf-item{
  border-radius:12px;
  box-shadow:none;
}
.shelf-item:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 14px rgba(70,45,37,.08);
}
.shelf-photo{
  width:100%;
  aspect-ratio:1/1;
}
.shelf-photo img{padding:4px}
.shelf-no-photo{font-size:10px;padding:6px}
.shelf-info{
  padding:6px 5px 7px;
  text-align:center;
}
.shelf-name{
  font-size:10px;
  line-height:1.15;
  min-height:23px;
  max-height:23px;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.shelf-used{
  margin-top:2px;
  font-size:10px;
  line-height:1;
  font-weight:800;
  color:#6b493d;
}
.shelf-perfumer,.shelf-count{display:none!important}

@media(max-width:700px){
  .shelf-section{padding:12px}
  .perfume-shelf{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:7px;
  }
  .shelf-info{padding:5px 3px 6px}
  .shelf-name{
    font-size:9px;
    min-height:21px;
    max-height:21px;
  }
  .shelf-used{font-size:9px;margin-top:2px}
}
@media(max-width:380px){
  .perfume-shelf{grid-template-columns:repeat(3,minmax(0,1fr))}
}


/* v14: statistics by year and perfumer */
.stats-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:20px}
.compact-stat-list{display:flex;flex-direction:column;gap:7px}
.compact-stat-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border:1px solid var(--border);border-radius:12px;background:#fff}
.compact-stat-main{min-width:0;display:flex;flex-direction:column;gap:2px}
.compact-stat-main strong{font-size:13px;line-height:1.2;overflow-wrap:anywhere}
.compact-stat-main span{font-size:10px;color:var(--muted)}
.compact-stat-values{flex:0 0 auto;display:flex;gap:10px;align-items:center;font-size:11px;white-space:nowrap;color:#6b493d}
@media(max-width:700px){
  .stats-split{grid-template-columns:1fr;gap:12px}
  .compact-stat-row{padding:8px}
  .compact-stat-values{font-size:10px;gap:7px}
}


/* v14.1: years + perfumers in one compact two-column block */
.compact-dual-stats{padding:14px 16px}
.dual-stats-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.dual-stat-col{min-width:0}
.dual-stat-col + .dual-stat-col{
  border-left:1px solid var(--border);
  padding-left:16px;
}
.dual-stat-col h2{
  margin:0 0 8px;
  font-size:16px;
}
.compact-dual-stats .compact-stat-list{gap:4px}
.compact-dual-stats .compact-stat-row{
  padding:5px 7px;
  border-radius:8px;
}
.compact-dual-stats .compact-stat-main strong{font-size:11px}
.compact-dual-stats .compact-stat-main span{font-size:9px}
.compact-dual-stats .compact-stat-values{font-size:9px;gap:6px}
@media(max-width:700px){
  .dual-stats-grid{grid-template-columns:1fr;gap:12px}
  .dual-stat-col + .dual-stat-col{
    border-left:0;
    border-top:1px solid var(--border);
    padding-left:0;
    padding-top:12px;
  }
}


/* v14.2: year/perfumer statistics must always remain left/right */
.compact-dual-stats .dual-stats-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:8px !important;
}
.compact-dual-stats .dual-stat-col + .dual-stat-col{
  border-left:1px solid var(--border) !important;
  border-top:0 !important;
  padding-left:8px !important;
  padding-top:0 !important;
}
@media(max-width:700px){
  .compact-dual-stats{padding:10px 8px}
  .compact-dual-stats .dual-stats-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:6px !important;
  }
  .compact-dual-stats .dual-stat-col + .dual-stat-col{
    border-left:1px solid var(--border) !important;
    border-top:0 !important;
    padding-left:6px !important;
    padding-top:0 !important;
  }
  .compact-dual-stats .dual-stat-col h2{
    font-size:13px;
    line-height:1.15;
    margin-bottom:6px;
  }
  .compact-dual-stats .compact-stat-row{
    display:block;
    padding:5px;
  }
  .compact-dual-stats .compact-stat-values{
    margin-top:3px;
    display:flex;
    flex-wrap:wrap;
    gap:3px 6px;
    white-space:normal;
  }
}


/* v14.3: perfume details on calendar thumbnail hover */
.calendar-photos{
  overflow:visible !important;
}
.calendar-perfume-thumb{
  position:relative;
  display:block;
  min-width:0;
  min-height:0;
}
.calendar-perfume-thumb > img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.perfume-hover-card{
  display:none;
  position:absolute;
  z-index:100;
  left:50%;
  bottom:calc(100% + 8px);
  transform:translateX(-50%);
  width:220px;
  padding:10px 11px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  color:var(--ink);
  box-shadow:0 12px 30px rgba(45,32,28,.18);
  text-align:left;
  pointer-events:none;
  white-space:normal;
}
.perfume-hover-card::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-6px;
  width:10px;
  height:10px;
  background:#fff;
  border-right:1px solid var(--border);
  border-bottom:1px solid var(--border);
  transform:translateX(-50%) rotate(45deg);
}
.perfume-hover-card strong{
  display:block;
  margin-bottom:5px;
  font-size:12px;
  line-height:1.25;
}
.perfume-hover-card span{
  display:block;
  margin-top:3px;
  font-size:10px;
  line-height:1.3;
  color:var(--muted);
}
.perfume-hover-card span b{
  color:var(--ink);
}
.calendar-perfume-thumb:hover .perfume-hover-card{
  display:block;
}

/* Keep the tooltip inside the viewport for edge calendar cells. */
.day:nth-child(7n+2) .calendar-perfume-thumb .perfume-hover-card{
  left:0;
  transform:none;
}
.day:nth-child(7n+2) .calendar-perfume-thumb .perfume-hover-card::after{
  left:18px;
  transform:rotate(45deg);
}
.day:nth-child(7n+1) .calendar-perfume-thumb .perfume-hover-card{
  left:auto;
  right:0;
  transform:none;
}
.day:nth-child(7n+1) .calendar-perfume-thumb .perfume-hover-card::after{
  left:auto;
  right:18px;
  transform:rotate(45deg);
}

@media(max-width:700px){
  .perfume-hover-card{
    width:180px;
    padding:8px 9px;
  }
  .perfume-hover-card strong{font-size:11px}
  .perfume-hover-card span{font-size:9px}
}


/* v14.4: expandable perfume details */
.stat-expand{border:0}
.stat-expand > summary{list-style:none;cursor:pointer;user-select:none}
.stat-expand > summary::-webkit-details-marker{display:none}
.stat-expand[open] > summary{
  border-bottom-left-radius:0 !important;
  border-bottom-right-radius:0 !important;
  background:var(--soft-bg,#faf7f5);
}
.stat-chevron{display:inline-block;font-size:13px;transition:transform .18s}
.stat-expand[open] .stat-chevron{transform:rotate(180deg)}
.stat-perfume-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  padding:7px;
  border:1px solid var(--border);
  border-top:0;
  border-radius:0 0 9px 9px;
  background:var(--soft-bg,#faf7f5);
}
.stat-perfume-card{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  gap:7px;
  min-width:0;
  padding:6px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--card);
  color:var(--ink);
  text-decoration:none;
}
.stat-perfume-card:hover{border-color:var(--accent2)}
.stat-perfume-photo{
  width:46px;height:58px;
  border-radius:6px;
  overflow:hidden;
  background:var(--soft-bg,#faf7f5);
  display:flex;align-items:center;justify-content:center;
  color:var(--muted);font-size:8px;text-align:center;
}
.stat-perfume-photo img{width:100%;height:100%;object-fit:contain}
.stat-perfume-info{min-width:0}
.stat-perfume-info > strong{
  display:block;
  font-size:10px;
  line-height:1.18;
  overflow-wrap:anywhere;
}
.stat-mini-meta{
  display:flex;flex-wrap:wrap;gap:2px 6px;
  margin-top:3px;
  color:var(--muted);font-size:8px;line-height:1.2;
}
.stat-notes{
  margin-top:2px;
  font-size:7.5px;
  line-height:1.22;
  color:var(--muted);
  display:grid;
  gap:2px;
}
.stat-notes span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media(max-width:700px){
  .stat-perfume-list{grid-template-columns:1fr;padding:5px;gap:4px}
  .stat-perfume-card{grid-template-columns:38px minmax(0,1fr);padding:5px}
  .stat-perfume-photo{width:38px;height:48px}
}

/* v14.4: day/night switch */
.theme-toggle{
  flex:0 0 auto;
  width:48px;height:28px;
  margin-left:14px;
  padding:2px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--soft-bg,#f1e7e2);
  color:var(--ink);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:13px;
}
.theme-toggle span{width:20px;text-align:center;opacity:.45}
html[data-theme="light"] .theme-sun,
html[data-theme="dark"] .theme-moon{opacity:1}

html[data-theme="dark"]{
  --bg:#171514;
  --card:#24201e;
  --ink:#f3ece8;
  --muted:#b9aaa2;
  --accent:#c58f79;
  --accent2:#8f6252;
  --border:#403734;
  --danger:#c85b5b;
  --shadow:0 12px 35px rgba(0,0,0,.28);
  --soft-bg:#1d1a18;
}
html[data-theme="dark"] body{
  background-image:url("galina-diary-background.png");
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:var(--ink);
}
html[data-theme="dark"] .topbar{
  background:rgba(30,27,25,.92);
  border-color:var(--border);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .day,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .shelf-item,
html[data-theme="dark"] .compact-stat-row,
html[data-theme="dark"] .stat-perfume-card,
html[data-theme="dark"] .perfume-hover-card{
  background:var(--card);
  color:var(--ink);
}
html[data-theme="dark"] .day.empty{background:transparent}
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select{
  background:#1d1a18;
  color:var(--ink);
  border-color:var(--border);
}
html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .badge{
  background:#342c29;
  color:var(--ink);
}
html[data-theme="dark"] .preview,
html[data-theme="dark"] .shelf-photo,
html[data-theme="dark"] .shelf-no-photo,
html[data-theme="dark"] .calendar-photos,
html[data-theme="dark"] .stat-perfume-photo{
  background:var(--soft-bg);
}
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td{border-color:var(--border)}
html[data-theme="dark"] .perfume-hover-card::after{
  background:var(--card);
  border-color:var(--border);
}
html[data-theme="dark"] a{color:inherit}
html[data-theme="dark"] .brand span{color:#e57ba3}

@media(max-width:900px){
  .topbar{height:auto;min-height:72px;padding-top:10px;padding-bottom:10px;gap:8px}
  .theme-toggle{margin-left:4px}
}


/* v14.5: Fragrantica primary perfume image */
.fragrantica-main-photo{
  width:min(280px,100%);
  margin:16px 0 18px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--soft-bg,#faf7f5);
  text-align:center;
}
.fragrantica-main-photo img{
  display:block;
  width:100%;
  max-height:320px;
  object-fit:contain;
  border-radius:10px;
  margin-bottom:6px;
}
html[data-theme="dark"] .fragrantica-main-photo{background:var(--soft-bg)}

.login-brand span{color:#e57ba3}

/* v14.23 — ornate diary wordmark */
.brand, .login-brand{font-family:"Great Vibes","Brush Script MT",cursive;font-weight:400;letter-spacing:.02em;line-height:1.15}
.brand{font-size:34px}
.login-card .login-brand{font-size:50px}
.brand span,.login-brand span{color:#e57ba3}
@media(max-width:560px){.brand{font-size:28px}}


/* v14.27: translucent editing and statistics surfaces */
.translucent-edit-card,
.stats-transparent-page .card,
.stats-transparent-page .metric,
.stats-transparent-page .compact-stat-row,
.stats-transparent-page .stat-perfume-card {
  background:#ffffff7d !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
html[data-theme="dark"] .translucent-edit-card,
html[data-theme="dark"] .stats-transparent-page .card,
html[data-theme="dark"] .stats-transparent-page .metric,
html[data-theme="dark"] .stats-transparent-page .compact-stat-row,
html[data-theme="dark"] .stats-transparent-page .stat-perfume-card {
  background:#14141469 !important;
}

/* v14.28: translucent calendar and selected-date surfaces */
.calendar-transparent-card,
.selected-date-transparent .card,
.calendar-transparent-card .day:not(.empty) {
  background:#ffffff7d !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
html[data-theme="dark"] .calendar-transparent-card,
html[data-theme="dark"] .selected-date-transparent .card,
html[data-theme="dark"] .calendar-transparent-card .day:not(.empty) {
  background:#14141469 !important;
}


/* v14.30: translucent perfume search surfaces */
.search-transparent-page .card,
.search-transparent-page .notes-grid > div,
.search-transparent-page .source-list a,
.search-transparent-page .fragrantica-main-photo {
  background:#ffffff7d !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
html[data-theme="dark"] .search-transparent-page .card,
html[data-theme="dark"] .search-transparent-page .notes-grid > div,
html[data-theme="dark"] .search-transparent-page .source-list a,
html[data-theme="dark"] .search-transparent-page .fragrantica-main-photo {
  background:#14141469 !important;
}

/* v14.31: ornate white section titles matching Galina Diary */
.hero h1.diary-section-title,
h1.diary-section-title {
  font-family:"Great Vibes","Brush Script MT",cursive;
  font-weight:400;
  letter-spacing:.02em;
  line-height:1.15;
  color:#fff;
  font-size:52px;
  text-shadow:0 2px 10px rgba(0,0,0,.24);
}
@media(max-width:560px){
  .hero h1.diary-section-title,
  h1.diary-section-title{font-size:40px}
}

/* v14.33: definitive dark-mode translucent surface override */
html[data-theme="dark"] .translucent-edit-card,
html[data-theme="dark"] .stats-transparent-page .card,
html[data-theme="dark"] .stats-transparent-page .metric,
html[data-theme="dark"] .stats-transparent-page .compact-stat-row,
html[data-theme="dark"] .stats-transparent-page .stat-perfume-card,
html[data-theme="dark"] .calendar-transparent-card,
html[data-theme="dark"] .calendar-transparent-card .day:not(.empty),
html[data-theme="dark"] .selected-date-transparent .card,
html[data-theme="dark"] .selected-date-transparent .entry,
html[data-theme="dark"] .search-transparent-page .card,
html[data-theme="dark"] .search-transparent-page .notes-grid > div,
html[data-theme="dark"] .search-transparent-page .source-list a,
html[data-theme="dark"] .search-transparent-page .fragrantica-main-photo {
  background-color:#14141469 !important;
  background-image:none !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}


/* v14.34: saved-item picker transparency + searchable datalist */
.saved-perfume-picker {
  background:#ffffff7d !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.saved-perfume-picker input,
.saved-perfume-picker select {
  background:#ffffff7d !important;
}
html[data-theme="dark"] .saved-perfume-picker {
  background:#14141469 !important;
  background-image:none !important;
}
html[data-theme="dark"] .saved-perfume-picker input,
html[data-theme="dark"] .saved-perfume-picker select {
  background:#14141469 !important;
  background-image:none !important;
  color:var(--ink) !important;
}

/* v14.35: dropdown menus follow the active light/dark theme */
select,
select option,
select optgroup {
  background-color:#ffffff !important;
  color:#211b19 !important;
}
select { color-scheme:light; }

html[data-theme="dark"] select,
html[data-theme="dark"] select option,
html[data-theme="dark"] select optgroup {
  background-color:#141414 !important;
  color:#f4efec !important;
}
html[data-theme="dark"] select { color-scheme:dark; }

/* Search/autocomplete fields: ask the browser to render native suggestion UI
   in the same light/dark scheme wherever supported. */
input[list] { color-scheme:light; }
html[data-theme="dark"] input[list] { color-scheme:dark; }


/* v14.36: force all native select/dropdown controls to match theme */
select,
.field select,
select option,
select optgroup {
  background:#ffffff !important;
  background-color:#ffffff !important;
  color:#211b19 !important;
  color-scheme:light !important;
}
html[data-theme="dark"] select,
html[data-theme="dark"] .field select,
html[data-theme="dark"] select option,
html[data-theme="dark"] select optgroup {
  background:#141414 !important;
  background-color:#141414 !important;
  color:#f4efec !important;
  border-color:#4b4542 !important;
  color-scheme:dark !important;
}

/* v14.40: full-year calendar view */
.hero-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.year-calendar-card{padding:18px}
.year-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.mini-month{background:#ffffff7d;border:1px solid var(--border);border-radius:16px;padding:12px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.mini-month h3{margin:0 0 9px;text-align:center;font-size:1.05rem}.mini-month h3 a{color:inherit;text-decoration:none}.mini-month h3 a:hover{text-decoration:underline}
.mini-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.mini-weekday{text-align:center;font-size:.68rem;color:var(--muted);padding:3px 0}.mini-day{aspect-ratio:1;display:flex;align-items:center;justify-content:center;border-radius:7px;text-decoration:none;color:var(--ink);font-size:.78rem;line-height:1;background:#ffffff55;border:1px solid transparent}.mini-day.empty{background:transparent}.mini-day.has-entry{font-weight:700;border-color:var(--accent2)}.mini-day.today{outline:2px solid var(--accent);outline-offset:1px}
html[data-theme="dark"] .mini-month,html[data-theme="dark"] .mini-day:not(.empty){background:#14141469 !important;background-image:none !important}
@media(max-width:900px){.year-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.year-grid{grid-template-columns:1fr}.hero-actions{justify-content:flex-start}.mini-day{font-size:.82rem}}


/* v14.41 — thumbnails inside the 12-month calendar view */
.mini-day{position:relative;overflow:hidden;isolation:isolate}
.mini-day.has-photo{background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.mini-day-thumb{position:absolute;inset:0;display:block;z-index:0}
.mini-day-thumb img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.mini-day-number{position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 4px;border-radius:999px;background:rgba(255,255,255,.86);color:#211b19;font-size:.68rem;font-weight:800;line-height:1;box-shadow:0 1px 3px rgba(0,0,0,.18)}
html[data-theme="dark"] .mini-day.has-photo{background:#141414 !important}
html[data-theme="dark"] .mini-day-number{background:rgba(20,20,20,.82);color:#fff}
.mini-day.has-photo:hover .mini-day-thumb img{transform:scale(1.07)}
.mini-day-thumb img{transition:transform .18s ease}
@media(max-width:600px){.mini-day-number{min-width:20px;height:20px;font-size:.7rem}}

/* v14.46: mark perfumes selected for repeat purchase everywhere they are shown */
.repurchase-markable,.calendar-perfume-thumb,.mini-day-thumb,.search-result-markable{position:relative}
.repurchase-star{position:absolute;top:6px;right:6px;z-index:6;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.92);color:#d4a43d;font-size:17px;line-height:1;box-shadow:0 2px 8px rgba(0,0,0,.18);pointer-events:none}
.calendar-perfume-thumb .repurchase-star{top:2px;right:2px;width:18px;height:18px;font-size:13px}
.mini-day-thumb .repurchase-star{top:1px;right:1px;width:15px;height:15px;font-size:11px}
.search-result-markable .repurchase-star{top:8px;right:8px}
.perfume-name-cell{position:relative;padding-right:30px!important}.repurchase-inline-star{float:right;color:#d4a43d;font-size:18px;line-height:1}
html[data-theme="dark"] .repurchase-star{background:#141414;color:#d4a43d}

/* v14.48: visual marker for perfumes with “Выбрала бы снова = Да” */
.entry-perfume-image{position:relative;display:block;width:110px;height:110px;border-radius:16px;overflow:hidden}
.entry-perfume-image>img{width:110px;height:110px;object-fit:cover;border-radius:16px}
.repurchase-star{background:rgba(255,255,255,.94);border:1px solid rgba(212,164,61,.55);box-shadow:0 2px 10px rgba(0,0,0,.24)}
html[data-theme="dark"] .repurchase-star{background:#141414;border-color:rgba(212,164,61,.7)}
@media(max-width:560px){.entry-perfume-image{width:80px;height:80px}.entry-perfume-image>img{width:80px;height:80px}}

/* v14.49: visible choose-again marker directly on perfume calendar days */
.calendar-grid .day,.mini-calendar-grid .mini-day{position:relative}
.calendar-choice-star{position:absolute;top:7px;right:7px;z-index:12;width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.96);border:1px solid rgba(212,164,61,.65);color:#d4a43d;font-size:18px;line-height:1;box-shadow:0 2px 9px rgba(0,0,0,.22);pointer-events:none}
.mini-calendar-choice-star{top:2px;right:2px;width:17px;height:17px;font-size:12px}
html[data-theme="dark"] .calendar-choice-star{background:#141414;border-color:rgba(212,164,61,.75);color:#d4a43d}


/* v14.50: informative perfume hover cards in month/year calendars */
.perfume-hover-card{
  pointer-events:auto;
  z-index:80;
  min-width:230px;
  max-width:280px;
}
.calendar-hover-host:hover .perfume-hover-card,
.calendar-hover-host:focus-within .perfume-hover-card,
.calendar-perfume-thumb:focus-within .perfume-hover-card{
  opacity:1;
  visibility:visible;
  transform:translate(-50%,0);
}
.hover-page-link{
  display:block !important;
  margin-top:8px;
  padding:8px 10px;
  border-radius:10px;
  text-align:center;
  font-weight:700;
  cursor:pointer;
  background:rgba(229,123,163,.18);
  border:1px solid rgba(229,123,163,.45);
  color:inherit;
}
.hover-page-link:hover,
.hover-page-link:focus{
  background:rgba(229,123,163,.30);
  outline:none;
}
.year-hover-card{
  left:50%;
  top:calc(100% + 9px);
  bottom:auto;
  transform:translate(-50%,6px);
}
.year-hover-card::after{
  top:-6px;
  bottom:auto;
  border-top:0;
  border-bottom:6px solid rgba(255,255,255,.97);
}
html[data-theme="dark"] .year-hover-card::after{
  border-bottom-color:rgba(20,20,20,.97);
  border-top-color:transparent;
}
.year-grid .mini-month:nth-child(3n+1) .mini-day-thumb .year-hover-card{left:0;transform:translate(0,6px)}
.year-grid .mini-month:nth-child(3n+1) .mini-day-thumb:hover .year-hover-card{transform:translate(0,0)}
.year-grid .mini-month:nth-child(3n) .mini-day-thumb .year-hover-card{left:auto;right:0;transform:translate(0,6px)}
.year-grid .mini-month:nth-child(3n) .mini-day-thumb:hover .year-hover-card{transform:translate(0,0)}
@media(max-width:760px){
  .perfume-hover-card{min-width:205px;max-width:240px}
  .year-hover-card{position:fixed;left:50% !important;right:auto !important;top:50%;bottom:auto;transform:translate(-50%,-50%) !important}
  .year-hover-card::after{display:none}
}

/* v14.51: perfume calendar redesign based on the approved visual mockup */
.perfume-calendar-hero{margin-bottom:10px;align-items:center}
.perfume-calendar-hero .sub{letter-spacing:.03em}
.calendar-legend{display:flex;justify-content:flex-end;gap:22px;flex-wrap:wrap;margin:-2px 4px 16px;color:var(--ink);font-size:13px}
.calendar-legend span{display:flex;align-items:center;gap:7px}
.legend-star{color:#d4a43d;font-size:21px;line-height:1}
.legend-heart{color:#df6572;font-size:20px;line-height:1}
.calendar-year-btn{background:rgba(229,123,163,.28);color:#6d3348;border:1px solid rgba(229,123,163,.24)}
.calendar-today-btn{background:rgba(255,255,255,.78);color:var(--ink);border:1px solid var(--border)}
.calendar-head-month{display:grid;grid-template-columns:54px auto 54px;justify-content:start;gap:18px;align-items:center;margin-bottom:22px}
.calendar-head-month h2{font-size:34px;min-width:245px;text-align:left}
.calendar-arrow{width:54px;height:50px;padding:0;font-size:35px;font-weight:400;background:rgba(255,255,255,.78);border:1px solid var(--border)}
.calendar-transparent-card{overflow:visible}
.calendar-grid{gap:0;border:1px solid rgba(180,164,157,.32);border-radius:14px;overflow:visible;background:rgba(255,255,255,.34)}
.weekday{padding:13px 8px;text-transform:none;font-size:12px;font-weight:600;background:rgba(255,255,255,.42);border-bottom:1px solid rgba(180,164,157,.28)}
.day{min-height:180px;border:0;border-right:1px solid rgba(180,164,157,.28);border-bottom:1px solid rgba(180,164,157,.28);border-radius:0;background:rgba(255,255,255,.48);padding:10px;overflow:visible}
.day:hover{transform:none;box-shadow:inset 0 0 0 2px rgba(229,123,163,.42);border-color:rgba(180,164,157,.28)}
.day.empty{border-style:solid;background:rgba(255,255,255,.18)}
.day.today{outline:2px solid rgba(229,123,163,.66);outline-offset:-2px}
.day-number{font-size:14px;font-weight:700}
.day-rating{font-size:10px}
.calendar-photos{height:125px;margin-top:4px;gap:5px;overflow:visible!important}
.calendar-perfume-thumb{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3px 2px 20px;border-radius:10px;background:rgba(255,255,255,.28);overflow:visible}
.calendar-perfume-thumb>img{width:100%;height:calc(100% - 12px);object-fit:contain;object-position:center;transition:transform .18s ease}
.calendar-perfume-thumb:hover>img{transform:scale(1.04)}
.calendar-perfume-name{position:absolute;left:2px;right:2px;bottom:1px;z-index:3;text-align:center;font-size:9px;font-weight:650;line-height:1.15;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 3px;background:rgba(255,255,255,.76);border-radius:5px}
.repurchase-heart{position:absolute;right:3px;bottom:3px;z-index:8;color:#df6572;font-size:17px;line-height:1;text-shadow:0 1px 4px rgba(255,255,255,.9);pointer-events:none}
.mini-repurchase-heart{right:1px;bottom:1px;font-size:11px}
.calendar-choice-star{background:transparent!important;border:0!important;box-shadow:none!important;top:6px;right:7px;width:auto;height:auto;font-size:20px;text-shadow:0 1px 3px rgba(255,255,255,.95)}
.calendar-perfume-thumb .repurchase-star{background:transparent!important;border:0!important;box-shadow:none!important;top:1px;right:2px;width:auto;height:auto;font-size:15px;text-shadow:0 1px 3px rgba(255,255,255,.95)}
.perfume-hover-card{width:350px;max-width:390px;min-width:330px;padding:18px;border-radius:16px;background:rgba(255,255,255,.98);box-shadow:0 20px 48px rgba(45,32,28,.24);border:1px solid rgba(232,223,218,.9);bottom:calc(100% + 12px)}
.perfume-hover-card .hover-card-top{display:grid;grid-template-columns:76px 1fr;gap:13px;align-items:center;margin:0 0 8px;color:var(--ink)}
.perfume-hover-card .hover-card-top img{width:76px;height:88px;object-fit:contain;border-radius:10px;background:#faf7f5;border:1px solid var(--border)}
.perfume-hover-card .hover-card-top strong{font-family:"Playfair Display",serif;font-size:16px;line-height:1.25;margin:0;color:var(--ink)}
.perfume-hover-card .hover-date{padding-bottom:8px;margin-bottom:7px;border-bottom:1px solid var(--border)}
.perfume-hover-card span{font-size:11px;line-height:1.4;margin-top:4px}
.perfume-hover-card .hover-notes{margin-top:9px;padding-top:8px;border-top:1px solid var(--border);font-style:italic;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hover-page-link{margin-top:12px!important;padding:10px 12px!important;background:rgba(229,123,163,.25)!important;border-color:rgba(229,123,163,.35)!important;color:#6d3348!important}
.hover-page-link:hover{background:rgba(229,123,163,.38)!important}
html[data-theme="dark"] .calendar-legend{color:#f4efec}
html[data-theme="dark"] .calendar-today-btn,html[data-theme="dark"] .calendar-arrow{background:#141414c7;color:#f4efec;border-color:#4b4542}
html[data-theme="dark"] .calendar-year-btn{background:rgba(229,123,163,.25);color:#ffd8e7;border-color:rgba(229,123,163,.35)}
html[data-theme="dark"] .calendar-grid{background:#1414144d;border-color:#4b4542}
html[data-theme="dark"] .weekday{background:#14141475;border-color:#4b4542}
html[data-theme="dark"] .day:not(.empty){background:#14141469!important;border-color:#4b4542}
html[data-theme="dark"] .calendar-perfume-thumb{background:rgba(20,20,20,.25)}
html[data-theme="dark"] .calendar-perfume-name{background:rgba(20,20,20,.80);color:#fff}
html[data-theme="dark"] .perfume-hover-card{background:rgba(20,20,20,.98);border-color:#4b4542;color:#f4efec}
html[data-theme="dark"] .perfume-hover-card .hover-card-top strong{color:#fff}
html[data-theme="dark"] .perfume-hover-card .hover-card-top img{background:#1d1d1d;border-color:#4b4542}
html[data-theme="dark"] .hover-page-link{color:#ffd8e7!important}
@media(max-width:850px){.day{min-height:145px}.calendar-photos{height:92px}.calendar-head-month h2{font-size:28px;min-width:210px}.perfume-hover-card{width:300px;min-width:280px}}
@media(max-width:560px){.calendar-legend{justify-content:flex-start;font-size:11px;gap:12px}.calendar-head-month{grid-template-columns:44px auto 44px;gap:8px}.calendar-head-month h2{font-size:22px;min-width:0}.calendar-arrow{width:44px;height:42px}.day{min-height:100px;padding:5px}.calendar-photos{height:66px}.calendar-perfume-name{display:none}.calendar-perfume-thumb{padding-bottom:2px}.repurchase-heart{font-size:13px}.perfume-hover-card{position:fixed;left:50%!important;right:auto!important;top:50%!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:min(340px,calc(100vw - 30px));min-width:0;max-width:none}.perfume-hover-card::after{display:none}}

/* v14.52: full-screen month mode for the perfume calendar */
.calendar-head-month{grid-template-columns:54px auto 54px minmax(150px,max-content);width:100%}
.calendar-fullscreen-btn{margin-left:10px;white-space:nowrap;align-self:center;background:rgba(255,255,255,.78);color:var(--ink);border:1px solid var(--border)}
.calendar-fullscreen-btn:hover{background:rgba(229,123,163,.18)}
html[data-theme="dark"] .calendar-fullscreen-btn{background:#141414c7;color:#f4efec;border-color:#4b4542}
html[data-theme="dark"] .calendar-fullscreen-btn:hover{background:#252121}

#perfumeMonthCalendar:fullscreen,
#perfumeMonthCalendar.calendar-fallback-fullscreen{
  width:100vw;
  height:100vh;
  max-width:none;
  margin:0;
  padding:18px 22px 22px;
  border-radius:0;
  overflow:auto;
  box-sizing:border-box;
  background:rgba(250,247,246,.98)!important;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
#perfumeMonthCalendar:fullscreen .calendar-head-month,
#perfumeMonthCalendar.calendar-fallback-fullscreen .calendar-head-month{
  position:sticky;
  top:0;
  z-index:100;
  padding:4px 0 14px;
  background:rgba(250,247,246,.96);
}
#perfumeMonthCalendar:fullscreen .calendar-grid,
#perfumeMonthCalendar.calendar-fallback-fullscreen .calendar-grid{
  min-height:calc(100vh - 115px);
}
#perfumeMonthCalendar:fullscreen .day,
#perfumeMonthCalendar.calendar-fallback-fullscreen .day{
  min-height:calc((100vh - 170px)/6);
}
#perfumeMonthCalendar:fullscreen .calendar-photos,
#perfumeMonthCalendar.calendar-fallback-fullscreen .calendar-photos{
  height:clamp(92px,14vh,155px);
}
html[data-theme="dark"] #perfumeMonthCalendar:fullscreen,
html[data-theme="dark"] #perfumeMonthCalendar.calendar-fallback-fullscreen{
  background:#141414!important;
}
html[data-theme="dark"] #perfumeMonthCalendar:fullscreen .calendar-head-month,
html[data-theme="dark"] #perfumeMonthCalendar.calendar-fallback-fullscreen .calendar-head-month{
  background:rgba(20,20,20,.97);
}
#perfumeMonthCalendar.calendar-fallback-fullscreen{
  position:fixed;
  inset:0;
  z-index:9999;
}
body.calendar-fullscreen-open{overflow:hidden}
@media(max-width:850px){
  .calendar-head-month{grid-template-columns:46px auto 46px;gap:10px}
  .calendar-fullscreen-btn{grid-column:1/-1;margin:0;justify-self:start}
}


/* v14.53: explicit open-month action in 12-month calendar */
.mini-month-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:5px;
}
.mini-month-head h3{margin:0;}
.mini-month-open-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:5px 10px;
  border:1px solid rgba(229,123,163,.34);
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:#8d445f;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}
.mini-month-open-btn:hover{
  transform:translateY(-1px);
  background:#fff;
  border-color:rgba(229,123,163,.65);
}
html[data-theme="dark"] .mini-month-open-btn{
  background:#141414;
  color:#f6d3e0;
  border-color:#4b4542;
}
@media(max-width:560px){
  .mini-month-head{align-items:flex-start;flex-direction:column;}
}

/* v14.54: whole mini-month opens month view; explicit button removed */
.clickable-mini-month{cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.clickable-mini-month:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(54,36,43,.12);border-color:rgba(229,123,163,.55)}
.clickable-mini-month:focus-visible{outline:2px solid #e57ba3;outline-offset:3px}
.clickable-mini-month .mini-day{cursor:pointer}


/* v14.56: translucent preference rows everywhere */
.preference-translucent{
  background:#ffffff7d !important;
  border:1px solid rgba(255,255,255,.34);
  border-radius:12px;
  padding:10px 12px;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  box-sizing:border-box;
}
.preference-fields-row{align-items:stretch}
.preference-fields-row>.preference-translucent{height:100%}
.perfume-hover-card .preference-translucent{
  display:block;
  margin-top:6px;
  padding:7px 9px;
  border-radius:9px;
}
html[data-theme="dark"] .preference-translucent{
  background:#14141469 !important;
  border-color:rgba(255,255,255,.08);
  color:#f4efec;
}


/* v14.57: translucent legend rows inside every perfume-calendar mode */
.calendar-legend.calendar-legend-panel{
  margin:2px 0 16px;
  justify-content:flex-end;
  gap:10px;
}
.calendar-legend.calendar-legend-panel > span{
  background:#ffffff7d;
  border:1px solid rgba(255,255,255,.42);
  border-radius:12px;
  padding:8px 12px;
  box-shadow:0 4px 14px rgba(50,34,40,.05);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
html[data-theme="dark"] .calendar-legend.calendar-legend-panel > span{
  background:#14141469;
  border-color:rgba(255,255,255,.09);
  color:#f4efec;
  box-shadow:0 4px 14px rgba(0,0,0,.14);
}
#perfumeMonthCalendar:fullscreen .calendar-legend-panel,
#perfumeMonthCalendar.calendar-fallback-fullscreen .calendar-legend-panel{
  position:sticky;
  top:62px;
  z-index:99;
  margin:0 0 14px;
}
#perfumeMonthCalendar:fullscreen .calendar-legend-panel > span,
#perfumeMonthCalendar.calendar-fallback-fullscreen .calendar-legend-panel > span{
  background:#ffffff7d;
}
html[data-theme="dark"] #perfumeMonthCalendar:fullscreen .calendar-legend-panel > span,
html[data-theme="dark"] #perfumeMonthCalendar.calendar-fallback-fullscreen .calendar-legend-panel > span{
  background:#14141469;
}
@media(max-width:560px){
  .calendar-legend.calendar-legend-panel{justify-content:flex-start;gap:8px}
  .calendar-legend.calendar-legend-panel > span{padding:7px 9px}
}


/* v14.58: preference legend aligned with top calendar controls */
.calendar-legend-inline{margin:0!important;align-items:center;justify-content:flex-end!important;flex-wrap:wrap}
.calendar-head-year{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:12px}
.calendar-head-year h2{margin:0;text-align:center}
.calendar-head-month{grid-template-columns:54px minmax(180px,1fr) 54px auto 48px;align-items:center}
.calendar-head-month .calendar-fullscreen-btn{margin-left:0;width:48px;height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center}
#perfumeMonthCalendar:fullscreen .calendar-legend-inline,
#perfumeMonthCalendar.calendar-fallback-fullscreen .calendar-legend-inline{position:static;top:auto;z-index:auto;margin:0!important}
@media(max-width:900px){
 .calendar-head-year{grid-template-columns:auto 1fr auto}.calendar-head-year .calendar-legend-inline{grid-column:1/-1;justify-content:center!important}
 .calendar-head-month{grid-template-columns:46px 1fr 46px 48px}.calendar-head-month .calendar-legend-inline{grid-column:1/-1;grid-row:2;justify-content:center!important}.calendar-head-month .calendar-fullscreen-btn{grid-column:4;grid-row:1}
}
@media(max-width:560px){.calendar-legend-inline>span{font-size:10px;padding:6px 8px!important}}

/* v14.59: fit the complete perfume month calendar into the visible desktop viewport */
@media (min-width: 901px) and (min-height: 650px){
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen){
    height:calc(100dvh - 205px);
    min-height:500px;
    max-height:900px;
    padding:12px 14px 14px;
    display:flex;
    flex-direction:column;
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-head-month{
    flex:0 0 auto;
    margin-bottom:10px;
    gap:10px;
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-grid{
    flex:1 1 auto;
    min-height:0;
    grid-template-rows:32px;
    grid-auto-rows:minmax(0,1fr);
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .weekday{
    padding:7px 6px;
    min-height:0;
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .day{
    min-height:0;
    height:auto;
    padding:6px 7px;
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .day-top{
    min-height:18px;
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-photos{
    height:calc(100% - 22px);
    min-height:0;
    max-height:none;
    margin-top:2px;
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-perfume-thumb{
    min-height:0;
    padding-top:1px;
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-perfume-thumb>img{
    min-height:0;
  }
}

@media (min-width: 901px) and (max-height: 760px){
  .container{margin-top:18px;margin-bottom:20px}
  .perfume-calendar-hero{margin-bottom:6px}
  .perfume-calendar-hero .diary-section-title{font-size:40px}
  .perfume-calendar-hero .sub{margin-top:2px;font-size:12px}
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen){
    height:calc(100dvh - 170px);
    min-height:430px;
  }
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-head-month h2{font-size:28px}
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-arrow{height:42px;width:46px;font-size:30px}
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-head-month{grid-template-columns:46px minmax(170px,1fr) 46px auto 44px}
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-fullscreen-btn{width:44px;height:42px}
  #perfumeMonthCalendar:not(:fullscreen):not(.calendar-fallback-fullscreen) .calendar-legend-panel>span{padding:5px 8px;font-size:11px}
}

/* v14.60 — dedicated perfume entry page opened from calendar */
.perfume-entry-detail{background:#ffffff7d!important;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.perfume-entry-detail-grid{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:28px;align-items:start}
.perfume-entry-detail-photo img{display:block;width:100%;max-height:440px;object-fit:contain;border-radius:18px;background:#ffffff66}
.perfume-entry-detail-info h2{margin-top:0}
.perfume-entry-preferences{display:grid;gap:8px;margin:18px 0}
.perfume-entry-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:20px}
.perfume-entry-actions form{margin:0}
html[data-theme="dark"] .perfume-entry-detail{background:#14141469!important}
@media(max-width:700px){.perfume-entry-detail-grid{grid-template-columns:1fr}.perfume-entry-detail-photo img{max-height:320px}}


/* v14.61: click/tap dropdown perfume information cards in calendar */
.calendar-popup-trigger{cursor:pointer}
.calendar-popup-trigger.is-popup-open .perfume-hover-card{
  display:block !important;
  opacity:1 !important;
  visibility:visible !important;
  transform:translate(-50%,0) !important;
  pointer-events:auto;
}
.calendar-popup-trigger.is-popup-open{z-index:95}
.calendar-popup-trigger:focus-visible{outline:2px solid rgba(229,123,163,.72);outline-offset:2px}
@media (hover:none), (pointer:coarse){
  .calendar-popup-trigger:hover .perfume-hover-card{display:none}
  .calendar-popup-trigger.is-popup-open .perfume-hover-card{display:block !important}
}

/* v14.62: perfume info popup when hovering/focusing the calendar date */
.date-hover-trigger{position:relative;z-index:35;cursor:help}
.date-hover-trigger .date-hover-card{display:none;opacity:0;visibility:hidden;pointer-events:none;left:50%;bottom:calc(100% + 10px);transform:translate(-50%,6px)}
.date-hover-trigger:hover .date-hover-card,
.date-hover-trigger:focus .date-hover-card,
.date-hover-trigger:focus-within .date-hover-card{display:block;opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0)}
.date-hover-trigger:focus-visible{outline:2px solid rgba(229,123,163,.72);outline-offset:2px}
.day:nth-child(7n+1) .date-hover-card,
.day:nth-child(7n+2) .date-hover-card{left:0;transform:translate(0,6px)}
.day:nth-child(7n+1) .date-hover-trigger:hover .date-hover-card,
.day:nth-child(7n+2) .date-hover-trigger:hover .date-hover-card,
.day:nth-child(7n+1) .date-hover-trigger:focus-within .date-hover-card,
.day:nth-child(7n+2) .date-hover-trigger:focus-within .date-hover-card{transform:translate(0,0)}
.day:nth-child(7n) .date-hover-card,
.day:nth-child(7n+6) .date-hover-card{left:auto;right:0;transform:translate(0,6px)}
.day:nth-child(7n) .date-hover-trigger:hover .date-hover-card,
.day:nth-child(7n+6) .date-hover-trigger:hover .date-hover-card,
.day:nth-child(7n) .date-hover-trigger:focus-within .date-hover-card,
.day:nth-child(7n+6) .date-hover-trigger:focus-within .date-hover-card{transform:translate(0,0)}
.year-date-hover-card{width:300px;min-width:280px;left:50%;z-index:250}
.mini-day{overflow:visible}
.mini-day-thumb{overflow:hidden;border-radius:7px}
.mini-day-number.date-hover-trigger{z-index:60}
@media (hover:none), (pointer:coarse){
  .date-hover-trigger .date-hover-card{display:none!important}
}

/* v14.64 — show the day's perfume info when hovering anywhere inside the calendar day */
@media (hover:hover) and (pointer:fine){
  .day:not(.empty):has(.date-hover-card):hover .date-hover-card,
  .day:not(.empty):has(.date-hover-card):focus-within .date-hover-card,
  .mini-day.has-photo:has(.date-hover-card):hover .date-hover-card,
  .mini-day.has-photo:has(.date-hover-card):focus-within .date-hover-card{
    display:block;
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }

  .day:nth-child(7n+1):hover .date-hover-card,
  .day:nth-child(7n+2):hover .date-hover-card,
  .day:nth-child(7n+1):focus-within .date-hover-card,
  .day:nth-child(7n+2):focus-within .date-hover-card{
    transform:translate(0,0);
  }

  .day:nth-child(7n):hover .date-hover-card,
  .day:nth-child(7n+6):hover .date-hover-card,
  .day:nth-child(7n):focus-within .date-hover-card,
  .day:nth-child(7n+6):focus-within .date-hover-card{
    transform:translate(0,0);
  }

  .mini-day.has-photo:hover .year-date-hover-card,
  .mini-day.has-photo:focus-within .year-date-hover-card{
    transform:translate(-50%,0);
  }
}

/* v14.65 — keep the month-day information popup fully inside the viewport */
@media (hover:hover) and (pointer:fine){
  .calendar-grid .day .date-hover-card.viewport-fit-popup{
    position:fixed !important;
    z-index:1200 !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    margin:0 !important;
    max-width:calc(100vw - 24px) !important;
    max-height:calc(100vh - 24px) !important;
    overflow:auto !important;
    overscroll-behavior:contain;
  }
  .calendar-grid .day .date-hover-card.viewport-fit-popup::after{
    display:none !important;
  }
}


/* v14.66 — floating month popup is attached to <body>, so no calendar container can crop it */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup{
    position:fixed !important;
    z-index:99999 !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    margin:0 !important;
    width:min(390px, calc(100vw - 24px)) !important;
    min-width:0 !important;
    max-width:calc(100vw - 24px) !important;
    max-height:calc(100vh - 24px) !important;
    overflow:auto !important;
    overscroll-behavior:contain;
    box-sizing:border-box;
    display:block !important;
    opacity:1 !important;
    pointer-events:auto !important;
  }
  body > .perfume-hover-card.calendar-floating-popup::after{
    display:none !important;
  }
}

/* v14.68 — month popup always drops down and appears smoothly */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup{
    transform:translateY(8px) !important;
    opacity:0 !important;
    transition:opacity .18s ease, transform .18s ease !important;
    will-change:opacity, transform;
  }
  body > .perfume-hover-card.calendar-floating-popup.is-visible{
    transform:translateY(0) !important;
    opacity:1 !important;
  }
}


/* v14.69 — cache-busted month popup behavior: always downward + smooth reveal */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup{
    transform:translate3d(0,10px,0) !important;
    opacity:0 !important;
    visibility:visible !important;
    transition:opacity .22s ease, transform .22s ease !important;
  }
  body > .perfume-hover-card.calendar-floating-popup.is-visible{
    transform:translate3d(0,0,0) !important;
    opacity:1 !important;
  }
}


/* v14.70 — clearly mark the currently active diary section in the top navigation */
.topbar .main-nav a{
  position:relative;
  padding:8px 11px;
  border-radius:11px;
  transition:background-color .18s ease,color .18s ease,box-shadow .18s ease;
}
.topbar .main-nav a:hover{
  background:rgba(229,123,163,.12);
}
.topbar .main-nav a.active,
.topbar .main-nav a[aria-current="page"]{
  color:#7b2849;
  background:rgba(229,123,163,.24);
  box-shadow:inset 0 0 0 1px rgba(229,123,163,.36);
  font-weight:800;
}
.topbar .main-nav a.active::after,
.topbar .main-nav a[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:11px;
  right:11px;
  bottom:3px;
  height:2px;
  border-radius:999px;
  background:#e57ba3;
}
html[data-theme="dark"] .topbar .main-nav a.active,
html[data-theme="dark"] .topbar .main-nav a[aria-current="page"]{
  color:#ffd5e4;
  background:rgba(229,123,163,.23);
  box-shadow:inset 0 0 0 1px rgba(255,213,228,.20);
}
@media(max-width:560px){
  .topbar .main-nav a{padding:6px 7px;border-radius:9px}
  .topbar .main-nav a.active::after,
  .topbar .main-nav a[aria-current="page"]::after{left:7px;right:7px;bottom:2px}
}

/* v14.71 — switch statistics between perfume, books and movies */
.stats-section-tabs{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin:-2px 0 20px;
  padding:7px;
  width:max-content;
  max-width:100%;
  background:#ffffff7d;
  border:1px solid rgba(255,255,255,.36);
  border-radius:15px;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.stats-section-tabs a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:104px;
  padding:9px 16px;
  border-radius:11px;
  color:inherit;
  text-decoration:none;
  font-weight:700;
  transition:background-color .18s ease,box-shadow .18s ease,color .18s ease,transform .18s ease;
}
.stats-section-tabs a:hover{background:rgba(229,123,163,.13)}
.stats-section-tabs a.active{
  background:rgba(229,123,163,.30);
  box-shadow:inset 0 0 0 1px rgba(229,123,163,.42),0 2px 8px rgba(70,30,45,.08);
  color:#762646;
}
.stats-media-grid{margin-top:20px}
.compact-stat-row.static{cursor:default;display:flex;justify-content:space-between;gap:16px}
.stats-creator-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
html[data-theme="dark"] .stats-section-tabs{background:#14141469;border-color:rgba(255,255,255,.10)}
html[data-theme="dark"] .stats-section-tabs a.active{color:#ffd5e4;background:rgba(229,123,163,.24);box-shadow:inset 0 0 0 1px rgba(255,213,228,.18)}
@media(max-width:560px){.stats-section-tabs{width:100%;box-sizing:border-box}.stats-section-tabs a{min-width:0;flex:1;padding:8px 9px}}


/* v14.72 — month hover hint opens to the left and fades/slides both ways */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup{
    opacity:0 !important;
    transform:translate3d(12px,0,0) !important;
    visibility:visible !important;
    transition:opacity .24s ease, transform .24s ease !important;
    will-change:opacity,transform;
  }
  body > .perfume-hover-card.calendar-floating-popup.is-visible{
    opacity:1 !important;
    transform:translate3d(0,0,0) !important;
  }
}


/* v14.73 — popup stays to the left; animation moves downward */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup{
    opacity:0 !important;
    transform:translate3d(0,-12px,0) !important;
    visibility:visible !important;
    transition:opacity .28s ease, transform .28s ease !important;
    will-change:opacity,transform;
  }
  body > .perfume-hover-card.calendar-floating-popup.is-visible{
    opacity:1 !important;
    transform:translate3d(0,0,0) !important;
  }
}


/* v14.74 — month popup opens below the hovered day and glides downward */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup{
    opacity:0 !important;
    transform:translate3d(0,-12px,0) !important;
    visibility:visible !important;
    transition:opacity .30s ease, transform .30s ease !important;
    will-change:opacity,transform;
  }
  body > .perfume-hover-card.calendar-floating-popup.is-visible{
    opacity:1 !important;
    transform:translate3d(0,0,0) !important;
  }
}

/* v14.75 — year-view popup is rendered directly under <body>, above every mini-month. */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-year-floating-popup{
    position:fixed !important;
    z-index:2147483000 !important;
    right:auto !important;
    bottom:auto !important;
    margin:0 !important;
    width:min(330px, calc(100vw - 24px)) !important;
    min-width:0 !important;
    max-width:calc(100vw - 24px) !important;
    max-height:calc(100vh - 24px) !important;
    overflow:auto !important;
    overscroll-behavior:contain;
    box-sizing:border-box;
    display:block !important;
    visibility:visible !important;
    pointer-events:auto !important;
    opacity:0 !important;
    transform:translate3d(0,-10px,0) !important;
    transition:opacity .25s ease, transform .25s ease !important;
    will-change:opacity,transform;
    isolation:isolate;
  }
  body > .perfume-hover-card.calendar-year-floating-popup.is-visible{
    opacity:1 !important;
    transform:translate3d(0,0,0) !important;
  }
  body > .perfume-hover-card.calendar-year-floating-popup::after{
    display:none !important;
  }
  body > .perfume-hover-card.calendar-year-floating-popup .hover-card-top img{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
  }
}

/* v14.77 — bottom-row month popup must stay fully inside the viewport. */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup{
    scrollbar-gutter:stable;
  }
}


/* v14.78 — month popup is clamped as a whole to the visible viewport. */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup{
    z-index:2147483000 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    contain:layout paint;
  }
}


/* v14.79 — bottom two rows of month view open their popup above the day. */
@media (hover:hover) and (pointer:fine){
  body > .perfume-hover-card.calendar-floating-popup.calendar-popup-above{
    z-index:2147483000 !important;
  }
}
\n\n/* v14.80 — month day status icons sit to the left of the date, aligned with rating. */\n#perfumeMonthCalendar .day-top{display:flex;align-items:center;justify-content:space-between;gap:8px}\n#perfumeMonthCalendar .day-top-left{display:flex;align-items:center;gap:5px;min-width:0}\n#perfumeMonthCalendar .day-status-icons{display:inline-flex;align-items:center;gap:3px;min-height:18px;flex:0 0 auto}\n#perfumeMonthCalendar .day-status-star,\n#perfumeMonthCalendar .day-status-heart{display:inline-flex;align-items:center;justify-content:center;font-size:15px;line-height:1;text-shadow:0 1px 3px rgba(255,255,255,.88)}\n#perfumeMonthCalendar .day-status-star{color:#96ad63}\n#perfumeMonthCalendar .day-status-heart{color:#df6572}\n#perfumeMonthCalendar .day-number{display:inline-flex;align-items:center}\n#perfumeMonthCalendar .day-rating{margin-left:auto;white-space:nowrap}\n#perfumeMonthCalendar > .calendar-grid > .day > .calendar-choice-star{display:none!important}\n#perfumeMonthCalendar .calendar-perfume-thumb .repurchase-star{color:#96ad63!important}\n#perfumeMonthCalendar .legend-star{color:#96ad63!important}\nhtml[data-theme="dark"] #perfumeMonthCalendar .day-status-star,\nhtml[data-theme="dark"] #perfumeMonthCalendar .calendar-perfume-thumb .repurchase-star,\nhtml[data-theme="dark"] #perfumeMonthCalendar .legend-star{color:#83a27c!important;text-shadow:none}\n@media(max-width:560px){\n  #perfumeMonthCalendar .day-status-icons{gap:2px}\n  #perfumeMonthCalendar .day-status-star,#perfumeMonthCalendar .day-status-heart{font-size:12px}\n}\n

/* v14.81 — status markers belong to the date/header row in each month cell. */
#perfumeMonthCalendar .day-top{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  column-gap:8px!important;
  min-height:20px;
}
#perfumeMonthCalendar .day-top-left{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  min-width:0!important;
}
#perfumeMonthCalendar .day-status-icons{
  display:inline-flex!important;
  align-items:center!important;
  gap:3px!important;
  flex:0 0 auto!important;
  order:0;
}
#perfumeMonthCalendar .day-number{
  order:1;
  flex:0 0 auto;
  margin:0!important;
}
#perfumeMonthCalendar .day-rating{
  grid-column:2;
  justify-self:end;
  align-self:center;
  margin:0!important;
  white-space:nowrap;
}
#perfumeMonthCalendar .day-status-star{
  color:#96ad63!important; /* light natural moss/leaf green from the site background */
}
#perfumeMonthCalendar .calendar-perfume-thumb .repurchase-star,
#perfumeMonthCalendar .legend-star{
  color:#96ad63!important;
}
html[data-theme="dark"] #perfumeMonthCalendar .day-status-star,
html[data-theme="dark"] #perfumeMonthCalendar .calendar-perfume-thumb .repurchase-star,
html[data-theme="dark"] #perfumeMonthCalendar .legend-star{
  color:#a8bf78!important;
}


/* v14.83 — month cell: repurchase heart left of date, choose-again star immediately right of date. */
#perfumeMonthCalendar .day-top-left{
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  min-width:0!important;
}
#perfumeMonthCalendar .day-top-left > .day-status-heart{
  order:0!important;
  flex:0 0 auto!important;
}
#perfumeMonthCalendar .day-top-left > .day-number{
  order:1!important;
  flex:0 0 auto!important;
}
#perfumeMonthCalendar .day-top-left > .day-status-star{
  order:2!important;
  flex:0 0 auto!important;
  margin-left:1px!important;
}
#perfumeMonthCalendar .day-status-star,
#perfumeMonthCalendar .day-status-heart{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:15px!important;
  line-height:1!important;
}
#perfumeMonthCalendar .day-status-star{color:#96ad63!important;}
#perfumeMonthCalendar .day-status-heart{color:#df6572!important;}
@media(max-width:560px){
  #perfumeMonthCalendar .day-top-left{gap:2px!important;}
  #perfumeMonthCalendar .day-status-star,
  #perfumeMonthCalendar .day-status-heart{font-size:12px!important;}
}

/* v14.85 — month cell status order is strictly: date → choose-again star → repurchase heart → rating. */
#perfumeMonthCalendar .day-top-left > .day-number{order:0!important;}
#perfumeMonthCalendar .day-top-left > .day-status-star{order:1!important;margin-left:2px!important;margin-right:0!important;}
#perfumeMonthCalendar .day-top-left > .day-status-heart{order:2!important;margin-left:0!important;margin-right:0!important;}

/* v14.85 — month cell status order is strictly: date → choose-again star → repurchase heart → rating. */
#perfumeMonthCalendar .day-top-left > .day-number{order:0!important;}
#perfumeMonthCalendar .day-top-left > .day-status-star{order:1!important;margin-left:2px!important;margin-right:0!important;}
#perfumeMonthCalendar .day-top-left > .day-status-heart{order:2!important;margin-left:0!important;margin-right:0!important;}


/* v14.86 — year perfume calendar: date → choose-again star → repurchase heart; no duplicate photo badges. */
.year-calendar-card .mini-day-number{
  display:inline-flex!important;
  align-items:center!important;
  gap:2px!important;
  white-space:nowrap!important;
}
.year-calendar-card .mini-day-status-star,
.year-calendar-card .mini-day-status-heart{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  position:static!important;
  width:auto!important;
  height:auto!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  font-size:11px!important;
  line-height:1!important;
  pointer-events:none!important;
}
.year-calendar-card .mini-day-status-star{color:#96ad63!important;}
.year-calendar-card .mini-day-status-heart{color:#df6572!important;}
.year-calendar-card .mini-day-thumb > .repurchase-star,
.year-calendar-card .mini-day-thumb > .repurchase-heart,
.year-calendar-card .mini-calendar-choice-star{display:none!important;}
.year-calendar-card .legend-star{color:#96ad63!important;}
html[data-theme="dark"] .year-calendar-card .mini-day-status-star,
html[data-theme="dark"] .year-calendar-card .legend-star{color:#83a27c!important;}

/* v14.87 — perfume calendars: reserve separate space for date/statuses and photos so nothing overlaps. */
.year-calendar-card .mini-day{
  position:relative!important;
  overflow:hidden!important;
  isolation:isolate;
  padding:0!important;
}
.year-calendar-card .mini-day.has-photo{
  display:block!important;
}
.year-calendar-card .mini-day.has-photo .mini-day-number{
  position:absolute!important;
  top:2px!important;
  left:2px!important;
  right:2px!important;
  z-index:4!important;
  width:auto!important;
  min-width:0!important;
  height:18px!important;
  padding:0 3px!important;
  border-radius:5px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  white-space:nowrap!important;
  overflow:visible!important;
  background:rgba(255,255,255,.90)!important;
  box-shadow:0 1px 3px rgba(0,0,0,.14)!important;
}
.year-calendar-card .mini-day.has-photo .mini-day-thumb{
  position:absolute!important;
  top:22px!important;
  right:2px!important;
  bottom:2px!important;
  left:2px!important;
  z-index:1!important;
  overflow:hidden!important;
  border-radius:5px!important;
}
.year-calendar-card .mini-day.has-photo .mini-day-thumb img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
}
.year-calendar-card .mini-date-value{
  flex:0 0 auto!important;
  font-size:10px!important;
  line-height:1!important;
}
.year-calendar-card .mini-day-status-star,
.year-calendar-card .mini-day-status-heart{
  flex:0 0 auto!important;
  font-size:10px!important;
  line-height:1!important;
  margin:0!important;
}
.year-calendar-card .mini-day:not(.has-photo) .mini-day-number{
  max-width:calc(100% - 4px)!important;
}
html[data-theme="dark"] .year-calendar-card .mini-day.has-photo .mini-day-number{
  background:rgba(20,20,20,.90)!important;
  color:#fff!important;
}

/* Month view: keep the header line independent from the photo area. */
#perfumeMonthCalendar .day{
  overflow:hidden;
}
#perfumeMonthCalendar .day-top{
  min-height:20px!important;
  flex:0 0 auto!important;
}
#perfumeMonthCalendar .day-top-left{
  flex:0 1 auto!important;
  min-width:0!important;
  white-space:nowrap!important;
}
#perfumeMonthCalendar .day-number,
#perfumeMonthCalendar .day-status-star,
#perfumeMonthCalendar .day-status-heart,
#perfumeMonthCalendar .day-rating{
  flex:0 0 auto!important;
}
#perfumeMonthCalendar .calendar-photos{
  min-height:0!important;
  position:relative!important;
  z-index:1!important;
}
@media(max-width:850px){
  .year-calendar-card .mini-day.has-photo .mini-day-number{height:17px!important;gap:1px!important;padding:0 2px!important;}
  .year-calendar-card .mini-day.has-photo .mini-day-thumb{top:21px!important;}
  .year-calendar-card .mini-date-value,
  .year-calendar-card .mini-day-status-star,
  .year-calendar-card .mini-day-status-heart{font-size:9px!important;}
  #perfumeMonthCalendar .day-top{gap:4px!important;}
  #perfumeMonthCalendar .day-rating{font-size:10px!important;}
}

/* v14.88 — taller perfume year-calendar date cells so perfume photos stay fully visible. */
.year-calendar-card .mini-calendar-grid{
  align-items:stretch;
}
.year-calendar-card .mini-day{
  aspect-ratio:auto!important;
  min-height:64px!important;
}
.year-calendar-card .mini-day.empty,
.year-calendar-card .mini-day:not(.has-photo){
  min-height:64px!important;
}
.year-calendar-card .mini-day.has-photo .mini-day-thumb img{
  object-fit:contain!important;
  object-position:center center!important;
  background:rgba(255,255,255,.30);
}
html[data-theme="dark"] .year-calendar-card .mini-day.has-photo .mini-day-thumb img{
  background:rgba(20,20,20,.24);
}
@media (min-width:1200px){
  .year-calendar-card .mini-day{min-height:70px!important;}
  .year-calendar-card .mini-day.empty,
  .year-calendar-card .mini-day:not(.has-photo){min-height:70px!important;}
}
@media (max-width:850px){
  .year-calendar-card .mini-day{min-height:58px!important;}
  .year-calendar-card .mini-day.empty,
  .year-calendar-card .mini-day:not(.has-photo){min-height:58px!important;}
}
@media (max-width:600px){
  .year-calendar-card .mini-day{min-height:72px!important;}
  .year-calendar-card .mini-day.empty,
  .year-calendar-card .mini-day:not(.has-photo){min-height:72px!important;}
}

/* v14.89 — year perfume calendar: lift date/status strip clear above the photo. */
.year-calendar-card .mini-day.has-photo .mini-day-number{
  top:2px!important;
  height:20px!important;
  z-index:8!important;
  padding:0 4px!important;
}
.year-calendar-card .mini-day.has-photo .mini-day-thumb{
  top:27px!important;
}
.year-calendar-card .mini-day-status-star,
.year-calendar-card .mini-day-status-heart{
  position:relative!important;
  z-index:9!important;
}
@media(max-width:850px){
  .year-calendar-card .mini-day.has-photo .mini-day-number{height:19px!important;}
  .year-calendar-card .mini-day.has-photo .mini-day-thumb{top:25px!important;}
}
@media(max-width:600px){
  .year-calendar-card .mini-day.has-photo .mini-day-number{height:20px!important;}
  .year-calendar-card .mini-day.has-photo .mini-day-thumb{top:27px!important;}
}

/* v14.90 — today's date: one consistent translucent light-pink highlight in every calendar */
.day.today,
.mini-day.today{
  background:rgba(255, 205, 225, .58) !important;
  border-color:rgba(229,123,163,.52) !important;
  outline:none !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28) !important;
}
.day.today:hover{
  background:rgba(255, 205, 225, .68) !important;
  border-color:rgba(229,123,163,.68) !important;
}
.mini-day.today{
  outline:none !important;
  outline-offset:0 !important;
}
html[data-theme="dark"] .day.today,
html[data-theme="dark"] .mini-day.today{
  background:rgba(229,123,163,.28) !important;
  border-color:rgba(242,160,191,.56) !important;
  box-shadow:inset 0 0 0 1px rgba(255,210,228,.10) !important;
}

/* v14.91 — explicit today highlight for MONTH view in all diary sections */
.calendar-card .calendar-grid > .day.today,
#perfumeMonthCalendar .calendar-grid > .day.today{
  background:rgba(255,205,225,.62) !important;
  border-color:rgba(229,123,163,.56) !important;
  outline:none !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.32), 0 4px 14px rgba(229,123,163,.10) !important;
}
.calendar-card .calendar-grid > .day.today .day-number,
#perfumeMonthCalendar .calendar-grid > .day.today .day-number{
  background:rgba(255,235,243,.72) !important;
  border-radius:8px;
  padding:2px 6px;
}
.calendar-card .calendar-grid > .day.today:hover,
#perfumeMonthCalendar .calendar-grid > .day.today:hover{
  background:rgba(255,205,225,.72) !important;
  border-color:rgba(229,123,163,.72) !important;
}
html[data-theme="dark"] .calendar-card .calendar-grid > .day.today,
html[data-theme="dark"] #perfumeMonthCalendar .calendar-grid > .day.today{
  background:rgba(229,123,163,.30) !important;
  border-color:rgba(242,160,191,.60) !important;
}
html[data-theme="dark"] .calendar-card .calendar-grid > .day.today .day-number,
html[data-theme="dark"] #perfumeMonthCalendar .calendar-grid > .day.today .day-number{
  background:rgba(229,123,163,.20) !important;
}

/* v14.92 — month view: keep today's pink fill, remove the pink frame */
.calendar-card .calendar-grid > .day.today,
#perfumeMonthCalendar .calendar-grid > .day.today,
.calendar-card .calendar-grid > .day.today:hover,
#perfumeMonthCalendar .calendar-grid > .day.today:hover{
  border-color:var(--border) !important;
  outline:none !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .calendar-card .calendar-grid > .day.today,
html[data-theme="dark"] #perfumeMonthCalendar .calendar-grid > .day.today,
html[data-theme="dark"] .calendar-card .calendar-grid > .day.today:hover,
html[data-theme="dark"] #perfumeMonthCalendar .calendar-grid > .day.today:hover{
  border-color:#4b4542 !important;
  outline:none !important;
  box-shadow:none !important;
}


/* v14.93: today page date is white in light/day theme */
html:not([data-theme="dark"]) .today-page-date{color:#fff !important;}

/* v14.95 — active navigation: keep the soft highlight, remove the lower underline */
.topbar .main-nav a.active::after,
.topbar .main-nav a[aria-current="page"]::after{
  content:none !important;
  display:none !important;
}

/* v14.96: decorative heart above the Galina Diary brand, upper-right */
.brand{position:relative;display:inline-block;}
.brand .brand-heart{position:absolute;right:-13px;top:-10px;color:#c85f86;font-family:Arial,sans-serif;font-size:15px;line-height:1;text-shadow:0 1px 2px rgba(126,54,81,.12);pointer-events:none;}
html[data-theme="dark"] .brand .brand-heart{color:#cf6f91;}
@media(max-width:560px){.brand .brand-heart{right:-11px;top:-8px;font-size:13px;}}

/* v14.97: heart directly above the final "y" in Diary */
.brand .brand-heart{
  right:-1px !important;
  top:-10px !important;
  transform:translateX(18%) !important;
}
@media(max-width:560px){
  .brand .brand-heart{right:-1px !important;top:-8px !important;transform:translateX(18%) !important;}
}


/* v14.98: anchor the decorative heart to the Diary word itself, above the final Y */
.brand .brand-diary{position:relative;display:inline-block;}
.brand .brand-diary .brand-heart{
  position:absolute !important;
  right:-7px !important;
  top:-11px !important;
  transform:none !important;
  color:#c85f86;
  font-family:Arial,sans-serif;
  font-size:15px;
  line-height:1;
  pointer-events:none;
}
html[data-theme="dark"] .brand .brand-diary .brand-heart{color:#cf6f91;}
@media(max-width:560px){
  .brand .brand-diary .brand-heart{right:-6px !important;top:-9px !important;font-size:13px;}
}

/* v14.99: heart diagonally above-right of the final y in Diary */
.brand .brand-diary .brand-heart{
  right:-12px !important;
  top:-14px !important;
  transform:rotate(8deg) !important;
}
@media(max-width:560px){
  .brand .brand-diary .brand-heart{
    right:-10px !important;
    top:-11px !important;
    transform:rotate(8deg) !important;
  }
}

/* v15.00: lower the heart and bring it closer to the final y */
.brand .brand-diary .brand-heart{
  right:-7px !important;
  top:-8px !important;
  transform:rotate(8deg) !important;
}
@media(max-width:560px){
  .brand .brand-diary .brand-heart{
    right:-6px !important;
    top:-7px !important;
    transform:rotate(8deg) !important;
  }
}

/* v15.01 — remove frames around calendar numbers and top navigation labels */
/* Calendar date numbers: no pill/box/frame around the numeral. */
.calendar-card .day-number,
#perfumeMonthCalendar .day-number,
.year-calendar-card .mini-day-number,
.calendar-card .calendar-grid > .day.today .day-number,
#perfumeMonthCalendar .calendar-grid > .day.today .day-number,
html[data-theme="dark"] .calendar-card .calendar-grid > .day.today .day-number,
html[data-theme="dark"] #perfumeMonthCalendar .calendar-grid > .day.today .day-number{
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
  background:transparent !important;
}

/* Top navigation: no border/frame around section names, including active item. */
.topbar .main-nav a,
.topbar .main-nav a:hover,
.topbar .main-nav a.active,
.topbar .main-nav a[aria-current="page"],
html[data-theme="dark"] .topbar .main-nav a.active,
html[data-theme="dark"] .topbar .main-nav a[aria-current="page"]{
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
}

/* v15.02 — remove borders/frames around calendar day cells in month and year views. */
.calendar-grid,
.mini-calendar-grid{
  border:none !important;
}
.calendar-grid .day,
.mini-calendar-grid .mini-day,
.year-calendar-card .mini-day,
#perfumeMonthCalendar .day,
.calendar-card .calendar-grid > .day{
  border:none !important;
  outline:none !important;
}
.calendar-grid .day:hover,
.mini-calendar-grid .mini-day:hover,
.year-calendar-card .mini-day:hover,
#perfumeMonthCalendar .day:hover{
  border:none !important;
  outline:none !important;
}
.day.empty,
.mini-day.empty{
  border:none !important;
}
html[data-theme="dark"] .calendar-grid,
html[data-theme="dark"] .mini-calendar-grid,
html[data-theme="dark"] .calendar-grid .day,
html[data-theme="dark"] .mini-calendar-grid .mini-day{
  border:none !important;
  outline:none !important;
}

/* v15.03 — statistics: choose-again star in the upper-left corner of perfume images. */
.stats-transparent-page .shelf-item.repurchase-markable .repurchase-star,
.stats-transparent-page .stat-perfume-card.repurchase-markable .repurchase-star{
  top:7px!important;
  left:7px!important;
  right:auto!important;
  z-index:20!important;
}

/* v15.05 — statistics: show perfumers in batches of 10. */
.perfumer-item-hidden{display:none!important;}
.perfumer-next-btn{
  display:block;
  margin:10px auto 0;
  padding:4px 10px;
  border:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:3px;
}
.perfumer-next-btn:hover{opacity:.72;}

/* v15.06 — perfumer pagination controls */
.perfumer-pagination-controls{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:12px;}
.perfumer-pagination-controls .perfumer-next-btn,.perfumer-collapse-btn{margin-top:0;}
.perfumer-collapse-btn{border:0;background:transparent;color:var(--text);font:inherit;cursor:pointer;padding:8px 14px;}
.perfumer-collapse-btn:hover{opacity:.72;}


/* v15.07 — statistics: release years pagination, 10 at a time. */
.year-item-hidden{display:none!important;}
.year-pagination-controls{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:12px;}
.year-next-btn,.year-collapse-btn{border:0;background:transparent;color:var(--text);font:inherit;cursor:pointer;padding:8px 14px;}
.year-next-btn{text-decoration:underline;text-underline-offset:3px;}
.year-next-btn:hover,.year-collapse-btn:hover{opacity:.72;}


/* v15.08 — statistics: notes and all entries pagination, 10 at a time. */
.note-item-hidden,.entry-item-hidden{display:none!important;}
.notes-pagination-controls,.entries-pagination-controls{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:12px;}
.notes-next-btn,.notes-collapse-btn,.entries-next-btn,.entries-collapse-btn{border:0;background:transparent;color:var(--text);font:inherit;cursor:pointer;padding:8px 14px;}
.notes-next-btn,.entries-next-btn{text-decoration:underline;text-underline-offset:3px;}
.notes-next-btn:hover,.notes-collapse-btn:hover,.entries-next-btn:hover,.entries-collapse-btn:hover{opacity:.72;}

/* v15.09 — movie collection with custom shelves, separate from calendar entries. */
.movie-collection-tools{align-items:start;margin-bottom:20px;}
.collection-form-card{height:auto;}
.collection-shelves-wrap{display:grid;gap:18px;}
.movie-shelf-section{overflow:hidden;}
.movie-shelf-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px;}
.movie-shelf-head h2{margin:0 0 4px;}
.movie-collection-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:16px;}
.collection-movie-card{min-width:0;display:flex;flex-direction:column;gap:9px;}
.collection-poster{display:flex;width:100%;aspect-ratio:2/3;border-radius:12px;overflow:hidden;background:rgba(255,255,255,.35);text-decoration:none;color:var(--muted);align-items:center;justify-content:center;}
.collection-poster img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .18s ease;}
.collection-movie-card:hover .collection-poster img{transform:scale(1.025);}
.collection-poster-empty{padding:12px;text-align:center;border:1px dashed rgba(0,0,0,.12);}
.collection-movie-info h3{margin:0 0 5px;font-size:16px;line-height:1.25;}
.collection-movie-info h3 a{color:inherit;text-decoration:none;}
.collection-card-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:auto;}
.collection-card-actions form{margin:0;}
.collection-small-btn{padding:6px 9px;font-size:12px;}
html[data-theme="dark"] .collection-poster{background:rgba(20,20,20,.45);}
html[data-theme="dark"] .collection-poster-empty{border-color:rgba(255,255,255,.12);}
@media(max-width:700px){.movie-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.movie-shelf-head{align-items:flex-start;}.movie-collection-tools{grid-template-columns:1fr;}}


/* v15.10 — latest perfume page heading colors retained. */
html:not([data-theme="dark"]) .perfume-day-date{color:#fff !important;}
.edit-page-title{color:#fff !important;}


/* v15.11 — Thoughts restored */
.thought-entry{display:flex;gap:18px;align-items:flex-start;margin:0 0 18px;padding:16px;border-radius:16px;background:rgba(255,255,255,.28)}
.thought-entry:last-child{margin-bottom:0}
.thought-entry-image{width:150px;max-width:32%;height:auto;max-height:230px;object-fit:contain;border-radius:12px;flex:0 0 auto}
.thought-entry-body{min-width:0;flex:1}
.thought-entry-body h3{margin-top:0}
.thought-text{white-space:normal;line-height:1.7;overflow-wrap:anywhere;margin-bottom:16px}
.thought-image-preview-wrap{margin-top:4px;padding:12px;border-radius:14px;background:rgba(255,255,255,.24)}
.thought-image-preview{display:block;max-width:260px;max-height:320px;width:auto;height:auto;object-fit:contain;border-radius:10px}
html[data-theme="dark"] .thought-entry,html[data-theme="dark"] .thought-image-preview-wrap{background:rgba(20,20,20,.28)}
@media(max-width:600px){.thought-entry{display:block}.thought-entry-image{width:auto;max-width:100%;max-height:300px;margin-bottom:14px}.thought-image-preview{max-width:100%}}

/* v15.16 — statistics section tabs without pink outline */
.stats-section-tabs a.active{
  box-shadow:none !important;
}
html[data-theme="dark"] .stats-section-tabs a.active{
  box-shadow:none !important;
}


/* v15.18 — movie edit page */
.movie-edit-title{color:#fff !important;}
.movie-edit-poster-preview{margin:0 0 12px;display:flex;align-items:flex-start;}
.movie-edit-poster-preview img{display:block;width:min(220px,100%);max-height:330px;object-fit:contain;border-radius:12px;}
.movie-edit-poster-preview .preview{width:min(220px,100%);aspect-ratio:2/3;}

/* v15.18.1: movie edit page — guaranteed white title and visible poster */
.movie-edit-title{color:#fff !important;}
.movie-edit-main-poster{display:flex;justify-content:flex-start;margin:0 0 18px;}
.movie-edit-main-poster img{display:block;width:min(240px,100%);height:auto;max-height:360px;object-fit:contain;border-radius:14px;}
.movie-edit-no-poster{width:220px;aspect-ratio:2/3;display:flex;align-items:center;justify-content:center;border-radius:14px;background:rgba(255,255,255,.25);color:var(--muted);}
html[data-theme="dark"] .movie-edit-no-poster{background:rgba(20,20,20,.35);}


/* v15.18.2 — transparent surfaces across every Movies page */
.movie-transparent-page .card,
.movie-transparent-page .metric,
.movie-transparent-page .table,
.movie-transparent-page .table-wrap,
.movie-transparent-page .entry,
.movie-transparent-page .calendar-transparent-card,
.movie-transparent-page .year-calendar-card,
.movie-transparent-page .mini-month,
.movie-transparent-page .mini-calendar-grid,
.movie-transparent-page .calendar-grid,
.movie-transparent-page .mini-day:not(.empty),
.movie-transparent-page .day:not(.empty),
.movie-transparent-page .collection-form-card,
.movie-transparent-page .movie-shelf-section,
.movie-transparent-page .collection-movie-card,
.movie-transparent-page .translucent-edit-card,
.movie-transparent-page .selected-date-transparent > section,
.movie-transparent-page .saved-perfume-picker,
.movie-transparent-page .preview,
.movie-transparent-page .movie-edit-poster-preview .preview,
.movie-transparent-page .movie-edit-no-poster {
  background-color:rgba(255,255,255,.49) !important;
  background-image:none !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.movie-transparent-page table,
.movie-transparent-page table thead,
.movie-transparent-page table tbody,
.movie-transparent-page table tr,
.movie-transparent-page table th,
.movie-transparent-page table td,
.movie-transparent-page .table th,
.movie-transparent-page .table td {
  background:transparent !important;
}
html[data-theme="dark"] .movie-transparent-page .card,
html[data-theme="dark"] .movie-transparent-page .metric,
html[data-theme="dark"] .movie-transparent-page .table,
html[data-theme="dark"] .movie-transparent-page .table-wrap,
html[data-theme="dark"] .movie-transparent-page .entry,
html[data-theme="dark"] .movie-transparent-page .calendar-transparent-card,
html[data-theme="dark"] .movie-transparent-page .year-calendar-card,
html[data-theme="dark"] .movie-transparent-page .mini-month,
html[data-theme="dark"] .movie-transparent-page .mini-calendar-grid,
html[data-theme="dark"] .movie-transparent-page .calendar-grid,
html[data-theme="dark"] .movie-transparent-page .mini-day:not(.empty),
html[data-theme="dark"] .movie-transparent-page .day:not(.empty),
html[data-theme="dark"] .movie-transparent-page .collection-form-card,
html[data-theme="dark"] .movie-transparent-page .movie-shelf-section,
html[data-theme="dark"] .movie-transparent-page .collection-movie-card,
html[data-theme="dark"] .movie-transparent-page .translucent-edit-card,
html[data-theme="dark"] .movie-transparent-page .selected-date-transparent > section,
html[data-theme="dark"] .movie-transparent-page .saved-perfume-picker,
html[data-theme="dark"] .movie-transparent-page .preview,
html[data-theme="dark"] .movie-transparent-page .movie-edit-poster-preview .preview,
html[data-theme="dark"] .movie-transparent-page .movie-edit-no-poster {
  background-color:rgba(20,20,20,.41) !important;
  background-image:none !important;
}

/* v15.18.4 — separate perfume collection */
.perfume-collection-tools{align-items:start;margin-bottom:20px;}
.perfume-collection-add-card{min-width:0;}
.perfume-collection-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));}
.perfume-collection-photo{aspect-ratio:3/4;background:rgba(255,255,255,.38);}
.perfume-collection-photo img{object-fit:contain;padding:5px;}
.collection-perfume-card .badge{display:inline-block;margin:3px 4px 0 0;}
@media(max-width:700px){.perfume-collection-tools{grid-template-columns:1fr;}.perfume-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
\n\n/* v15.18.7 — translucent perfume collection surfaces in light and dark modes */
.perfume-collection-transparent-page .card,
.perfume-collection-transparent-page .metric,
.perfume-collection-transparent-page .compact-stat-row,
.perfume-collection-transparent-page .collection-form-card,
.perfume-collection-transparent-page .movie-shelf-section,
.perfume-collection-transparent-page .collection-movie-card,
.perfume-collection-transparent-page .translucent-edit-card,
.perfume-collection-transparent-page .table,
.perfume-collection-transparent-page .table-wrap,
.perfume-collection-transparent-page .preview,
.perfume-collection-transparent-page .perfume-collection-photo {
  background-color:rgba(255,255,255,.49) !important;
  background-image:none !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.perfume-collection-transparent-page table,
.perfume-collection-transparent-page table thead,
.perfume-collection-transparent-page table tbody,
.perfume-collection-transparent-page table tr,
.perfume-collection-transparent-page table th,
.perfume-collection-transparent-page table td,
.perfume-collection-transparent-page .table th,
.perfume-collection-transparent-page .table td {
  background:transparent !important;
}
html[data-theme="dark"] .perfume-collection-transparent-page .card,
html[data-theme="dark"] .perfume-collection-transparent-page .metric,
html[data-theme="dark"] .perfume-collection-transparent-page .compact-stat-row,
html[data-theme="dark"] .perfume-collection-transparent-page .collection-form-card,
html[data-theme="dark"] .perfume-collection-transparent-page .movie-shelf-section,
html[data-theme="dark"] .perfume-collection-transparent-page .collection-movie-card,
html[data-theme="dark"] .perfume-collection-transparent-page .translucent-edit-card,
html[data-theme="dark"] .perfume-collection-transparent-page .table,
html[data-theme="dark"] .perfume-collection-transparent-page .table-wrap,
html[data-theme="dark"] .perfume-collection-transparent-page .preview,
html[data-theme="dark"] .perfume-collection-transparent-page .perfume-collection-photo {
  background-color:rgba(20,20,20,.41) !important;
  background-image:none !important;
}


/* v15.18.8 — collection statistics use the same translucent surfaces as the diary */
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent > .stats-cards > .metric,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent > .dual-stats-grid > .card,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent > .card,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent .compact-stat-row,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent .table-wrap {
  background-color:#ffffff7d !important;
  background-image:none !important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent table,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent thead,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent tbody,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent tr,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent th,
.perfume-collection-transparent-page #collection-stats.collection-stats-translucent td {
  background:transparent !important;
}
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats.collection-stats-translucent,
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats.collection-stats-translucent > .stats-cards > .metric,
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats.collection-stats-translucent > .dual-stats-grid > .card,
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats.collection-stats-translucent > .card,
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats.collection-stats-translucent .compact-stat-row,
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats.collection-stats-translucent .table-wrap {
  background-color:#14141469 !important;
  background-image:none !important;
}

/* v15.18.12 — expandable perfume lists inside collection statistics */
.perfume-collection-transparent-page #collection-stats .collection-stat-info-entry{
  display:block;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-trigger{
  width:100%;
  border:1px solid var(--border);
  color:var(--ink);
  font:inherit;
  text-align:left;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-trigger:hover{
  border-color:rgba(229,123,163,.55);
}
.perfume-collection-transparent-page #collection-stats .collection-stat-trigger:focus-visible{
  outline:2px solid rgba(229,123,163,.55);
  outline-offset:2px;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-chevron{
  display:inline-block;
  margin-left:6px;
  transition:transform .18s ease;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-trigger[aria-expanded="true"] .collection-stat-chevron{
  transform:rotate(180deg);
}
.perfume-collection-transparent-page #collection-stats .collection-stat-dropdown{
  margin:7px 0 2px;
  padding:8px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#ffffff7d;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.perfume-collection-transparent-page #collection-stats .collection-stat-dropdown-list{
  display:grid;
  gap:7px;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-perfume{
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:7px;
  border:1px solid rgba(120,90,100,.16);
  border-radius:12px;
  color:var(--ink);
  text-decoration:none;
  background:rgba(255,255,255,.30);
  transition:transform .15s ease,border-color .15s ease,background .15s ease;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-perfume:hover{
  transform:translateY(-1px);
  border-color:rgba(229,123,163,.50);
  background:rgba(255,255,255,.50);
}
.perfume-collection-transparent-page #collection-stats .collection-stat-perfume-photo{
  width:46px;
  height:58px;
  border-radius:9px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.35);
}
.perfume-collection-transparent-page #collection-stats .collection-stat-perfume-photo img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-no-photo{
  font-size:9px;
  color:var(--muted);
  text-align:center;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-perfume-info{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-perfume-info strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-perfume-info span{
  font-size:12px;
  color:var(--muted);
}
.perfume-collection-transparent-page #collection-stats .collection-stat-stars{
  color:#c98c18 !important;
}
.perfume-collection-transparent-page #collection-stats .collection-stat-open{
  font-size:12px;
  font-weight:700;
  color:var(--accent);
  white-space:nowrap;
}
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats .collection-stat-dropdown{
  background:#14141469;
}
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats .collection-stat-perfume{
  background:rgba(20,20,20,.28);
  border-color:rgba(255,255,255,.10);
}
html[data-theme="dark"] .perfume-collection-transparent-page #collection-stats .collection-stat-perfume:hover{
  background:rgba(20,20,20,.50);
  border-color:rgba(229,123,163,.45);
}
@media(max-width:560px){
  .perfume-collection-transparent-page #collection-stats .collection-stat-perfume{
    grid-template-columns:40px minmax(0,1fr);
  }
  .perfume-collection-transparent-page #collection-stats .collection-stat-perfume-photo{
    width:40px;height:50px;
  }
  .perfume-collection-transparent-page #collection-stats .collection-stat-open{display:none;}
}

/* v15.18.16 — more compact Fragrantica-inspired wardrobe for “Без полки” */
.perfume-collection-transparent-page .fragrantica-unshelved-section{
  overflow:visible;
}
.perfume-collection-transparent-page .fragrantica-wardrobe{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(88px,1fr));
  gap:11px 7px;
  align-items:end;
  padding:6px 2px 1px;
}
.perfume-collection-transparent-page .fragrantica-perfume-tile{
  position:relative;
  min-width:0;
  padding:2px 3px 8px;
  text-align:center;
  background:transparent !important;
  border:0 !important;
  border-radius:0;
  box-shadow:none !important;
}
.perfume-collection-transparent-page .fragrantica-perfume-tile::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(135,103,86,.10),rgba(135,103,86,.36),rgba(135,103,86,.10));
  box-shadow:0 3px 7px rgba(78,55,45,.12);
}
.perfume-collection-transparent-page .fragrantica-bottle-link{
  display:block;
  color:var(--ink);
  text-decoration:none;
}
.perfume-collection-transparent-page .fragrantica-bottle-stage{
  height:108px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  margin-bottom:8px;
  background:transparent;
}
.perfume-collection-transparent-page .fragrantica-bottle-stage img{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:104px;
  object-fit:contain;
  filter:drop-shadow(0 5px 5px rgba(0,0,0,.13));
  transition:transform .18s ease,filter .18s ease;
}
.perfume-collection-transparent-page .fragrantica-perfume-tile:hover .fragrantica-bottle-stage img{
  transform:translateY(-3px) scale(1.025);
  filter:drop-shadow(0 7px 7px rgba(0,0,0,.17));
}
.perfume-collection-transparent-page .fragrantica-no-photo{
  width:60px;
  height:78px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px;
  border:1px solid rgba(120,90,100,.18);
  border-radius:8px;
  background:rgba(255,255,255,.26);
  color:var(--muted);
  font-size:11px;
}
.perfume-collection-transparent-page .fragrantica-perfume-name{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:29px;
  font-size:13px;
  line-height:1.28;
  font-weight:700;
}
.perfume-collection-transparent-page .fragrantica-perfumer{
  margin-top:3px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:11px;
}
.perfume-collection-transparent-page .fragrantica-tile-meta{
  min-height:14px;
  margin-top:4px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:5px;
  color:var(--muted);
  font-size:11px;
  line-height:1.2;
}
.perfume-collection-transparent-page .fragrantica-stars{
  color:#c98c18;
  letter-spacing:-1px;
  white-space:nowrap;
}
.perfume-collection-transparent-page .fragrantica-tile-actions{
  position:absolute;
  z-index:3;
  top:1px;
  right:1px;
  display:flex;
  gap:4px;
  opacity:0;
  transform:translateY(-2px);
  transition:opacity .15s ease,transform .15s ease;
}
.perfume-collection-transparent-page .fragrantica-perfume-tile:hover .fragrantica-tile-actions,
.perfume-collection-transparent-page .fragrantica-perfume-tile:focus-within .fragrantica-tile-actions{
  opacity:1;
  transform:none;
}
.perfume-collection-transparent-page .fragrantica-tile-actions form{margin:0;}
.perfume-collection-transparent-page .fragrantica-icon-action{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:1px solid rgba(120,90,100,.16);
  border-radius:50%;
  background:rgba(255,255,255,.78);
  color:var(--ink);
  text-decoration:none;
  font:700 13px/1 Arial,sans-serif;
  cursor:pointer;
  box-shadow:0 2px 7px rgba(0,0,0,.08);
}
.perfume-collection-transparent-page .fragrantica-delete-action{font-size:16px;}
html[data-theme="dark"] .perfume-collection-transparent-page .fragrantica-icon-action{
  background:rgba(20,20,20,.80);
  border-color:rgba(255,255,255,.12);
  color:#f4efec;
}
html[data-theme="dark"] .perfume-collection-transparent-page .fragrantica-no-photo{
  background:rgba(20,20,20,.25);
  border-color:rgba(255,255,255,.10);
}
html[data-theme="dark"] .perfume-collection-transparent-page .fragrantica-perfume-tile::after{
  background:linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.18),rgba(255,255,255,.04));
  box-shadow:0 3px 7px rgba(0,0,0,.30);
}
@media(max-width:700px){
  .perfume-collection-transparent-page .fragrantica-wardrobe{
    grid-template-columns:repeat(auto-fill,minmax(80px,1fr));
    gap:10px 6px;
  }
  .perfume-collection-transparent-page .fragrantica-bottle-stage{height:96px;}
  .perfume-collection-transparent-page .fragrantica-bottle-stage img{max-height:92px;}
  .perfume-collection-transparent-page .fragrantica-perfume-name{font-size:11px;min-height:28px;}
  .perfume-collection-transparent-page .fragrantica-tile-actions{opacity:1;transform:none;}
}


/* v15.18.18 — show perfume name on hover in “Без полки” */
.perfume-collection-transparent-page .fragrantica-bottle-link{position:relative;}
.perfume-collection-transparent-page .fragrantica-hover-name{
  position:absolute;left:50%;bottom:calc(100% + 5px);z-index:12;
  max-width:180px;padding:5px 8px;border-radius:8px;
  background:rgba(255,255,255,.92);color:#211b19;
  box-shadow:0 4px 14px rgba(0,0,0,.14);
  font-size:12px;line-height:1.2;font-weight:600;white-space:nowrap;
  transform:translate(-50%,4px);opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .15s ease,transform .15s ease,visibility .15s ease;
}
.perfume-collection-transparent-page .fragrantica-bottle-link:hover .fragrantica-hover-name,
.perfume-collection-transparent-page .fragrantica-bottle-link:focus-visible .fragrantica-hover-name{
  opacity:1;visibility:visible;transform:translate(-50%,0);
}
html[data-theme="dark"] .perfume-collection-transparent-page .fragrantica-hover-name{
  background:rgba(20,20,20,.92);color:#f4efec;
}

/* v15.18.22 — perfume collection: shelves first, add forms in modal windows */
.perfume-collection-top-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.collection-modal[hidden]{display:none !important;}
.collection-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  overflow:auto;
  padding:5vh 18px 36px;
}
.collection-modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(25,18,21,.42);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.collection-modal-panel{
  position:relative;
  z-index:1;
  width:min(760px,100%);
  max-height:90vh;
  overflow:auto;
  margin:0;
  padding:24px;
  background:rgba(255,255,255,.90) !important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:0 18px 60px rgba(0,0,0,.22);
}
.collection-modal-panel.perfume-collection-add-card{width:min(900px,100%);}
.collection-modal-close{
  position:absolute;
  top:10px;
  right:12px;
  width:34px;
  height:34px;
  padding:0;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.68);
  color:var(--ink);
  font:400 26px/32px Arial,sans-serif;
  cursor:pointer;
  z-index:2;
}
body.collection-modal-open{overflow:hidden;}
html[data-theme="dark"] .collection-modal-backdrop{background:rgba(0,0,0,.58);}
html[data-theme="dark"] .collection-modal-panel{
  background:rgba(20,20,20,.92) !important;
  color:#f4efec;
}
html[data-theme="dark"] .collection-modal-close{
  background:rgba(255,255,255,.10);
  color:#f4efec;
}
@media(max-width:700px){
  .perfume-collection-top-actions{justify-content:flex-start;}
  .collection-modal{padding:12px 8px 24px;}
  .collection-modal-panel{max-height:calc(100vh - 24px);padding:20px 14px;}
}

/* v15.18.25: random perfume of the day */
.perfume-daily-pick-panel{max-width:650px;width:min(92vw,650px);max-height:90vh;overflow-y:auto}
.perfume-daily-pick-content{text-align:center;margin:12px 0 20px;overflow-wrap:anywhere}
.perfume-daily-pick-photo{display:block;max-width:min(100%,260px);max-height:290px;object-fit:contain;margin:8px auto 16px}
.perfume-daily-pick-description{white-space:pre-line;text-align:left;line-height:1.6}
.perfume-daily-pick-content>p:not(.perfume-daily-pick-description){margin:8px 0}
