﻿:root{
  --paper:#f4efe3;
  --paper2:#efe6d6;
  --ink:#1f1a16;
  --muted:#5f534b;
  --accent:#2f6a58;
  --accent2:#b08a4a;
  --line: rgba(31,26,22,.22);
  --shadow: 0 16px 40px rgba(0,0,0,.12);
  --radius: 18px;
  --max: 1120px;
}

*{box-sizing:border-box}

/* =========================================================
   BACKGROUND - Date Your Postcard (Same path as style.css)
   ========================================================= */
html body.page-date-postcard,
body.page-date-postcard,
.page-date-postcard{
  margin:0 !important;
  color:var(--ink);
  background: url("../images/hero-artnouveau-bg.png") center 60px / cover no-repeat fixed #f4efe3 !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height:1.55;
  min-height: 100vh;
}

/* Mobile: use scroll for performance */
@media (max-width: 768px){
  html body.page-date-postcard,
  body.page-date-postcard,
  .page-date-postcard{
    background-attachment: scroll !important;
  }
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 64px;
}

/* Language switching now handled by JS data-i18n system */

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 12px;
  border:1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.crumbs{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  font-size: 14px;
  color: var(--muted);
}
.crumbs span.sep{opacity:.5}
.badge{
  font-size: 12px;
  letter-spacing:.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.45);
  color: var(--muted);
  white-space: nowrap;
}
.dyp-logo-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.dyp-logo-img {
  width: 56px;
  height: 56px;
  display: block;
  border-radius: 50%;
  opacity: 0.88;
  transition: opacity .2s;
}
.dyp-logo-img:hover {
  opacity: 1;
}
@media (max-width: 520px) {
  .dyp-logo-badge { display: none; }
}

.hero{
  margin-top: 16px;
  padding: 34px 18px 22px;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.20)),
    radial-gradient(800px 240px at 20% 0%, rgba(176,138,74,.20), transparent 70%),
    radial-gradient(700px 260px at 85% 0%, rgba(47,106,88,.18), transparent 72%);
  box-shadow: var(--shadow);
  position: relative;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute;
  inset:-40px -40px auto auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  border: 2px dashed rgba(31,26,22,.18);
  transform: rotate(12deg);
  opacity:.75;
}
.hero::after{
  content:"POSTCARD • POLIS";
  position:absolute;
  right:18px;
  bottom:16px;
  font-size: 11px;
  letter-spacing:.22em;
  color: rgba(31,26,22,.35);
}
h1{
  margin:0 0 8px;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: .01em;
}
.subtitle{
  margin:0;
  color: var(--muted);
  max-width: 80ch;
  font-size: 16px;
}

.heroRow{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
@media (max-width: 900px){
  .heroRow{grid-template-columns: 1fr; }
}

.stampCard{
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  background: rgba(255,255,255,.46);
  position: relative;
}
.stampTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.stampTitle{
  margin:0;
  font-size: 14px;
  letter-spacing:.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.sig{
  font-size: 12px;
  color: rgba(31,26,22,.55);
  letter-spacing:.08em;
  white-space: nowrap;
}
.stampGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
@media (max-width: 520px){
  .stampGrid{ grid-template-columns: 1fr; }
}
.stampPill{
  border:1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255,255,255,.55);
  font-size: 14px;
  color: var(--muted);
}

.orn{
  margin: 18px 0 2px;
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(31,26,22,.28), transparent);
  position: relative;
}
.orn::after{
  content:"✦";
  position:absolute;
  left:50%;
  top:-10px;
  transform: translateX(-50%);
  background: var(--paper2);
  padding: 0 10px;
  color: rgba(31,26,22,.55);
}

.grid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
  position: relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute;
  left:-40px;
  top:-40px;
  width:120px; height:120px;
  border-radius: 999px;
  border: 1px solid rgba(31,26,22,.14);
  opacity:.6;
}

.kicker{
  margin:0 0 6px;
  font-size: 13px;
  letter-spacing:.16em;
  text-transform: uppercase;
  color: var(--accent);
}
h2{
  margin:0 0 10px;
  font-size: 22px;
}
p{ margin: 10px 0; }
.muted{ color: var(--muted); }

.rule{
  margin: 10px 0 0;
  padding: 12px 12px;
  border-left: 4px solid rgba(47,106,88,.45);
  background: rgba(255,255,255,.45);
  border-radius: 10px;
  color: var(--muted);
}

ul{ margin: 10px 0 0 20px; }
li{ margin: 6px 0; color: var(--ink); }

.refTable{
  overflow-x: auto;
  margin: 16px 0;
}

