:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --bg-2: #ebe6dc;
  --surface: #fffdf8;
  --surface-2: #f9f6ef;
  --ink: #101216;
  --text: #101216;
  --muted: #626873;
  --muted-2: #8a8f99;
  --line: #e4ded2;
  --soft: #eee9df;
  --accent: #101216;
  --accent-2: #24272e;
  --danger: #b42318;
  --danger-bg: #fff0ec;
  --ok: #147a53;
  --note: #8a5a00;
  --note-bg: #fff7df;
  --shadow: 0 22px 60px rgba(22, 20, 16, 0.10);
  --shadow-soft: 0 12px 30px rgba(22, 20, 16, 0.07);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --max: 1040px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.8), transparent 36%),
    radial-gradient(circle at 92% 8%, rgba(255,255,255,.45), transparent 28%),
    linear-gradient(180deg, #f8f6f1 0%, var(--bg) 52%, #ece7dc 100%);
  color: var(--ink);
}
button, input, textarea, select {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }

.app-shell { min-height: 100vh; }
.screen {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 24px 18px calc(132px + env(safe-area-inset-bottom));
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .88rem; line-height: 1.45; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lock-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}
.lock-card {
  width: min(520px, 100%);
  background: rgba(255, 253, 248, .86);
  border: 1px solid rgba(228, 222, 210, .9);
  border-radius: 36px;
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.brand-row, .brand-mini {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-mark, .logo-mini {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fffaf0;
  font-weight: 1000;
  box-shadow: inset 0 -10px 18px rgba(255,255,255,.08);
}
.logo-mark { width: 64px; height: 64px; border-radius: 22px; font-size: 2rem; }
.logo-mini { width: 48px; height: 48px; border-radius: 18px; font-size: 1.45rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: clamp(2.1rem, 7vw, 3.4rem); letter-spacing: -0.075em; line-height: .95; }
.brand-mini h1 { font-size: clamp(1.55rem, 4vw, 2rem); letter-spacing: -0.06em; }
h2 { font-size: clamp(1.65rem, 6vw, 2.8rem); letter-spacing: -0.06em; line-height: 1.02; margin-bottom: 10px; }
h3 { font-size: 1.05rem; letter-spacing: -0.025em; margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 1.08rem; line-height: 1.5; margin: 20px 0; }
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}
.trust-strip span {
  padding: 9px 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 850;
}
.auth-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.auth-box h2 { font-size: 1.4rem; margin-bottom: 0; }
label { display: block; color: var(--muted); font-size: .84rem; font-weight: 800; margin: 10px 0 7px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 18px;
  padding: 15px 16px;
  outline: none;
  min-height: 52px;
}
textarea { min-height: 94px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus {
  border-color: #a7a095;
  box-shadow: 0 0 0 4px rgba(16, 18, 22, .08);
}
.message { min-height: 22px; color: var(--danger); font-weight: 750; margin: 14px 0 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0 22px;
}
.topbar p { margin: 3px 0 0; }
main { display: block; }
.tab-panel { animation: fadeIn .16s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

button, .button {
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 900;
  letter-spacing: -0.015em;
}
.primary {
  background: var(--accent);
  color: #fffaf0;
  box-shadow: 0 12px 24px rgba(16, 18, 22, .12);
}
.primary:hover { background: var(--accent-2); }
.ghost { background: var(--soft); color: var(--accent); }
.ghost:hover { filter: brightness(.98); }
.danger { background: var(--danger); color: white; }
.danger.ghost { background: var(--danger-bg); color: var(--danger); }
.full { width: 100%; }
.icon-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--soft);
  font-size: 1.35rem;
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px;
  background: linear-gradient(145deg, #111318 0%, #252831 100%);
  color: #fffaf0;
  border-radius: 34px;
  padding: clamp(22px, 5vw, 34px);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.hero-card:after {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 250px;
  height: 250px;
  border-radius: 60px;
  background: rgba(255,255,255,.08);
  transform: rotate(18deg);
}
.hero-card > * { position: relative; z-index: 1; }
.hero-card .eyebrow, .hero-card .muted { color: rgba(255,250,240,.72); }
.hero-card h2 { margin-bottom: 12px; max-width: 650px; }
.hero-card .primary { background: #fffaf0; color: var(--accent); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.stat-card, .panel-card, .quick-panel, .toolbar-card, .item-card, .empty {
  background: rgba(255, 253, 248, .88);
  border: 1px solid rgba(228, 222, 210, .9);
  box-shadow: var(--shadow-soft);
}
.stat-card {
  border-radius: 24px;
  padding: 17px;
}
.stat-card span {
  display: block;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -0.06em;
}
.stat-card p { margin: 6px 0 0; color: var(--muted); font-weight: 750; font-size: .86rem; }

.quick-panel, .toolbar-card, .panel-card, .empty, .backup-reminder { border-radius: var(--radius-lg); }
.backup-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  margin: 0 0 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  box-shadow: var(--shadow-soft);
}
.backup-reminder.good {
  background: #effcf6;
  border-color: #b7e4cc;
}
.backup-reminder strong { display: block; margin-bottom: 3px; }
.backup-reminder p { margin: 0; }
.backup-reminder button { flex: 0 0 auto; }
.quick-panel { padding: 18px; margin-bottom: 16px; }
.quick-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}
.quick-head p, .quick-head h3 { margin-bottom: 0; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.quick-template {
  text-align: left;
  min-height: 88px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 20px;
  padding: 14px;
  font-weight: 900;
}
.quick-template span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
}
.toolbar-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 10px;
  margin-bottom: 14px;
}
.toolbar-card input { border-radius: 22px; border-color: transparent; background: #fff; }
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 0 12px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  background: rgba(255,253,248,.85);
  border: 1px solid var(--line);
  color: var(--muted);
}
.chip.active { background: var(--accent); color: #fffaf0; border-color: var(--accent); }
.cards { display: grid; gap: 12px; }
.item-card {
  border-radius: 28px;
  padding: 18px;
  display: grid;
  gap: 12px;
}
.item-card.deadline-overdue { border-color: #fecaca; background: #fff7f7; }
.item-card.deadline-soon { border-color: #fed7aa; background: #fffaf4; }
.item-card.deadline-ok { border-color: #bbf7d0; background: #f8fffb; }
.item-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.item-title h3 { font-size: 1.14rem; margin: 0 0 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  background: var(--soft);
  color: var(--muted);
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 900;
}
.value-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  min-height: 52px;
  display: flex;
  align-items: center;
  font-size: 1.02rem;
}
.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .86rem;
}
.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.item-actions button { min-height: 40px; padding: 0 14px; font-size: .9rem; }
.empty { padding: 36px 20px; text-align: center; }

.section-title {
  background: rgba(255,253,248,.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 14px;
}
.backup-layout, .settings-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.panel-card { padding: 20px; }
.panel-card p { color: var(--muted); line-height: 1.5; }
.backup-main { background: #111318; color: #fffaf0; }
.backup-main p { color: rgba(255,250,240,.72); }
.privacy-grid .wide { grid-column: 1 / -1; }
.privacy-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--accent);
  color: #fffaf0;
  font-weight: 1000;
  margin-bottom: 14px;
}

.settings-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
.settings-layout > * { min-width: 0; }
.status-card, .safety-card, .limits-card, .danger-card { grid-column: 1 / -1; }
.settings-control-card { grid-column: span 6; }
.danger-card { margin-bottom: 52px; }
.settings-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.settings-card-head h3,
.settings-card-head p { margin-bottom: 0; }
.settings-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 15px;
  background: var(--accent);
  color: #fffaf0;
  font-weight: 1000;
}
.safety-card {
  background: #111318;
  color: #fffaf0;
  padding: 22px;
}
.safety-card .muted,
.safety-card p { color: rgba(255,250,240,.74); }
.safety-card .settings-icon { background: #fffaf0; color: var(--accent); }
.privacy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.privacy-list div {
  display: grid;
  gap: 3px;
  padding: 13px;
  border: 1px solid rgba(255,250,240,.13);
  background: rgba(255,250,240,.06);
  border-radius: 18px;
}
.privacy-list strong { font-size: .92rem; }
.privacy-list span { color: rgba(255,250,240,.68); font-size: .86rem; line-height: 1.35; }
.warning-text {
  margin: 14px 0 0;
  padding: 12px 13px;
  border-radius: 18px;
  background: rgba(255,250,240,.08);
  font-weight: 850;
}
.danger-card {
  border-color: rgba(180, 35, 24, .20);
}
.danger-card .settings-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

.tabs {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(640px, calc(100% - 28px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  background: rgba(255,253,248,.86);
  border: 1px solid rgba(228, 222, 210, .95);
  box-shadow: 0 18px 50px rgba(22,20,16,.16);
  backdrop-filter: blur(18px);
  border-radius: 999px;
}
.tab {
  min-height: 48px;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0 8px;
  font-size: .88rem;
}
.tab.active { background: var(--accent); color: #fffaf0; }

.modal {
  width: min(560px, calc(100% - 24px));
  border: 0;
  border-radius: 30px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(16,18,22,.45); backdrop-filter: blur(4px); }
.modal form { padding: 22px; max-height: min(82vh, 760px); overflow-y: auto; }
.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}
.modal-head h2 { font-size: 1.7rem; margin: 0; }
.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.inline-check input { width: auto; min-height: auto; transform: scale(1.15); }
.inline-check label { margin: 0; }
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.recovery-steps { margin-top: 14px; }
.recovery-steps ol { margin: 8px 0 0; padding-left: 22px; color: var(--muted); line-height: 1.7; }
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.status-grid div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}
.status-grid strong { display: block; font-size: .95rem; overflow-wrap: anywhere; }
.status-grid span { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 30;
  max-width: calc(100% - 28px);
  padding: 12px 16px;
  border-radius: 999px;
  background: #111318;
  color: #fffaf0;
  box-shadow: var(--shadow-soft);
  font-weight: 850;
}

@media (max-width: 760px) {
  .screen { padding: 14px 14px calc(140px + env(safe-area-inset-bottom)); }
  .topbar { padding-top: 4px; }
  .brand-mini { gap: 10px; }
  .logo-mini { width: 42px; height: 42px; border-radius: 16px; }
  #privacyLine { display: none; }
  .hero-card { grid-template-columns: 1fr; align-items: start; }
  .hero-card .primary { width: 100%; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat-card { padding: 14px 12px; border-radius: 20px; }
  .stat-card p { font-size: .75rem; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar-card { grid-template-columns: 1fr; }
  .toolbar-card .primary, .toolbar-card .ghost { width: 100%; }
  .backup-reminder { align-items: stretch; flex-direction: column; }
  .backup-reminder button { width: 100%; }
  .backup-layout, .settings-layout { grid-template-columns: 1fr; }
  .status-card, .safety-card, .limits-card, .danger-card, .settings-control-card { grid-column: 1 / -1; }
  .privacy-list { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .item-top { align-items: start; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
}

@media (max-width: 420px) {
  h1 { font-size: 2.3rem; }
  .lock-card { padding: 20px; border-radius: 30px; }
  .quick-grid { grid-template-columns: 1fr; }
  .tabs { width: calc(100% - 18px); bottom: calc(10px + env(safe-area-inset-bottom)); }
  .tab { font-size: .8rem; }
}


/* v0.5 */
.real-use-card {
  background: rgba(255, 253, 248, .90);
  border: 1px solid rgba(228, 222, 210, .9);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 0 0 16px;
}
.real-use-head h3 { margin-bottom: 4px; }
.check-list {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 14px 0;
}
.check-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}
.check-list li span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 1000;
}
.check-list li.ok span { background: #eaf8f0; color: var(--ok); }
.check-list li.warn span { background: var(--danger-bg); color: var(--danger); }
.real-use-actions {
  display: flex;
  gap: 10px;
}
.real-use-actions button { flex: 1; }
.wide-card { grid-column: 1 / -1; }
.verify-result {
  min-height: 22px;
  margin: 12px 0 0;
  font-weight: 800;
}
.verify-result.ok { color: var(--ok); }
.verify-result.bad { color: var(--danger); }
.install-steps { margin-top: 14px; }

@media (max-width: 760px) {
  .real-use-actions { flex-direction: column; }
}

/* v0.6 - foto e rifinitura visiva */
:root {
  --bg: #f3efe7;
  --surface: #fffdfa;
  --surface-2: #f7f3ec;
  --ink: #111318;
  --muted: #5f6672;
  --line: #e1d9cb;
  --soft: #ece6dc;
  --shadow: 0 18px 44px rgba(35, 31, 24, 0.10);
  --shadow-soft: 0 10px 24px rgba(35, 31, 24, 0.07);
}

.screen { max-width: 980px; }
.hero-card,
.safety-card,
.backup-main {
  background: #121419;
}
.hero-card {
  border: 1px solid rgba(255,255,255,.07);
}
.item-card,
.panel-card,
.quick-panel,
.toolbar-card,
.section-title,
.stat-card {
  background: rgba(255,253,250,.88);
  border: 1px solid rgba(225,217,203,.95);
  box-shadow: var(--shadow-soft);
}
.item-card {
  padding: 16px;
  border-radius: 24px;
}
.item-title h3 { font-size: 1.06rem; }
.value-box {
  border-radius: 17px;
  background: rgba(255,255,255,.82);
}
.item-meta span {
  line-height: 1.35;
}
.item-actions .ghost,
.item-actions .primary {
  min-height: 38px;
}
.badge {
  background: #eee8dc;
  color: #565e6b;
}

.photo-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 2px 0 1px;
  scrollbar-width: none;
}
.photo-strip::-webkit-scrollbar { display: none; }
.photo-thumb,
.photo-preview-btn {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
  flex: 0 0 auto;
}
.photo-thumb {
  width: 72px;
  height: 72px;
  min-height: 72px;
  border-radius: 18px;
}
.photo-thumb img,
.photo-preview-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-more {
  flex: 0 0 auto;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--muted);
  font-weight: 900;
}

.photo-box {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed #d3c8b7;
  border-radius: 22px;
  background: #fbf7f0;
}
.photo-box label { margin-top: 0; }
.photo-box input[type="file"],
.file-picker-row input[type="file"] {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.file-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: #0f1115;
  color: #fffaf0;
  font-weight: 900;
  cursor: pointer;
}
.file-picker-text {
  color: var(--muted);
  font-size: 0.9rem;
}
.photo-draft-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.photo-empty { margin: 0; }
.photo-draft {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.photo-preview-btn {
  width: 64px;
  height: 64px;
  min-height: 64px;
  border-radius: 15px;
}
.photo-draft strong,
.photo-draft span {
  display: block;
  overflow-wrap: anywhere;
}
.photo-draft span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}
.photo-draft .remove-photo-btn {
  min-height: 38px;
  padding: 0 12px;
  font-size: .84rem;
}

.photo-viewer {
  width: min(900px, calc(100% - 22px));
  border: 0;
  padding: 12px;
  border-radius: 28px;
  background: #fffdfa;
  box-shadow: var(--shadow);
}
.photo-viewer::backdrop {
  background: rgba(17,19,24,.72);
  backdrop-filter: blur(6px);
}
.photo-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 12px;
}
.photo-viewer-head h2 {
  margin: 0;
  font-size: 1.3rem;
}
.photo-viewer img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  border-radius: 20px;
  background: #eee8dc;
}

@media (min-width: 900px) {
  .cards { gap: 14px; }
  .item-card { padding: 18px; }
}

@media (max-width: 760px) {
  .photo-draft { grid-template-columns: 58px 1fr; }
  .photo-draft .remove-photo-btn { grid-column: 1 / -1; width: 100%; }
  .photo-thumb { width: 66px; height: 66px; min-height: 66px; border-radius: 16px; }
  .item-card { border-radius: 22px; }
  .hero-card { border-radius: 28px; }
}

/* v0.7 - review fixes */

.unlock-animation {
  position: absolute;
  inset: 18px;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border-radius: 28px;
  background: rgba(255,253,248,.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(228,222,210,.95);
  box-shadow: 0 22px 60px rgba(22,20,16,.16);
  animation: unlockFadeIn .18s ease-out both;
}
.unlock-animation strong {
  font-size: 1rem;
  letter-spacing: -.02em;
}
.unlock-ring {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fffaf0;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(17,19,24,.20);
  animation: unlockPulse .68s ease-out both;
}
.unlock-ring span {
  font-size: 2.15rem;
  font-weight: 1000;
  transform: translateY(-1px);
}
.lock-card {
  position: relative;
}
.lock-card.is-unlocking > :not(.unlock-animation) {
  opacity: .22;
  transform: scale(.985);
  transition: opacity .18s ease, transform .18s ease;
}
@keyframes unlockFadeIn {
  from { opacity: 0; transform: scale(.98); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes unlockPulse {
  0% { transform: scale(.82); box-shadow: 0 0 0 0 rgba(17,19,24,.24); }
  60% { transform: scale(1.05); box-shadow: 0 0 0 22px rgba(17,19,24,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(17,19,24,0); }
}

.hidden-soft,
.advanced-hidden {
  display: none !important;
}
.import-lock-box {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.password-meter {
  margin: 8px 0 10px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--muted);
}
.password-meter.good { color: var(--ok); }
.password-meter.bad { color: var(--danger); }
.hero-card {
  min-height: unset;
  padding: 22px;
}
.hero-card h2 {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: .98;
}
.toolbar-card {
  grid-template-columns: 1fr auto;
}
.status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.limits-card {
  background: #fffdf9;
}
.light-list div {
  background: rgba(247,243,236,.8);
  border-color: var(--line);
}
.light-list strong { color: var(--text); }
.light-list span { color: var(--muted); }
.photo-box {
  background: #fffaf1;
}
@media (max-width: 760px) {
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar-card {
    grid-template-columns: 1fr;
  }
  .hero-card {
    gap: 18px;
  }
}

/* v0.7.2 - fix impostazioni + foto protette */
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.settings-layout > *,
.status-card,
.safety-card,
.limits-card,
.danger-card,
.settings-control-card {
  grid-column: 1 / -1 !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
  transform: none;
  box-sizing: border-box;
}
.settings-control-card {
  display: block;
}
.settings-card-head > div {
  min-width: 0;
}
.settings-card-head h3,
.settings-card-head p,
.privacy-list strong,
.privacy-list span {
  overflow-wrap: anywhere;
}
.photo-locked {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: rgba(247,243,236,.72);
  color: var(--muted);
  font-size: .88rem;
}
.photo-locked strong {
  color: var(--text);
  font-size: .92rem;
}
@media (min-width: 880px) {
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* v0.7.3 - fix contrasto card sicurezza/impostazioni */
:root { --text: var(--ink); }
.panel-card.safety-card {
  background: #121419 !important;
  color: #fffaf0 !important;
  border-color: rgba(255, 255, 255, .08) !important;
}
.panel-card.safety-card h3,
.panel-card.safety-card strong {
  color: #fffaf0 !important;
}
.panel-card.safety-card .muted,
.panel-card.safety-card p {
  color: rgba(255, 250, 240, .74) !important;
}
.panel-card.safety-card .settings-icon {
  background: #fffaf0 !important;
  color: #121419 !important;
}
.panel-card.safety-card .privacy-list div {
  background: rgba(255, 250, 240, .07) !important;
  border-color: rgba(255, 250, 240, .14) !important;
}
.panel-card.safety-card .privacy-list span {
  color: rgba(255, 250, 240, .68) !important;
}
.panel-card.safety-card .warning-text {
  background: rgba(255, 250, 240, .09) !important;
  color: #fffaf0 !important;
}
.panel-card.limits-card {
  background: rgba(255, 253, 250, .88) !important;
  color: var(--ink) !important;
}
.panel-card.limits-card h3,
.panel-card.limits-card strong {
  color: var(--ink) !important;
}
.panel-card.limits-card .muted,
.panel-card.limits-card span,
.panel-card.limits-card p {
  color: var(--muted) !important;
}


/* v0.8: accesso rapido, preferiti e controlli formato */
.quick-access-panel {
  padding: 16px;
  margin: 16px 0;
  border-radius: 24px;
  background: rgba(255, 253, 248, .88);
  border: 1px solid rgba(228, 222, 210, .9);
  box-shadow: var(--shadow-soft);
}
.quick-access-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-access-item {
  min-height: 72px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-align: left;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
}
.quick-access-title {
  font-weight: 950;
  line-height: 1.1;
}
.quick-access-meta {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}
.item-card-actions-top {
  display: flex;
  gap: 8px;
  align-items: center;
}
.fav-btn {
  min-height: 42px;
  width: 42px;
  padding: 0;
  font-size: 1.05rem;
}
.validation-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: -2px 0 10px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  border: 1px solid var(--line);
}
.validation-pill.ok {
  color: var(--ok);
  background: rgba(20, 122, 83, .08);
}
.validation-pill.warn {
  color: var(--danger);
  background: var(--danger-bg);
}
.validation-pill.note {
  color: var(--note);
  background: var(--note-bg);
}

@media (max-width: 720px) {
  .quick-access-list { grid-template-columns: repeat(2, 1fr); }
  .quick-access-item { min-height: 66px; }
}

/* Tascly public styles */
.logo-mark,
.logo-mini {
  letter-spacing: -0.08em;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.logo-mark { font-size: 1.45rem; }
.logo-mini { font-size: 1.02rem; }
.hero-card {
  padding: 18px;
  border-radius: 28px;
  box-shadow: 0 14px 34px rgba(17,19,24,.10);
}
.hero-card:after {
  width: 170px;
  height: 170px;
  right: -60px;
  top: -70px;
  opacity: .72;
}
.hero-card h2 {
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  letter-spacing: -0.055em;
  margin-bottom: 8px;
}
.hero-card .muted {
  max-width: 520px;
  margin-bottom: 0;
}
.quick-access-panel {
  margin: 12px 0;
}
.quick-panel {
  margin-bottom: 12px;
}
.quick-template {
  min-height: 76px;
  border-radius: 18px;
}
.item-card {
  border-radius: 22px;
}
.value-box {
  min-height: 48px;
}
.backup-after {
  margin: 10px 0 0;
}
.save-guide-card {
  grid-column: 1 / -1 !important;
}
.save-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.save-guide-grid div {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 18px;
  padding: 12px;
}
.save-guide-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}
.save-guide-grid span {
  display: block;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
}
.photo-box strong {
  color: var(--ink);
}
@media (max-width: 760px) {
  .hero-card { padding: 17px; }
  .hero-card h2 { font-size: 1.9rem; }
  .save-guide-grid { grid-template-columns: 1fr; }
  .quick-access-list { grid-template-columns: 1fr; }
}


/* v0.9.1 - fiducia e protezione */
.protection-level-card select { margin-bottom: 8px; }
.risk-badge { background: #fff2cc; border-color: #efd08c; color: #6f4d00; }
.save-guide-card .save-guide-grid div { min-height: 94px; }
.panel-card.limits-card .privacy-list div { background: rgba(255,253,248,.86); }
.item-card .badge + .risk-badge { margin-left: 6px; }
@media (max-width: 620px) {
  .save-guide-card .save-guide-grid { grid-template-columns: 1fr; }
}

/* Rifiniture sicurezza e recupero */
.section-title-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.section-title-actions > div { min-width: 0; }
.section-title-actions button { white-space: nowrap; }
.reauth-modal form { max-width: 460px; }
.reauth-modal .message { min-height: 20px; margin: 8px 0 0; }
.storage-card .settings-icon { background: #f3f0e8; color: var(--accent); }
#mergeImportBtn { margin-top: 8px; }
#requestPersistBtn { margin-top: 10px; }
@media (max-width: 700px) {
  .section-title-actions { display: block; }
  .section-title-actions button { width: 100%; margin-top: 10px; }
}


/* v1.3 - monetizzazione soft */
.pro-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  background: #121419;
  color: #fffaf0;
}
.pro-hero .muted,
.pro-hero .eyebrow { color: rgba(255,250,240,.72); }
.pro-hero h3 { font-size: clamp(1.55rem, 5vw, 2.4rem); margin-bottom: 8px; }
.pro-price {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 104px;
  min-height: 104px;
  border-radius: 30px;
  background: #fffaf0;
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 1000;
  letter-spacing: -0.05em;
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.plan-card { display: flex; flex-direction: column; gap: 12px; }
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.plan-head h3 { margin: 0; font-size: 1.25rem; }
.plan-head span {
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.feature-list {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}
.feature-list li {
  padding: 10px 11px;
  border-radius: 15px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.pro-selected { border-color: rgba(16,18,22,.28); outline: 3px solid rgba(16,18,22,.07); }
.usage-box {
  margin-top: auto;
  padding: 13px;
  border-radius: 18px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.usage-box strong { display: block; font-size: 1.45rem; line-height: 1; margin-bottom: 5px; }
.usage-box span { color: var(--muted); font-size: .84rem; font-weight: 750; line-height: 1.35; }
.pro-note-card { margin-bottom: 16px; }
.pro-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pro-actions button { flex: 1 1 160px; }
@media (max-width: 760px) {
  .pro-hero { flex-direction: column; align-items: stretch; }
  .pro-price { min-width: 100%; min-height: 76px; border-radius: 22px; }
  .plans-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .tab { font-size: .74rem; padding: 0 4px; }
}


/* v1.4.3 - fiducia: copy più rassicurante e pulsanti leggibili */
.trust-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ghost-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 800; text-decoration: none; }
.password-meter.warn { color: #946200; }
.doc-screen { max-width: 900px; margin: 0 auto; padding: 24px 16px 72px; }
.doc-card { margin-top: 24px; }
.doc-card h1 { margin-bottom: 12px; }
.doc-card h2 { margin-top: 24px; margin-bottom: 10px; }
.doc-list { padding-left: 18px; color: var(--muted); }
.doc-list li { margin-bottom: 8px; }
.doc-note { background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }


/* v1.4.3 - fix pulsanti dentro la card scura sicurezza */
.panel-card.safety-card .trust-actions .ghost-link {
  background: #fffaf0 !important;
  color: #121419 !important;
  border-color: rgba(255, 250, 240, .85) !important;
}
.panel-card.safety-card .trust-actions .ghost-link:hover,
.panel-card.safety-card .trust-actions .ghost-link:focus {
  background: #ffffff !important;
  color: #121419 !important;
}

/* v1.4.3 trust polish */
.home-trust-line {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,250,240,.92);
  font-size: 13px;
  font-weight: 800;
}
@media (max-width: 640px) {
  .home-trust-line { width: auto; border-radius: 18px; line-height: 1.35; }
}

.home-usage-line {
  max-width: 620px;
  margin: 10px 0 0;
  color: rgba(255,250,240,.78);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}
.home-usage-line strong { color: #fffaf0; }


.feedback-form textarea { min-height: 120px; }
.feedback-form button[disabled] { opacity: .65; cursor: wait; }
.honeypot { position: absolute !important; left: -9999px !important; opacity: 0 !important; height: 1px !important; width: 1px !important; pointer-events: none !important; }

/* v1.6.0 - security showcase card */
.protection-explain-card {
  background: #fffdfa;
}
.protection-explain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.protection-explain-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(244,241,235,.62);
}
.protection-explain-grid strong,
.protection-explain-grid span {
  display: block;
}
.protection-explain-grid strong {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: .92rem;
}
.protection-explain-grid span {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.35;
}
.protection-levels-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.protection-levels-strip .protection-level-option {
  appearance: none;
  width: 100%;
  padding: 11px 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  font: inherit;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.protection-levels-strip .protection-level-option:hover,
.protection-levels-strip .protection-level-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(17,19,24,.45);
  outline: none;
}
.protection-levels-strip .protection-level-option.is-active {
  background: #111318;
  color: #fffaf0;
  border-color: #111318;
}
.protection-levels-strip .protection-level-option.is-active span {
  opacity: .78;
}
.protection-levels-strip strong,
.protection-levels-strip span {
  display: block;
}
.protection-levels-strip span {
  margin-top: 2px;
  color: inherit;
  opacity: .72;
  font-size: .78rem;
  font-weight: 800;
}
@media (max-width: 640px) {
  .protection-explain-grid { grid-template-columns: 1fr; }
  .protection-levels-strip { grid-template-columns: 1fr; }
}

/* v1.6.0 - Global Lite polish */
.backup-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.backup-step-card {
  position: relative;
  overflow: hidden;
}
.step-pill {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffaf0;
  font-weight: 1000;
  margin-bottom: 12px;
}
.backup-main .step-pill {
  background: var(--accent);
  color: #fffaf0;
}
.backup-step-card input { margin: 6px 0 10px; }
.split-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.clean-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.clean-list li {
  position: relative;
  padding-left: 26px;
  line-height: 1.45;
}
.clean-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 1000;
  color: var(--ok);
}
.language-card select { margin-top: 6px; }
@media (max-width: 760px) {
  .backup-flow { grid-template-columns: 1fr; }
}

/* Informative cards: these are guides, not selectable controls. */
.panel-card.limits-card .privacy-list div,
.save-guide-card .save-guide-grid div {
  background: rgba(255,253,248,.56);
  border-style: dashed;
  cursor: default;
  box-shadow: none;
}
.panel-card.limits-card .privacy-list div:hover,
.save-guide-card .save-guide-grid div:hover {
  transform: none;
}

/* v1.6.2 - clarity fixes: one protection control, static info cards */
.protection-level-chooser {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(17,19,24,.12);
  border-radius: 18px;
  background: #f7f2ea;
}
.chooser-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.chooser-head h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.chooser-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #111318;
  color: #fffaf0;
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
}
.protection-note {
  margin: 10px 2px 0;
}
.protection-explain-grid div,
.privacy-list.light-list div,
.save-guide-grid div {
  cursor: default;
}
.privacy-list.light-list div,
.save-guide-grid div {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}
.privacy-list.light-list div:hover,
.save-guide-grid div:hover,
.protection-explain-grid div:hover {
  transform: none;
}
.limits-card .settings-icon,
.save-guide-card .settings-icon {
  opacity: .78;
}
@media (max-width: 640px) {
  .chooser-head { flex-direction: column; }
  .chooser-pill { align-self: flex-start; }
}


/* v1.6.3 - clearer protection levels */
.security-level-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.level-info-card {
  padding: 13px;
  border: 1px dashed rgba(42, 45, 55, .28);
  border-radius: 16px;
  background: rgba(255,255,255,.58);
}
.level-info-card strong,
.level-info-card span,
.level-info-card em {
  display: block;
}
.level-info-card strong {
  color: var(--ink);
  font-size: .9rem;
  margin-bottom: 4px;
}
.level-info-card span {
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.34;
}
.level-info-card em {
  margin-top: 8px;
  color: var(--text);
  font-style: normal;
  font-size: .77rem;
  font-weight: 800;
}
.level-info-card.is-active {
  border-style: solid;
  border-color: #111318;
  background: rgba(17,19,24,.055);
}
@media (max-width: 760px) {
  .security-level-comparison { grid-template-columns: 1fr; }
}

/* v1.7.0 - first-run and Pro validation polish */
.first-run-guide,
.lite-pro-card {
  margin: 14px 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255,253,250,.90);
  border: 1px solid rgba(225,217,203,.95);
  box-shadow: var(--shadow-soft);
}
.guide-head,
.lite-pro-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.guide-head h3,
.lite-pro-top h3 {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
}
.guide-head p,
.lite-pro-top p { margin-bottom: 0; }
.guide-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #111318;
  color: #fffaf0;
  font-size: .72rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.guide-steps,
.plan-compare-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.guide-steps div,
.plan-compare-mini div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
}
.guide-steps strong,
.guide-steps span,
.plan-compare-mini strong,
.plan-compare-mini span {
  display: block;
}
.guide-steps strong,
.plan-compare-mini strong {
  color: var(--ink);
  margin-bottom: 6px;
  font-size: .92rem;
}
.guide-steps span,
.plan-compare-mini span {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
}
.guide-actions,
.pro-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.guide-actions button,
.pro-actions-row button {
  flex: 1 1 180px;
}
.lite-pro-card {
  background: linear-gradient(145deg, rgba(255,253,250,.96), rgba(247,243,236,.94));
}
.lite-pro-card.is-near-limit {
  border-color: #f59e0b;
  box-shadow: 0 12px 28px rgba(245,158,11,.12);
}
.lite-meter {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 112px;
  min-height: 92px;
  border-radius: 24px;
  background: #111318;
  color: #fffaf0;
  text-align: center;
}
.lite-meter strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -.04em;
}
.lite-meter span {
  display: block;
  margin-top: 5px;
  color: rgba(255,250,240,.72);
  font-size: .78rem;
  font-weight: 850;
}
.plan-compare-mini {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-compare-mini .pro-mini {
  border-color: rgba(17,19,24,.18);
  background: rgba(17,19,24,.045);
}
.pro-honest-note {
  margin: 10px 2px 0;
}
@media (max-width: 760px) {
  .guide-head,
  .lite-pro-top {
    flex-direction: column;
  }
  .guide-steps,
  .plan-compare-mini {
    grid-template-columns: 1fr;
  }
  .lite-meter {
    width: 100%;
    min-height: 74px;
    border-radius: 20px;
  }
}
.empty .primary { margin-top: 12px; }


/* v1.7.3 - owner field + backup/pro clarity */
.transfer-card {
  background: linear-gradient(145deg, rgba(255,253,248,.98), rgba(241,236,226,.94));
}
.transfer-card .muted.small { margin-top: 10px; }
.settings-layout .limits-card,
.settings-layout .save-guide-card { user-select: text; }
.tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 430px) { .tabs span { font-size: .78rem; } }


/* v1.7.3 - owner field + backup/pro clarity */
.owner-badge {
  margin-left: 6px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
}
.backup-reminder.urgent {
  background: #fff1f2;
  border-color: #fecdd3;
}
.owner-hint {
  margin-top: -4px;
}

/* v1.7.4 Trust Polish */
.trust-proof-card {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 16px;
  margin: 16px 0 18px;
  padding: 18px;
  border: 1px solid rgba(16,18,22,.09);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(16,18,22,.08), transparent 28%),
    rgba(255,253,248,.88);
  box-shadow: 0 16px 34px rgba(16,18,22,.07);
}
.trust-proof-card h3 { margin-bottom: 8px; font-size: clamp(1.25rem, 4vw, 1.75rem); letter-spacing: -.05em; }
.trust-pill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.trust-pill-grid span {
  display: grid;
  gap: 4px;
  padding: 14px 14px;
  border-radius: 18px;
  background: #f5f0e5;
  border: 1px solid rgba(16,18,22,.08);
}
.trust-pill-grid strong { font-size: .9rem; letter-spacing: -.02em; }
.trust-pill-grid em { font-style: normal; color: var(--muted); font-size: .78rem; font-weight: 750; }
.data-flow-card { grid-column: 1 / -1; }
.data-flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.data-flow-steps div {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(16,18,22,.08);
  background: rgba(255,253,248,.86);
}
.data-flow-steps span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--accent);
  color: #fffaf0;
  font-weight: 1000;
  font-size: .78rem;
}
.data-flow-steps strong { font-size: .9rem; letter-spacing: -.02em; }
.data-flow-steps em { font-style: normal; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.data-flow-note { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: #fff7df; color: #7a4f00 !important; font-weight: 800; }
.feedback-privacy-note {
  margin: 8px 0 0 !important;
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff7df;
  color: #7a4f00 !important;
  font-size: .78rem;
  font-weight: 900;
}
.doc-trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.doc-trust-grid div { padding: 16px; border: 1px solid rgba(16,18,22,.08); border-radius: 18px; background: rgba(255,253,248,.86); }
.doc-trust-grid strong { display:block; margin-bottom: 6px; }
.doc-trust-grid span { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.trust-doc-hero { background: linear-gradient(135deg, rgba(255,253,248,.96), rgba(245,240,229,.92)); }
@media (max-width: 760px) {
  .trust-proof-card, .data-flow-steps, .doc-trust-grid { grid-template-columns: 1fr; }
  .trust-pill-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .trust-pill-grid { grid-template-columns: 1fr; }
}

/* v1.7.5 Home Priority — app first, marketing later */
.home-priority .primary-toolbar-card {
  position: sticky;
  top: 10px;
  z-index: 8;
  margin: 10px 0 10px;
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(16,18,22,.08);
}
.home-priority .chips {
  padding-bottom: 10px;
  margin-bottom: 2px;
}
.home-priority .cards {
  margin-bottom: 14px;
}
.home-priority .empty-priority {
  margin: 8px 0 14px;
  padding: 30px 20px;
}
.home-priority .quick-access-panel {
  margin: 8px 0 12px;
}
.home-priority .home-action-panel {
  margin-top: 10px;
}
.home-priority .first-run-guide {
  margin: 10px 0 14px;
}
.home-priority .compact-guide-card .guide-steps div {
  min-height: auto;
}
.home-priority .backup-reminder {
  margin-top: 12px;
}
.home-priority .compact-trust-card {
  display: block;
  margin: 14px 0;
  padding: 0;
  overflow: hidden;
  background: rgba(255,253,248,.82);
}
.home-priority .compact-trust-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.home-priority .compact-trust-card summary::-webkit-details-marker { display: none; }
.home-priority .compact-trust-card summary::after {
  content: "↓";
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 1000;
}
.home-priority .compact-trust-card[open] summary::after { content: "↑"; }
.home-priority .compact-trust-card summary span { display: grid; gap: 4px; }
.home-priority .compact-trust-card summary strong { font-size: 1rem; }
.home-priority .compact-trust-card summary em { font-style: normal; color: var(--muted); font-size: .86rem; font-weight: 750; }
.home-priority .compact-trust-card .trust-pill-grid { padding: 0 18px 18px; }
.home-priority .starter-hero-card {
  margin: 14px 0;
  padding: 18px;
  border-radius: 24px;
  grid-template-columns: 1fr auto;
}
.home-priority.has-items .starter-hero-card { display: none !important; }
.home-priority.has-items .quick-panel { margin-top: 2px; }
.home-priority .lite-pro-card { margin-top: 16px; }
.topbar .brand-mini .small {
  max-width: 62vw;
}
@media (max-width: 760px) {
  .home-priority .primary-toolbar-card {
    position: sticky;
    top: 8px;
    grid-template-columns: 1fr auto;
  }
  .home-priority .primary-toolbar-card #copyFilteredBtn { display: none !important; }
  .home-priority .primary-toolbar-card #addItemBtn {
    width: auto;
    min-width: 94px;
  }
  .home-priority .quick-access-list { grid-template-columns: 1fr 1fr; }
  .home-priority .starter-hero-card {
    grid-template-columns: 1fr;
  }
  .home-priority .starter-hero-card .primary { width: 100%; }
  .home-priority .compact-trust-card .trust-pill-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .home-priority .quick-grid { grid-template-columns: 1fr 1fr; }
  .home-priority .guide-steps { grid-template-columns: 1fr; }
}


.backup-file-picker {
  margin: 12px 0;
}
.compact-settings-card .settings-card-head {
  margin-bottom: 14px;
}
.compact-list {
  gap: 8px;
}
.compact-list div {
  padding: 12px;
}
.compact-protection {
  margin-top: 0;
}
.compact-protection .protection-note {
  margin: 12px 0 0;
}

/* v1.7.9 — English first-run readiness and Play Store screenshot polish */
.home-value-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 4px 0 14px;
  padding: 20px;
  border: 1px solid rgba(228, 222, 210, .96);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,253,248,.96), rgba(244,241,235,.92));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.home-value-card h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 5vw, 2.35rem);
}
.home-value-card .muted { margin-bottom: 0; max-width: 640px; }
.home-value-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 8px;
}
.home-value-pills span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffaf0;
  font-size: .8rem;
  font-weight: 950;
}
.example-use-panel {
  padding: 16px;
  margin: 8px 0 14px;
  border-radius: 24px;
  background: rgba(255, 253, 248, .88);
  border: 1px solid rgba(228, 222, 210, .92);
  box-shadow: var(--shadow-soft);
}
.example-use-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.example-use-card {
  min-height: 112px;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  display: grid;
  align-content: space-between;
  gap: 8px;
}
.example-use-title {
  font-weight: 1000;
  letter-spacing: -.02em;
}
.example-use-sample {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
  font-weight: 750;
}
.example-use-card strong {
  color: var(--accent);
  font-size: .82rem;
}
.copy-btn.copied,
.quick-access-item.copied {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16,18,22,.14);
}
@media (max-width: 760px) {
  .home-value-card { grid-template-columns: 1fr; padding: 18px; }
  .home-value-pills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-value-pills span { min-height: 38px; padding: 8px 6px; font-size: .72rem; }
  .example-use-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 430px) {
  .home-value-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .example-use-list { grid-template-columns: 1fr; }
}
