/* Boscambio: look of the Bosco family (like Boscolor). Phone first; from 992px the menu sits on the LEFT. */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(../fonts/Poppins-Regular.woff) format("woff"); }
@font-face { font-family: Poppins; font-weight: 500 700; font-display: swap; src: url(../fonts/Poppins-Medium.woff) format("woff"); }
@font-face { font-family: Lora; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/Lora-Variable.woff) format("woff"); }
@font-face { font-family: Lora; font-style: italic; font-weight: 400 700; font-display: swap; src: url(../fonts/Lora-Italic-Variable.woff) format("woff"); }

:root {
  --green: #2e4630; --green-2: #3d5a3f; --green-soft: #dfe8cf; --cream: #f6efdc; --paper: #fffaf0; --sand: #e9dfc6;
  --line: #e3d6b6; --line-2: #cdbb92; --rust: #b5562b; --rust-dark: #9a4521; --gold: #e0b04a; --gold-soft: #fbf1d6;
  --ink: #2b241c; --muted: #5d5448; --danger: #a0442a;
  --radius: 14px; --side: 260px; --tabbar: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Poppins, system-ui, sans-serif; font-size: 15px; line-height: 1.5; background: var(--cream); color: var(--ink); }
[hidden] { display: none !important; }
a { color: var(--green); }
a:hover { color: #1f3021; }
h1, h2, h3 { line-height: 1.25; }
img { max-width: 100%; height: auto; }
.ico { flex: none; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------------------------------------------------------------- layout */
.app-main { padding: 16px 14px calc(var(--tabbar) + 24px); max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.page-bare .app-main { padding: 0 0 24px; max-width: none; }
.app-side { display: none; }
.app-top { position: sticky; top: 0; z-index: 20; background: var(--green); color: var(--cream); display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
.top-brand { font-family: Lora, serif; font-size: 24px; font-weight: 500; color: var(--cream); text-decoration: none; margin-right: auto; }
.top-brand:hover { color: var(--cream); }
.top-icon { color: var(--cream); width: 44px; height: 44px; display: grid; place-items: center; }
.top-icon:hover { color: var(--gold); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: center; padding: 6px 4px max(10px, env(safe-area-inset-bottom)); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; min-width: 58px; min-height: 46px; justify-content: center; }
.tab.active { color: var(--green); font-weight: 600; }
.tab-plus { width: 54px; height: 54px; border-radius: 50%; background: var(--rust); color: #fff; display: grid; place-items: center; margin-top: -24px; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.tab-plus:hover { color: #fff; background: var(--rust-dark); }

.lang-switch { display: inline-flex; gap: 4px; }
.lang-switch a { font-size: 12px; text-decoration: none; padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(246,239,220,.45); color: var(--cream); min-height: 32px; display: inline-flex; align-items: center; }
.lang-switch a.on { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }

@media (min-width: 992px) {
  .app-top, .tabbar { display: none; }
  .app-side { display: flex; flex-direction: column; gap: 4px; position: fixed; top: 0; bottom: 0; left: 0; width: var(--side); background: var(--green); color: var(--cream); padding: 20px 14px; overflow-y: auto; z-index: 20; }
  .has-nav .app-main { margin-left: var(--side); max-width: none; padding: 26px 30px 30px; }
  .has-nav .app-main > * { max-width: 1100px; width: 100%; }
}
.side-brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--cream); padding: 0 8px 16px; }
.side-brand:hover { color: var(--cream); }
.side-brand b { display: block; font-family: Lora, serif; font-weight: 500; font-size: 25px; line-height: 1.1; }
.side-brand i { display: block; font-family: Lora, serif; color: var(--gold); font-size: 13px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--cream); text-decoration: none; font-size: 14.5px; }
.side-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-link.active { background: rgba(255,255,255,.15); font-weight: 600; }
.side-publish { margin: 14px 4px 0; }
.side-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.side-user { display: flex; align-items: center; gap: 10px; }
.side-user-name { color: var(--cream); text-decoration: none; font-size: 14px; flex: 1; min-width: 0; }
.side-user-name small { display: block; font-size: 12px; opacity: .8; }
.side-guest { display: flex; flex-direction: column; gap: 8px; }
.side-link-plain { color: var(--cream); text-align: center; font-size: 14px; }
.side-link-plain:hover { color: var(--gold); }

/* ---------------------------------------------------------------- pieces */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn-block { width: 100%; }
.btn-rust { background: var(--rust); color: #fff; } .btn-rust:hover { background: var(--rust-dark); color: #fff; }
.btn-green { background: var(--green); color: #fff; } .btn-green:hover { background: #1f3021; color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); } .btn-gold:hover { background: #d29f33; color: var(--ink); }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line-2); } .btn-line:hover { border-color: var(--green); color: var(--green); }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { background: #82361f; color: #fff; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.icon-btn { width: 40px; height: 40px; border: none; background: none; color: inherit; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.icon-btn:hover { background: rgba(0,0,0,.06); }
.link-btn { border: none; background: none; padding: 6px 2px; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; min-height: 36px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 600; text-decoration: none; flex: none; }
.avatar-lg { width: 62px; height: 62px; font-size: 24px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card-narrow { max-width: 460px; margin: 30px auto; }
.card-title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.sub-title { font-size: 14px; font-weight: 600; margin: 18px 0 6px; }
.page-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; }
.page-h1 { font-family: Lora, serif; font-weight: 500; font-size: 28px; margin: 0; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.center { text-align: center; } .small { font-size: 13px; } .tiny { font-size: 11.5px; color: var(--muted); } .muted { color: var(--muted); }
.rust { color: var(--rust); } .rust:hover { color: var(--rust-dark); }
.inline-form { display: inline; }
.plain-list { margin: 6px 0; padding-left: 18px; }

.flash { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border-radius: 12px; font-size: 14px; border: 1px solid; }
.flash-success { background: var(--green-soft); border-color: #c9d9b6; color: #213823; }
.flash-info { background: #e8eef0; border-color: #c9d6db; color: #24414b; }
.flash-warning { background: var(--gold-soft); border-color: var(--gold); color: #4a3a12; }
.flash-danger { background: #f6dcd2; border-color: #e2a48c; color: #6e2511; }
.flash-close { border: none; background: none; cursor: pointer; color: inherit; width: 32px; height: 32px; }
.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; }
.notice-gold { background: var(--gold-soft); border: 1px solid var(--gold); }
.notice-green { background: var(--green-soft); border: 1px solid #c9d9b6; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; margin-bottom: 13px; }
.field small { font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.4; }
.field input, .field select, .code-input { height: 46px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 15px; font-weight: 400; background: #fff; color: var(--ink); width: 100%; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px #f2c7b8; }
.code-input { text-align: center; font-size: 20px; letter-spacing: .12em; }
.field-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.field-block { margin-bottom: 13px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 34px; border: none; background: var(--sand); border-radius: 8px; font: inherit; font-size: 12px; cursor: pointer; padding: 0 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; margin-bottom: 10px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- login / registration */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { background: var(--green); color: var(--cream); padding: 22px 22px 24px; padding-top: max(22px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 6px; position: relative; }
.auth-top .lang-switch { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; }
.auth-top svg { margin-top: 18px; }
.auth-brand { font-family: Lora, serif; font-weight: 500; font-size: 34px; margin: 0; }
.auth-tagline { font-family: Lora, serif; font-style: italic; color: var(--gold); font-size: 17px; margin: 0; }
.auth-intro { font-size: 13.5px; margin: 6px 0 0; opacity: .92; max-width: 520px; }
.auth-form { padding: 20px 22px; width: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; }
.form-title { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.auth-form .flash { margin-bottom: 12px; }
@media (min-width: 992px) {
  .auth-wrap { flex-direction: row; }
  .auth-top { width: 42%; min-height: 100vh; justify-content: center; padding: 48px; }
  .auth-form { align-self: center; padding: 48px; }
}
.card-2fa { margin-top: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.qr-box { width: 210px; margin: 10px auto; background: #fff; padding: 10px; border-radius: 12px; }
.qr-box svg { width: 100%; height: auto; display: block; }
.secret-key { font-size: 13px; background: var(--sand); padding: 3px 8px; border-radius: 6px; word-break: break-all; }
.backup-codes { background: #fff; border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px; font-size: 15px; text-align: center; line-height: 1.8; }
.steps { padding-left: 18px; }

/* ---------------------------------------------------------------- home */
.hero { background: var(--green); color: var(--cream); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.hero-title { font-family: Lora, serif; font-weight: 500; font-size: 32px; margin: 4px 0 0; }
.hero-tagline { font-family: Lora, serif; font-style: italic; color: var(--gold); font-size: 17px; margin: 0; }
.hero-text { font-size: 14px; margin: 4px 0 10px; max-width: 560px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-line { background: transparent; color: var(--cream); border-color: rgba(246,239,220,.5); }
.impact { background: var(--green); color: var(--cream); border-radius: var(--radius); padding: 12px 14px; }
.impact-title { font-family: Lora, serif; font-style: italic; color: var(--gold); font-size: 14px; }
.impact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; margin-top: 6px; }
.impact-grid b { display: block; font-family: Lora, serif; font-weight: 500; font-size: 23px; }
.impact-grid span { font-size: 11.5px; }
.empty-state { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--green); }
.empty-state h2 { color: var(--ink); font-size: 17px; margin: 4px 0 0; }
.empty-state p { color: var(--muted); margin: 0; max-width: 460px; font-size: 14px; }
.soon { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.soon h2 { font-size: 18px; margin: 4px 0 0; } .soon p { color: var(--muted); max-width: 460px; margin: 0 0 6px; }
.install-banner { display: flex; align-items: center; gap: 8px; background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 12px; padding: 6px 6px 6px 12px; font-size: 13px; color: var(--green); }
.install-banner a { flex: 1; color: var(--ink); text-decoration: none; }

/* ---------------------------------------------------------------- sharing */
.share-card { position: relative; background: var(--paper); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px 14px 12px; }
.share-title { font-size: 15.5px; font-weight: 600; margin: 0 40px 4px 0; }
.share-text { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; }
.share-close { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border: none; background: none; cursor: pointer; color: var(--muted); }
.share-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .share-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.share-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; }
.share-wa { border-color: #8fc79f; color: #145a2a; } .share-fb { border-color: #9db3dc; color: #213f7a; }
.share-native { border-color: #d6a6c2; color: #6b2550; }
.share-btn:hover { background: var(--sand); }
.link-preview { display: flex; flex-direction: column; gap: 3px; max-width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13px; }
.link-preview img { display: block; aspect-ratio: 1200 / 630; object-fit: cover; width: 100%; }
.link-preview b, .link-preview span, .link-preview small { padding: 0 10px; } .link-preview small { padding-bottom: 8px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 20px); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-size: 13.5px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 50; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------------------------------------------------------- profile, install, legal */
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-grid { display: grid; gap: 14px; }
@media (min-width: 992px) { .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.row-link { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #efe6cf; color: var(--ink); text-decoration: none; }
.row-link small { display: block; color: var(--muted); font-size: 12.5px; }
.row-link:hover b { color: var(--green); }
.danger-zone { margin-top: 12px; border-top: 1px solid #efe6cf; padding-top: 10px; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; min-height: 36px; }
.segmented { display: flex; background: var(--sand); border-radius: 12px; padding: 4px; max-width: 360px; }
.segmented a { flex: 1; text-align: center; padding: 9px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.segmented a.on { background: var(--green); color: #fff; font-weight: 500; }
.install-page { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.install-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 14px; }
.install-steps .n { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 600; font-size: 13px; display: grid; place-items: center; flex: none; }
.install-steps .ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--sand); vertical-align: middle; margin: 0 2px; }
.installed-note { color: var(--green); font-weight: 600; }
.legal h2 { font-size: 16px; margin: 18px 0 6px; } .legal h2:first-child { margin-top: 0; } .legal p { font-size: 14px; margin: 0 0 8px; }
.lead-serif { font-family: Lora, serif; font-size: 24px; margin: 8px 0; }
.app-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 14px 0 0; }
.app-foot a { color: var(--muted); }
@media print { .app-side, .app-top, .tabbar, .no-print, .app-foot { display: none !important; } .has-nav .app-main { margin: 0; } }