.refTable table{
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.refTable th,
.refTable td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.refTable thead th{
  font-weight: 700;
  color: var(--ink);
  background: rgba(0,0,0,.03);
}

.refTable tbody tr:hover{
  background: rgba(47,106,88,.06);
}

.estimator{
  margin-top: 16px;
  border-radius: 22px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.65);
  padding: 20px;
  box-shadow:
    0 2px 0 rgba(255,255,255,.60),           /* top edge highlight */
    0 6px 12px rgba(0,0,0,.09),              /* near shadow */
    0 20px 40px rgba(0,0,0,.14),             /* mid shadow */
    0 48px 80px rgba(0,0,0,.11),             /* far diffuse */
    0 80px 100px rgba(0,0,0,.06);            /* deep ambient */
  transform: translateY(-10px);
  position: relative;
}
.estHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  flex-wrap:wrap;
}
.estHead h2{ margin:0; }
.estHead p{ margin: 6px 0 0; max-width: 78ch; }

/* Tool-style header */
.toolTitle h2{
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 14px;
  color: var(--accent);
}
.toolSubtitle{
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0 0;
}

.formGrid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 10px;
}
@media (max-width: 860px){
  .formGrid{ gap: 8px; }
}
.field{
  grid-column: span 6;
  padding: 8px 10px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
}

/* ND Phot arka yüz alanı açılınca dikkat çekici pulse */
@keyframes ndphot-attention {
  0%   { background: rgba(255,255,255,.55); border-color: var(--line); }
  18%  { background: rgba(176,138,74,.18);  border-color: var(--accent2); }
  45%  { background: rgba(176,138,74,.12);  border-color: var(--accent2); }
  75%  { background: rgba(176,138,74,.06);  border-color: rgba(176,138,74,.4); }
  100% { background: rgba(255,255,255,.55); border-color: var(--line); }
}
#ndphotBackField.attention {
  animation: ndphot-attention 2.4s ease-out forwards;
}
#ndphotBackField.attention label {
  color: var(--accent2);
  font-weight: 600;
}

.choice-group {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  transition: gap .2s ease;
}

.choice-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid rgba(31,26,22,.22);
  border-radius: 10px;
  background: rgba(244,239,227,.7);
  cursor: pointer;
  overflow: hidden;
  transition: height .2s ease, opacity .2s ease, border-color .15s, background .15s, box-shadow .15s;
}

.choice-option span {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}

.choice-option input[type="radio"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: rgba(47,106,88,.9);
  cursor: pointer;
}

.choice-option:hover {
  border-color: rgba(47,106,88,.45);
  background: rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(47,106,88,.08);
}

.choice-option:has(input:checked) {
  border-color: rgba(47,106,88,.55);
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 0 3px rgba(47,106,88,.10);
}

/* JS tarafından eklenen has-value — compact modda da yeşil tonu korur */
.choice-option.has-value {
  background: rgba(47,106,88,.13);
  border-color: rgba(47,106,88,.50);
  box-shadow: 0 0 0 3px rgba(47,106,88,.10);
}
.choice-option.has-value span {
  color: var(--ink);
  font-weight: 600;
}
.choice-group.is-selected .choice-option.has-value {
  background: rgba(47,106,88,.13);
  border-color: rgba(47,106,88,.50);
  box-shadow: none;
}

/* Compact state: seçim yapılınca seçilmeyenler gizlenir */
.choice-group.is-selected .choice-option:not(:has(input:checked)) {
  height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  border-bottom-width: 0;
  pointer-events: none;
}

.choice-group.is-selected {
  gap: 0;
}

.choice-group.is-selected .choice-option:has(input:checked) {
  border-color: rgba(47,106,88,.50);
  background: rgba(47,106,88,.13);
  box-shadow: 0 0 0 3px rgba(47,106,88,.10);
}
.choice-group.is-selected .choice-option:has(input:checked) span {
  color: var(--ink);
  font-weight: 600;
}

/* "Change" butonu — seçim yapılınca radio'nun yerine geçer */
.choice-change-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: rgba(47,106,88,.7);
  cursor: pointer;
  letter-spacing: .02em;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: none;
}

.choice-group.is-selected .choice-change-btn {
  display: inline;
}

.choice-group.is-selected .choice-option input[type="radio"] {
  display: none;
}

.choice-change-btn:hover {
  color: rgba(47,106,88,1);
}

.field.full{ grid-column: span 12; }

#logoNoyerOvalView,
#noyerSubField {
  grid-column: span 12;
  background: transparent;
  border: none;
  padding: 2px 0;
}
#logoNoyerOvalView .choice-group { margin-top: 6px; }
@media (max-width: 860px){
  .field{ grid-column: span 12; }
  /* Ülke ve back-layout fieldları dar ekranda span 6 kalsın */
  #fieldCountry, #fieldBack {
    grid-column: span 6;
  }
}

label{
  display:block;
  font-size: 11px;
  letter-spacing:.08em;
  color: var(--muted);
  margin-bottom: 3px;
}
select, input{
  width: 100%;
  height: 32px;
  padding: 4px 8px;
  border-radius: 10px;
  border:1px solid rgba(31,26,22,.22);
  background: rgba(244,239,227,.7);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
select:hover, input:hover{
  border-color: rgba(47,106,88,.45);
  background: rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(47,106,88,.08);
}
select:focus, input:focus{
  border-color: rgba(47,106,88,.55);
  box-shadow: 0 0 0 4px rgba(47,106,88,.12);
}

/* ── Dropdown: seçim yapılınca belirgin renk değişimi ── */
/* select elementinin kendisi */
select.has-value {
  background: rgba(47,106,88,.13);
  border-color: rgba(47,106,88,.50);
  color: var(--ink);
  font-weight: 500;
}
select.has-value:hover {
  background: rgba(47,106,88,.18);
  border-color: rgba(47,106,88,.65);
}
select.has-value:focus {
  background: rgba(47,106,88,.15);
  border-color: rgba(47,106,88,.70);
  box-shadow: 0 0 0 4px rgba(47,106,88,.15);
}
/* Postmark year input */
input.has-value {
  background: rgba(47,106,88,.13);
  border-color: rgba(47,106,88,.50);
  font-weight: 500;
}
input.has-value:hover {
  background: rgba(47,106,88,.18);
  border-color: rgba(47,106,88,.65);
}
input.has-value:focus {
  background: rgba(47,106,88,.15);
  border-color: rgba(47,106,88,.70);
  box-shadow: 0 0 0 4px rgba(47,106,88,.15);
}
/* Publisher logo trigger button (azo-trigger görünümü) */
.azo-trigger.has-value {
  background: rgba(47,106,88,.13);
  border-color: rgba(47,106,88,.50);
  font-weight: 500;
}
.azo-trigger.has-value:hover {
  background: rgba(47,106,88,.18);
  border-color: rgba(47,106,88,.65);
}
/* Field container: sadece border rengi değişir, arka plan aynı kalır */
.field.has-value {
  border-color: rgba(47,106,88,.38);
}

.actions{
  margin-top: 8px;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  align-items:center;
}
.btn{
  cursor:pointer;
  border:1px solid var(--line);
  border-radius: 10px;
  padding: 7px 14px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  letter-spacing:.04em;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover{
  background: rgba(31,26,22,.04);
}
.btn.primary{
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 7px 16px;
  font-weight: 600;
}
.btn.primary:hover{
  background: #245a4a;
  box-shadow: 0 2px 8px rgba(47,106,88,.25);
}
/* Reset button — tinted outline to match Estimate */
#btnReset{
  border: 1px solid rgba(47,106,88,.35);
  color: var(--accent);
  font-weight: 500;
}
#btnReset:hover{
  background: rgba(47,106,88,.08);
  border-color: rgba(47,106,88,.5);
}

.result{
  margin-top: 12px;
  padding: 14px 14px;
  border:1px solid var(--line);
  border-radius: 16px;
  background: rgba(244,239,227,.72);
  transition: opacity .2s;
}

/* ── Result fullscreen mode ── */
.estimator.result-mode .formGrid,
.estimator.result-mode .actions{
  display: none;
}
.estimator.result-mode .result{
  background: rgba(255,255,255,.28);
  border-radius: 14px;
  padding: 18px 20px 16px;
  border: 1px solid rgba(31,26,22,.10);
  margin-top: 8px;
}
.result-back-btn{
  display: none;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(47,106,88,.35);
  color: var(--accent);
  font-weight: 500;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .04em;
  border-radius: 10px;
  padding: 7px 14px;
  cursor: pointer;
  margin-bottom: 14px;
  transition: background .15s, border-color .15s;
}
.result-back-btn:hover{
  background: rgba(47,106,88,.08);
  border-color: rgba(47,106,88,.5);
}
.estimator.result-mode .result-back-btn{
  display: inline-flex;
}
.result h3{
  margin: 0 0 6px;
  font-size: 18px;
}
.bigline-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.bigline-row .bigline { margin: 0; }
.bigline{
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: .01em;
  transition: font-size .2s, color .2s, opacity .2s;
}
/* When most-likely is suppressed, demote bigline and promote range/certainty */
.bigline.insufficient{
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  opacity: .72;
  letter-spacing: .02em;
}
/* Confidence pill next to "Most likely" */
.confidence-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  vertical-align: middle;
  white-space: nowrap;
}
.conf-dots{
  display: inline-flex;
  gap: 4px;
}
.conf-dots .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(31,26,22,.28);
  background: transparent;
  opacity: .55;
}
.conf-dots .dot.filled{
  background: rgba(47,106,88,.55);
  opacity: 1;
}
/* Per-band dot colors */
.conf-low    .conf-dots .dot.filled { background: rgba(180,60,40,.70); }
.conf-medium .conf-dots .dot.filled { background: rgba(180,130,30,.75); }
.conf-high   .conf-dots .dot.filled { background: rgba(47,140,80,.70); }
.conf-vhigh  .conf-dots .dot.filled { background: rgba(30,100,65,.85); }
.conf-text{
  font-weight: 600;
  color: rgba(31,26,22,.78);
}
/* Bands (subtle) */
.conf-low   { opacity: .75; }
.conf-medium{ opacity: .88; }
.conf-high  { opacity: 1; }
.conf-vhigh { opacity: 1; }
/* When bigline is demoted (insufficient), also demote pill */
.bigline.insufficient .confidence-pill{
  display: none;
}
.subline{
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
  transition: font-size .2s, color .2s, font-weight .2s;
}
#certaintyLine {
  font-size: 12px;
  opacity: .70;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px dashed rgba(31,26,22,.12);
}
#certaintyLine:empty, #certaintyLine[hidden] { border-top: none; }
.multi-year-warning {
  background: #faeeda;
  border-left: 2px solid #ba7517;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
}
.multi-year-warning[hidden] { display: none; }
.multi-year-warning-line {
  font-size: 12px;
  color: #854f0b;
  margin: 0;
  font-weight: 500;
}
.multi-year-warning-note {
  font-size: 11px;
  color: #854f0b;
  margin: 2px 0 0;
}
.subline.promoted{
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
}
.subline.promoted-secondary{
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  opacity: .85;
}
/* rangeLine emphasis when Most Likely confidence is low/medium */
/* ── Graduated confidence emphasis ───────────────────────── */
/* vhigh (≥86%): bigline dominant, range small/secondary */
.subline.conf-emphasis-vhigh {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  opacity: .70;
}
.bigline.conf-bigline-vhigh {
  font-size: 28px;
  font-weight: 700;
}
/* high (60-85%): bigline slightly smaller, range normal */
.subline.conf-emphasis-high {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  opacity: .78;
}
.bigline.conf-bigline-high {
  font-size: 26px;
  font-weight: 700;
}
/* medium (34-59%): bigline secondary, range emphasized */
.subline.conf-emphasis-medium {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  opacity: .88;
}
.bigline.conf-bigline-medium {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  opacity: .82;
}
/* low (25-33%): bigline demoted, range becomes primary */
.subline.conf-emphasis-low {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  opacity: 1;
}
.bigline.conf-bigline-low {
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
  opacity: .68;
}
.whyList{
  margin-top: 6px;
  margin-bottom: 0;
  padding-left: 18px;
}
.whyList li{
  margin: 2px 0;
  line-height: 1.4;
}

.stack{
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}
.sec{
  padding: 6px 0 4px;
  border-top: 1px dashed rgba(31,26,22,.15);
}
.sec:first-child{
  border-top: none;
  padding-top: 2px;
}
.sec-title{
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.sec-toggle {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  padding: 4px 0;
  gap: 8px;
  box-sizing: border-box;
}
.sec-toggle:hover .sec-title { color: var(--ink); }
.sec-toggle[aria-expanded="true"] .sec-toggle-icon { transform: rotate(90deg); }
.sec-toggle-icon {
  font-size: 10px;
  color: var(--muted);
  transition: transform .18s ease;
  flex-shrink: 0;
}
.whyList { margin-top: 4px; }
.chiprow{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top: 8px;
}
.chip{
  font-size: 12px;
  letter-spacing:.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.55);
  color: var(--muted);
  white-space: nowrap;
}
.chip.chip-conflict {
  border-color: rgba(180,60,40,.35);
  background: rgba(180,60,40,.08);
  color: #9a3520;
}
.chip.chip-info {
  border-color: rgba(40,100,180,.30);
  background: rgba(40,100,180,.07);
  color: #1a4d88;
}
.chip.chip-ok {
  border-color: rgba(40,140,80,.30);
  background: rgba(40,140,80,.07);
  color: #1a6635;
}

.notes-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  min-height: 0;
}
.notes-tags:empty {
  display: none;
}
.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(47,106,88,.35);
  background: rgba(47,106,88,.10);
  color: var(--ink);
  white-space: nowrap;
}
.note-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 1px;
  color: var(--muted);
  border-radius: 999px;
  transition: color .15s, background .15s;
}
.note-tag-remove:hover {
  color: var(--ink);
  background: rgba(31,26,22,.10);
}

/* Notes full-width (AZO artık printTechStage içinde, ayrı satır yok) */
#notesField { grid-column: span 12; }

.foot{
  margin-top: 14px;
  color: rgba(31,26,22,.65);
  font-size: 13px;
  border-top: 1px dashed rgba(31,26,22,.22);
  padding-top: 12px;
}
/* ── Real photo paper image grid ───────────────────────── */
.paper-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin: 10px 0 6px;
}

.paper-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.paper-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  width: 88px;
  font-family: inherit;
}

.paper-card img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.paper-card span {
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  line-height: 1.3;
}

.paper-card:hover {
  border-color: var(--accent);
  background: var(--paper2);
}

.paper-card.selected {
  border-color: var(--accent);
  background: var(--paper2);
  box-shadow: 0 0 0 3px rgba(47,106,88,.18);
}

.paper-card.selected span {
  color: var(--accent);
  font-weight: 600;
}

/* ── AZO trigger button (looks like a select) ───────────── */
.azo-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(31,26,22,.22);
  background: rgba(244,239,227,.7);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.azo-trigger:hover {
  border-color: rgba(47,106,88,.45);
  background: rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(47,106,88,.08);
}
.azo-trigger:focus,
.azo-trigger.open {
  border-color: rgba(47,106,88,.55);
  box-shadow: 0 0 0 4px rgba(47,106,88,.12);
  outline: none;
}
.azo-trigger svg {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .2s;
}
.azo-trigger.open svg {
  transform: rotate(180deg);
}

/* ── Paper panel ────────────────────────────────────────── */
.paper-panel {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
}

/* ── Printing technology → RPPC stage swap ─────────────── */
.field-stage {
  position: relative;
  overflow: clip;
}
.stage-view {
  transition: opacity .22s ease, transform .22s ease;
}
.stage-view[hidden] {
  display: none !important;
}
#printTechStage.is-rppc .stage-view-main {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
#printTechStage .stage-view-rppc {
  opacity: 0;
  transform: translateY(8px);
}
#printTechStage.is-rppc .stage-view-rppc {
  opacity: 1;
  transform: translateY(0);
}
.stage-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  letter-spacing: .01em;
  flex-shrink: 0;
}
.stage-back-btn:hover {
  text-decoration: underline;
}
.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.stage-context {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
#logoNdphotView select {
  margin-top: 6px;
}
#logoNoyerAnView .choice-group {
  margin-top: 6px;
}
#logoNoyerAnSerialWrap {
  margin-top: 10px;
}
#logoNoyerAnSerialWrap input {
  width: 100%;
  box-sizing: border-box;
}
#logoNoyerOvalSerialWrap {
  margin-top: 10px;
}
#logoNoyerOvalSerialWrap input {
  width: 100%;
  box-sizing: border-box;
}

/* ── Aristophot substep ──────────────────────────────────── */
#logoAristophotView .choice-group { margin-top: 6px; }
.aristophot-serial-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.aristophot-serial-row select {
  flex: 0 0 auto;
  width: auto;
  min-width: 80px;
}
.aristophot-serial-row input {
  flex: 1;
  width: 0;
  min-width: 0;
}
#aristophotSerialWrap { margin-top: 10px; }
#aristophotMischWrap  { margin-top: 10px; }
#aristophotMischWrap select { margin-top: 4px; width: 100%; }
#aristophotMischWrap input  { margin-top: 4px; width: 100%; }

/* ── Tuck substep ────────────────────────────────────────── */
#logoTuckView .choice-group { margin-top: 6px; }
.tuck-serial-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.tuck-serial-row select {
  flex: 0 0 auto;
  width: auto;
  min-width: 100px;
}
.tuck-serial-row input {
  flex: 1;
  width: 0;
  min-width: 0;
}
#tuckSerialWrap { margin-top: 10px; }
#tuckPrefix:disabled { opacity: 0.5; cursor: not-allowed; }

.aristophot-wording-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  transition: gap .2s ease;
}
.aristophot-wording-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0;
  margin-bottom: 0;
  padding: 4px 8px;
  border: 1px solid rgba(31,26,22,.22);
  border-radius: 10px;
  background: rgba(244,239,227,.7);
  cursor: pointer;
  overflow: hidden;
  transition: height .2s ease, opacity .2s ease, border-color .15s, background .15s;
}
.aristophot-wording-grid label:hover {
  border-color: rgba(47,106,88,.45);
  background: rgba(255,255,255,.85);
}
.aristophot-wording-grid label.aw-checked {
  border-color: rgba(47,106,88,.55);
  background: rgba(47,106,88,.13);
}
.aristophot-wording-grid label.aw-checked span { font-weight: 600; }
/* Collapse: hide unchecked when any selection exists */
.aristophot-wording-grid.has-selection label:not(.aw-checked) {
  height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  border-bottom-width: 0;
  pointer-events: none;
}
.aristophot-wording-grid.has-selection { gap: 0; }
/* Collapsed: user focused serial without selecting a wording */
.aristophot-wording-grid.aw-collapsed label {
  height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  border-bottom-width: 0;
  pointer-events: none;
}
.aristophot-wording-grid.aw-collapsed { gap: 0; }
/* Disabled state for mutual exclusion */
.aristophot-wording-grid label.aw-disabled {
  opacity: .35;
  pointer-events: none;
}
/* Change button — appears inside checked labels when collapsed */
.aristophot-wording-grid .aw-change-btn {
  margin-left: auto;
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: rgba(47,106,88,.7);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: none;
}
.aristophot-wording-grid.has-selection .aw-change-btn { display: inline; }
.aristophot-wording-grid .aw-change-btn:hover { color: rgba(47,106,88,1); }
.aristophot-wording-grid label input[type="checkbox"] {
  flex-shrink: 0;
  width: auto;
  height: auto;
}
.aristophot-wording-grid.has-selection label input[type="checkbox"] {
  display: none;
}
/* Serial input validation border */
#aristophotSerial.serial-valid,
#aristophotMischSerial.serial-valid {
  border-color: rgba(47,106,88,.65);
  box-shadow: 0 0 0 2px rgba(47,106,88,.12);
}
#aristophotSerial.serial-invalid,
#aristophotMischSerial.serial-invalid {
  border-color: rgba(180,50,40,.55);
  box-shadow: 0 0 0 2px rgba(180,50,40,.10);
}
/* Back layout attention highlight */
@keyframes back-layout-attention {
  0%   { border-color: var(--line);     box-shadow: none; }
  20%  { border-color: var(--accent2);  box-shadow: 0 0 0 3px rgba(176,138,74,.18); }
  100% { border-color: var(--accent2);  box-shadow: 0 0 0 3px rgba(176,138,74,.18); }
}
#fieldBack.back-layout-hint {
  animation: back-layout-attention .6s ease-out forwards;
}
#fieldBack.back-layout-hint > label {
  color: var(--accent2);
  font-weight: 600;
}
#aristophotWarnings { margin-top: 8px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Publisher logo grid ────────────────────────────────── */
#logoPaperPanel {
  max-height: 600px;
  width: 100%;
  overflow-y: auto;
}
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}
.logo-card {
  all: unset;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(244,239,227,.7);
  padding: 5px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  box-sizing: border-box;
}
.logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.logo-card:hover {
  border-color: rgba(31,26,22,.25);
  background: rgba(244,239,227,1);
}
.logo-card.selected {
  border-color: var(--accent);
  background: rgba(47,106,88,.1);
  box-shadow: 0 0 0 3px rgba(47,106,88,.15);
}
/* ── Global / Association Marks grid ───────────────────── */
.global-marks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.global-mark-btn {
  all: unset;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(244,239,227,.7);
  padding: 6px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  width: 72px;
  box-sizing: border-box;
}
.global-mark-btn img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}
.global-mark-btn span {
  font-size: 10px;
  text-align: center;
  color: var(--muted);
  line-height: 1.2;
  font-weight: 600;
}
.global-mark-btn:hover {
  border-color: rgba(31,26,22,.25);
  background: rgba(244,239,227,1);
}
.global-mark-btn.active {
  border-color: var(--accent);
  background: rgba(47,106,88,.1);
  box-shadow: 0 0 0 3px rgba(47,106,88,.15);
}
.global-mark-btn.active span {
  color: var(--accent);
}
.global-mark-btn[hidden] {
  display: none !important;
}

/* Divider between global marks and country publishers */
.logo-panel-divider {
  border: none;
  border-top: 1px dashed rgba(31,26,22,.22);
  margin: 10px 0 6px;
}

/* ── Illustrator & Atelier Context block ────────────────── */
.illustrator-block {
  margin-top: 4px;
}
.illustrator-rule {
  margin: 12px 0 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31,26,22,.22), transparent);
  position: relative;
}
.illustrator-rule::after {
  content: "✦";
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%);
  background: rgba(244,239,227,.72);
  padding: 0 10px;
  color: rgba(31,26,22,.45);
  font-size: 11px;
}

/* ── Illustrator panel card ─────────────────────────────── */
.illustrator-panel {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(176,138,74,.07);
  border-left: 3px solid var(--accent2);
}
.ill-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.ill-row {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin: 3px 0;
  line-height: 1.4;
}
.ill-label {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  min-width: 130px;
}
.ill-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(31,26,22,.15);
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* =========================================================
   PUBLISHER LOGO FIELD - TAM GENİŞLİK & GRID OPTIMIZASYONU
   ========================================================= */

/* Publisher logo alanı gridde tam genişlik kaplasın */
#publisherLogoField {
  grid-column: 1 / -1;
}

/* Mobilde 2 sütun */
@media (max-width: 767px) {
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Daha fazla logo yan yana - 6 sütun */
#publisherLogoField .logo-grid {
  grid-template-columns: repeat(6, minmax(56px, 1fr));
  gap: 10px;
}

/* Tablet ve üstü için daha fazla sütun */
@media (min-width: 768px) {
  #publisherLogoField .logo-grid {
    grid-template-columns: repeat(8, minmax(56px, 1fr));
  }
}

/* Geniş ekranlar için maksimum sütun */
@media (min-width: 1200px) {
  #publisherLogoField .logo-grid {
    grid-template-columns: repeat(10, minmax(56px, 1fr));
  }
}
/* ── Logo → Country suggestion bar ── */
.logo-suggest {
  background: #f0f7f4;
  border: 1px solid #b8d4c8;
  border-radius: 6px;
  padding: 5px 12px;
  margin-bottom: 8px;
  align-items: center;
  gap: 10px;
  display: none;
}
.logo-suggest:not([hidden]) {
  display: flex;
}
.logo-suggest-text {
  margin: 0;
  font-size: 0.82rem;
  color: #2a5a3f;
  flex: 1;
  line-height: 1.3;
}
.logo-suggest-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.btn-small {
  padding: 2px 12px;
  font-size: 0.78rem;
  border-radius: 4px;
  border: 1px solid #5a9a7a;
  background: #5a9a7a;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.6;
}
.btn-small:hover { background: #4a8a6a; }
.btn-small.ghost {
  background: transparent;
  color: #5a9a7a;
}
.btn-small.ghost:hover {
  background: #e4f0ea;
}
/* ── Stamp row: select + other-country button ── */
.stamp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stamp-row select {
  flex: 1;
  min-width: 0;
}
.btn-mini {
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: 4px;
  border: 1px solid #9ab;
  background: #f5f7f9;
  color: #456;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.5;
  transition: background 0.15s, border-color 0.15s;
}
.btn-mini:hover {
  background: #eaf0f5;
  border-color: #78a;
}
.btn-mini[aria-expanded="true"] {
  background: #e0eaf2;
  border-color: #5a8aaa;
}
#stampOtherCountryWrap {
  margin-top: 6px;
}
#stampOtherCountryWrap select {
  width: 100%;
}
/* ── Serial number clear button ─────────────────────────────────────── */
.serial-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.serial-input-wrap #serialNumber {
  flex: 1;
  padding-right: 28px; /* clear butonuna yer aç */
}
.serial-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: none;
  background: rgba(31,26,22,.18);
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s;
}
.serial-clear-btn:hover {
  background: rgba(31,26,22,.32);
}


#serialNumber {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 6px 10px;
  border: 1px solid #cdd5dc;
  border-radius: 6px;
  background: #fff;
  color: #1a2633;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
#serialNumber:focus {
  outline: none;
  border-color: #0e6b65;
  box-shadow: 0 0 0 2px rgba(14,107,101,0.12);
}
#serialNumber.has-value {
  background: rgba(47,106,88,.13);
  border-color: rgba(47,106,88,.50);
  color: var(--ink);
  font-weight: 500;
}
#serialNumber.has-value:hover {
  background: rgba(47,106,88,.18);
  border-color: rgba(47,106,88,.65);
}
#serialNumber.has-value:focus {
  background: rgba(47,106,88,.15);
  border-color: rgba(47,106,88,.70);
  box-shadow: 0 0 0 4px rgba(47,106,88,.15);
}
#logoNoyerAnSerial.has-value {
  background: rgba(47,106,88,.13);
  border-color: rgba(47,106,88,.50);
  color: var(--ink);
  font-weight: 500;
}
#logoNoyerAnSerial.has-value:hover {
  background: rgba(47,106,88,.18);
  border-color: rgba(47,106,88,.65);
}
#logoNoyerAnSerial.has-value:focus {
  background: rgba(47,106,88,.15);
  border-color: rgba(47,106,88,.70);
  box-shadow: 0 0 0 4px rgba(47,106,88,.15);
}
#logoNoyerAnSerial.is-conflict {
  background: #fff0f0;
  border-color: #d93030;
  box-shadow: 0 0 0 4px rgba(217,48,48,.12);
}
.field-hint {
  margin: 5px 0 0;
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-style: italic;
}
.hint-ok {
  color: #1a6644;
  background: #eaf7f0;
  border-left: 3px solid #2ea86a;
}
.hint-warn {
  color: #7a4a10;
  background: #fff5e6;
  border-left: 3px solid #e08020;
}
.hint-error {
  color: #7a1010;
  background: #fff0f0;
  border-left: 3px solid #d93030;
  font-weight: 600;
  animation: hint-shake 0.3s ease;
}
.hint-range {
  color: #3a5a7a;
  background: #eef4fb;
  border-left: 3px solid #4a90c4;
  font-style: normal;
}
@keyframes hint-shake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-4px); }
  50%  { transform: translateX(4px); }
  75%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* Spec 8.2 — Tuck serial inline helper */
.field-helper {
  margin: 6px 0 0;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.field-helper .helper-text {
  flex: 1 1 auto;
  font-style: italic;
}
.field-helper .helper-action {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid currentColor;
  background: rgba(255,255,255,.65);
  font-weight: 600;
}
.field-helper .helper-action:hover {
  background: rgba(255,255,255,.95);
}
.field-helper.helper-info {
  color: #3a5a7a;
  background: #eef4fb;
  border-left: 3px solid #4a90c4;
}
.field-helper.helper-warn {
  color: #7a4a10;
  background: #fff5e6;
  border-left: 3px solid #e08020;
}

/* Spec 8.2.1 — Greeting field auto-focus ring after Tuck logo selection.
   Stronger than the default field focus to signal "you must answer this". */
#tuckGreeting:focus,
#tuckGreeting:focus-visible {
  outline: 2px solid rgba(47,106,88,.85);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(47,106,88,.20);
}

/* Custom button widgets — :focus-visible rings.
   Same teal palette as the form-field focus (~531) but full-saturation
   outline so it stands out on the paper-textured logo / global-mark
   grids. Keyboard-only (no ring on mouse click). */
.logo-card:focus-visible,
.paper-card:focus-visible,
.global-mark-btn:focus-visible,
.sec-toggle:focus-visible,
.choice-change-btn:focus-visible,
.note-tag-remove:focus-visible,
.field-helper .helper-action:focus-visible {
  outline: 2px solid #2f6a58;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(47,106,88,.20);
}

/* Choice option label inherits the focus ring when its radio receives
   keyboard focus. The native radio ring sits on the small dot and is easy
   to miss — promoting it to the card makes arrow-key navigation visible. */
.choice-option:has(input:focus-visible) {
  outline: 2px solid #2f6a58;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(47,106,88,.20);
}


/* =========================================================
   LOGO HOVER PREVIEW (Desktop — pointer-events: none)
   ========================================================= */
.logo-hover-preview {
  position: fixed;
  z-index: var(--z-overlay);
  padding: 10px;
  border: 1px solid rgba(31,26,22,.22);
  border-radius: 14px;
  background: rgba(244,239,227,.96);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity .14s ease, transform .14s ease;
}

.logo-hover-preview.show {
  opacity: 1;
  transform: translateY(0);
}

.logo-hover-preview img {
  display: block;
  width: min(320px, 60vw);
  height: auto;
  border-radius: 8px;
}

/* Hide hover preview on touch devices */
@media (hover: none) {
  .logo-hover-preview { display: none !important; }
}

/* =========================================================
   LOGO MODAL / LIGHTBOX (Mobile + Desktop click)
   ========================================================= */
.logo-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-top);
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  animation: logoModalFadeIn .2s ease forwards;
}

@keyframes logoModalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.logo-modal[hidden] {
  display: none !important;
}

.logo-modal-body {
  background: rgba(244,239,227,.98);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
  max-width: min(92vw, 520px);
  width: 100%;
  padding: 14px;
  animation: logoModalSlideIn .22s ease forwards;
}

@keyframes logoModalSlideIn {
  from { transform: scale(.92) translateY(12px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.logo-modal-body img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.logo-modal-label {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  letter-spacing: .04em;
}

.logo-modal-label:empty {
  display: none;
}

.logo-modal-close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 10001;
}

.logo-modal-close:hover {
  background: rgba(0,0,0,.55);
}

/* ── Logo card + global mark: zoom hint icon on hover ───── */
.logo-card::after {
  content: "🔍";
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 11px;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
  filter: grayscale(.4);
}
.logo-card:hover::after { opacity: .55; }

.global-mark-btn::after {
  content: "🔍";
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
  filter: grayscale(.4);
}
.global-mark-btn:hover::after { opacity: .55; }

/* Hide magnifier hints on touch devices */
@media (hover: none) {
  .logo-card::after,
  .global-mark-btn::after { display: none; }
}

/* ── Conflict field highlight ── */
.dyp-conflict {
  border-color: var(--color-error, #c0392b) !important;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.25) !important;
}

.dyp-conflict-field label {
  color: var(--color-error, #c0392b);
}

.dyp-conflict-banner {
  background: #fdf0ee;
  border: 1px solid #e8b4ae;
  border-radius: 6px;
  color: #922b21;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.dyp-conflict-banner[hidden] {
  display: none;
}

/* ── Reason list warning highlight ─────────────────────────────────────── */
.whyList li.reason-warning {
  background: #fdf0ee;
  border-left: 3px solid var(--color-error, #c0392b);
  border-radius: 4px;
  color: #922b21;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  margin: 4px 0;
  list-style: none;
}

.whyList li.reason-warning::before {
  content: "⚠ ";
  font-weight: 700;
  margin-right: 4px;
}

/* When a section header contains a warning, tint the toggle */
section.sec.sec-has-warning > .sec-toggle {
  color: #922b21;
}

section.sec.sec-has-warning > .sec-toggle .sec-title::after {
  content: " ⚠";
  color: var(--color-error, #c0392b);
  font-weight: 700;
}

/* ── Narrow mobile ── */
@media (max-width: 480px) {
  .confidence-pill {
    margin-left: 0;
    margin-top: 4px;
  }
  .estimator.result-mode .result {
    padding: 14px 14px 12px;
  }
  .bigline { font-size: 24px; }
  .chip { font-size: 11px; padding: 5px 8px; }
}