/* MsikaLink. Colours come from the logo: ink black, flag red and flag green. */
:root {
  --notice-blue: #1d4ed8;
  color-scheme: light;
  --bg: #f4f4f2;
  --surface: #ffffff;
  --fg: #15181b;
  --muted: #596067;
  --line: #dcdedf;
  --accent: #0b7a3e;
  --btn: #0b7a3e;
  --btn-fg: #ffffff;
  --accent-soft: #dcf0e4;
  --danger-soft: #fbe4e8;
  --green: #0b7a3e;
  --green-soft: #dcf0e4;
  --build: #8f5200;
  --build-soft: #f7ead3;
  --farm: #0b7a3e;
  --farm-soft: #dcf0e4;
  --parts: #2a5b8c;
  --parts-soft: #dde9f5;
  --danger: #b3122b;
  --warn-soft: #fdf0cf;
  --warn: #7a5200;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --notice-blue: #8ab8ff;
    color-scheme: dark;
    --bg: #0e1011;
    --surface: #171a1c;
    --fg: #eceeef;
    --muted: #9ba2a7;
    --line: #2a2f33;
    --accent: #4cc487;
    --btn: #138a4a;
    --accent-soft: #12301f;
    --danger-soft: #3a1119;
    --green: #4cc487;
    --green-soft: #12301f;
    --build: #f0b45c;
    --build-soft: #35260d;
    --farm: #4cc487;
    --farm-soft: #12301f;
    --parts: #7db2e6;
    --parts-soft: #15263a;
    --danger: #ff7b8b;
    --warn-soft: #382c0c;
    --warn: #f0c46a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--font);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.pad { padding: 24px 0; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 6px; z-index: 20; }
.skip:focus { left: 16px; }

/* header */
.top { max-width: 1080px; margin: 0 auto; padding-top: max(10px, env(safe-area-inset-top, 0px)); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); min-width: 0; }
.mark { width: 48px; height: 48px; object-fit: contain; flex: none; }
.wordmark { display: flex; flex-direction: column; min-width: 0; }
.wordmark b { color: #14307a; font-size: 1.35rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.wordmark i { font-style: normal; color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark b { color: #e8eefc; } }
.wordmark span { color: var(--muted); font-size: 0.8rem; }
.lang { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--btn); color: var(--btn-fg); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 6px 0 12px; border-bottom: 1.5px solid var(--line); }
.navlink { color: var(--fg); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; }
.navlink:hover { background: var(--accent-soft); }
.navlink[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.navlink.cta { background: var(--btn); color: var(--btn-fg); }
.linkbtn { background: none; border: 0; padding: 7px 12px; cursor: pointer; color: var(--accent); text-decoration: underline; font-weight: 600; }
.navlink.linkbtn { color: var(--fg); text-decoration: none; }

main { max-width: 1080px; margin: 0 auto; padding-block: 22px 40px; min-height: 60vh; }
main:focus, main:focus-visible { outline: none; }
.foot { max-width: 1080px; margin: 0 auto; padding-block: 16px max(24px, env(safe-area-inset-bottom, 0px)); border-top: 1.5px solid var(--line); color: var(--muted); font-size: 0.86rem; display: flex; gap: 8px 16px; flex-wrap: wrap; justify-content: space-between; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; max-width: calc(100% - 32px); z-index: 30; }
.noscript { padding: 16px; }

/* buttons and notices */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--btn); background: var(--btn); color: var(--btn-fg); border-radius: 8px; padding: 11px 18px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.btn.small { padding: 7px 12px; font-size: 0.9rem; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.linkbtn.danger { color: var(--danger); }
.notice { padding: 10px 14px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); margin: 0 0 14px; }
.notice.ok { border-color: var(--green); background: var(--green-soft); }
.notice.error { border-color: var(--danger); background: var(--danger-soft); }
.notice.info { background: var(--warn-soft); border-color: transparent; color: var(--fg); font-size: 0.92rem; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); margin-left: 6px; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }

/* home */
.hero { margin-bottom: 18px; max-width: 46rem; }
.filters { display: grid; grid-template-columns: 1.6fr 1fr 1fr 0.8fr 0.8fr; gap: 10px; margin-bottom: 14px; }
.filters.one { grid-template-columns: 1fr; }
input, select, textarea { width: 100%; min-width: 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.catbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.catchip { flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.catchip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.tabs.admin { grid-template-columns: repeat(5, 1fr); }
.tab { text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; display: flex; flex-direction: column; min-width: 0; }
.tab small { color: var(--muted); font-size: 0.78rem; }
.tab[aria-pressed="true"] { border-color: var(--accent); background: var(--btn); color: var(--btn-fg); box-shadow: 0 0 0 2px var(--accent); }
.tab[aria-pressed="true"] small { color: inherit; }
.tabs.sub { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.thumb { display: block; aspect-ratio: 4 / 3; background: var(--line); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 100px; font-weight: 700; text-align: center; padding: 8px; }
.noimg.build { background: var(--build-soft); color: var(--build); }
.noimg.farm { background: var(--farm-soft); color: var(--farm); }
.noimg.parts { background: var(--parts-soft); color: var(--parts); }
.noimg.misc { background: var(--accent-soft); color: var(--accent); }
.noimg.big { aspect-ratio: 4 / 3; font-size: 1.2rem; border-radius: 12px; }
.noimg.small { width: 96px; height: 72px; min-height: 0; flex: none; border-radius: 8px; }
.cardbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cardbody h3 { margin: 0; overflow-wrap: anywhere; }
.cardbody h3 a { color: var(--fg); text-decoration: none; }
.cardbody .btn { align-self: flex-start; margin-top: auto; }
.chip { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.chip.build { background: var(--build-soft); color: var(--build); }
.chip.farm { background: var(--farm-soft); color: var(--farm); }
.chip.parts { background: var(--parts-soft); color: var(--parts); }
.chip.misc { background: var(--accent-soft); color: var(--accent); }
.price { font-weight: 800; font-size: 1.1rem; margin: 0; font-variant-numeric: tabular-nums; }
.price small { font-weight: 400; font-size: 0.82rem; color: var(--muted); margin-left: 6px; }
.price.big { font-size: 1.7rem; }
.facts { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); font-size: 0.86rem; margin: 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.empty { border: 1.5px dashed var(--line); border-radius: 12px; padding: 34px 18px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty strong { color: var(--fg); font-size: 1.1rem; }

/* detail */
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }
.detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.bigimg { border-radius: 12px; overflow: hidden; background: var(--line); }
.bigimg img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: #000; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumbbtn { border: 2px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; background: none; cursor: pointer; width: 76px; }
.thumbbtn[aria-pressed="true"] { border-color: var(--accent); }
.info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.info h1 { margin: 0; overflow-wrap: anywhere; }
.contact { padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.contact p { margin: 0; }
.phone { font-size: 1.3rem; font-variant-numeric: tabular-nums; user-select: all; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 0.94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }

/* forms and panels */
.panel { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h2, .panel h3 { margin: 0; }
.panel p { margin: 0; }
.danger-zone { border-color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-weight: 700; font-size: 0.92rem; }
.hint { color: var(--muted); font-size: 0.84rem; }
.err { color: var(--danger); font-size: 0.86rem; min-height: 0; }
.err:empty { display: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.formgrid { max-width: 640px; }
.banner:empty { display: none; }
.banner .notice { margin: 0; }
.photolist { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ph { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ph img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; }
.filebtn { cursor: pointer; align-self: flex-start; position: relative; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.narrow { max-width: 460px; margin: 0 auto; }
.biglogo { width: 150px; height: auto; margin: 0 auto 8px; border-radius: 14px; background: #fff; }
.links { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 14px; background: var(--surface); }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 9px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--btn); color: var(--btn-fg); }
.tips { padding-left: 22px; }
.tips li { margin-bottom: 8px; }
.reportbox .panel { margin-top: 8px; }

/* my listings, admin */
.rows { display: flex; flex-direction: column; gap: 12px; }
.rowcard { display: flex; gap: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; }
.rowcard > img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; }
.rowbody { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.rowbody h3 { margin: 0; overflow-wrap: anywhere; }
.rowbody h3 a { color: var(--fg); text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; }
.stat strong { font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.86rem; }
.tablewrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }

@media (max-width: 860px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type="search"] { grid-column: 1 / -1; }
  .detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tabs, .tabs.admin { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .rowcard { flex-direction: column; }
  .rowcard > img, .noimg.small { width: 100%; height: 160px; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .btn, .tab { transition: border-color 0.15s, background-color 0.15s; }
  .card:hover { border-color: var(--accent); }
}

/* premium ad slideshow */
.ad-slot:empty { display: none; }
.ad-slot { margin-bottom: 16px; }
.ad-carousel { position: relative; border-radius: 12px; overflow: hidden; background: #111; border: 1.5px solid var(--line); }
.ad-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.ad-track::-webkit-scrollbar { display: none; }
.ad-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: flex; flex-direction: column; background: #111; color: #fff; text-decoration: none; padding: 8px 8px 0; box-sizing: border-box; }
/* The whole photo or clip shows. Nothing is cropped. The caption sits under the picture, not over it. */
.ad-media { width: 100%; aspect-ratio: 16 / 9; max-height: 70vh; object-fit: contain; display: block; background: #111; border-radius: 14px; }   /* small fillets on the photo or clip. contain keeps every detail in view. */
.ad-caption { position: static; padding: 10px 130px 12px 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: #111; }
.ad-title { font-size: clamp(1.05rem, 3.2vw, 1.7rem); line-height: 1.2; }
.ad-text { font-size: clamp(0.85rem, 2.2vw, 1.05rem); opacity: 0.95; }
.ad-cta { margin-top: 4px; background: var(--btn); color: var(--btn-fg); font-weight: 700; padding: 5px 14px; border-radius: 999px; font-size: 0.9rem; }
.ad-badge { margin: 0 0 4px; background: rgba(255,255,255,0.9); color: #15181b; }
.ad-btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.55); color: #fff; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; }
.ad-btn:hover { background: rgba(0,0,0,0.8); }
.ad-prev { left: 8px; top: calc(50% - 22px); }
.ad-next { right: 8px; top: calc(50% - 22px); }
.ad-bar { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 8px; }
.ad-bar .ad-btn { position: static; width: 36px; height: 36px; font-size: 0.85rem; }
.ad-dots { display: flex; gap: 2px; background: rgba(0,0,0,0.45); border-radius: 999px; padding: 0 4px; }
.ad-dot { width: 24px; height: 36px; border: 0; background: transparent; cursor: pointer; position: relative; padding: 0; }
.ad-dot::after { content: ""; position: absolute; left: 7px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.ad-dot[aria-current="true"]::after { background: #fff; }
@media (max-width: 640px) { .ad-media { aspect-ratio: 4 / 3; } .ad-prev, .ad-next { display: none; } .ad-caption { padding-right: 10px; padding-bottom: 50px; } }
@media (prefers-reduced-motion: reduce) { .ad-track { scroll-behavior: auto; } }

/* admin ads */
.adform { margin-top: 18px; }
.adform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adrow { display: flex; gap: 14px; align-items: flex-start; }
.ad-thumb { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #111; flex: none; }
.adrow .row input[type=date] { width: auto; }
.stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
@media (max-width: 640px) { .adform .two { grid-template-columns: 1fr; } .adrow { flex-direction: column; } .ad-thumb { width: 100%; } .tabs.admin { grid-template-columns: 1fr 1fr 1fr; } }

/* reviews and two-step sign-in */
.reviews { margin-top: 14px; }
.review { border-top: 1.5px solid var(--line); padding: 10px 0; }
.stars { color: #c98a00; letter-spacing: 1px; }
.secret { font-size: 1.2rem; letter-spacing: 2px; word-break: break-all; user-select: all; }
.seo { max-width: 46rem; }

/* plans, payments, banners */
.netbar { background: #1f2937; color: #fff; text-align: center; padding: 6px 12px; font-size: .9rem; }
.planbar { background: #fff4cc; color: #5c4400; text-align: center; padding: 10px 14px; font-weight: 600; }
.planbar.ended { background: #fde2e2; color: #7a1010; }
.planbar a { color: inherit; text-decoration: underline; margin-left: 6px; }
.narrow.wide { max-width: 760px; }
.ticks { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.totalrow { font-size: 1.1rem; }
.total { font-size: 1.4rem; color: var(--brand, #0b7a3e); }
.method { background: var(--green-soft); color: var(--fg); border: 1.5px solid var(--green); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; }
.method strong, .method p { color: var(--fg); }
.proofimg { max-width: 100%; max-height: 320px; border-radius: 8px; border: 1px solid var(--line); }
.field.check label, label.check { display: flex; gap: 8px; align-items: center; }
.tabs.sub { grid-template-columns: repeat(4, 1fr); }
.badge.info { background: #dbeafe; color: #1e3a8a; }
.tabs.admin { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .tabs.admin, .tabs.sub { grid-template-columns: 1fr 1fr; } }
.notice.warn { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); font-weight: 600; }
.notice.warn a { color: inherit; text-decoration: underline; }
.products { display: grid; gap: 8px; }
.prod { align-items: center; }
.prodimg { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }

.mediastrip { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.mediastrip img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.stripvideo, .detailvideo { max-width: 100%; width: 320px; border-radius: 8px; background: #000; }
.detailvideo { width: 100%; margin-top: 10px; }
.videobox { display: grid; gap: 6px; }
.callline a { font-weight: 700; }
.addr { margin: 0; }
.photolist { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.idcard { width: 340px; max-width: 100%; border: 2px solid var(--green); border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--fg); margin-bottom: 12px; }
.idhead { background: var(--green); color: #fff; display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.idhead span { margin-left: auto; font-size: .85rem; opacity: .95; }
.idbody { display: flex; gap: 12px; padding: 12px; }
.idphoto { width: 100px; height: 125px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.idtext h3 { margin: 0 0 6px; }
.idtext p { margin: 2px 0; display: flex; flex-direction: column; font-size: .85rem; }
.idtext p span { color: var(--muted, #6b7280); font-size: .75rem; }
.idfoot { background: var(--green-soft); text-align: center; padding: 6px; font-weight: 700; }
.idfoot.ended { background: #fde2e2; color: #7a1010; }
.tabs.admin { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 640px) { .tabs.admin { grid-template-columns: 1fr 1fr 1fr; } }

.alertdot { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 6px; border-radius: 999px; background: #d62828; color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.4; text-align: center; }
.newrow { background: rgba(214, 40, 40, .08); }

@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; }
  header.top, nav, footer, .tabs, .noprint, .netbar, .skip, .toast, .slowbar, #skip { display: none !important; }
  main, .wrap, .card { box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .idcard { break-inside: avoid; page-break-inside: avoid; position: static !important; overflow: visible !important; }
  .idcard { background: #fff !important; color: #000 !important; border: 2px solid #0b7a3e !important; width: 90mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .idcard * { color: #000 !important; }
  .idhead { background: #0b7a3e !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .idhead * { color: #fff !important; }
  .idfoot { background: #dcf0e4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .idphoto, .idhead img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Print ID only: hide the whole page except the card, and keep the page to one sheet. */
  body.print-card { height: 70mm !important; overflow: hidden !important; }
  body.print-card * { visibility: hidden !important; }
  body.print-card .idcard, body.print-card .idcard * { visibility: visible !important; }
  body.print-card .idcard { position: absolute !important; left: 0; top: 0; margin: 0 !important; }
}

.installbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: 10px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); max-width: 520px; margin: 0 auto; }
.installbar img { border-radius: 9px; flex: none; }
.installtext { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: .85rem; }
.installtext span { color: var(--muted, #6b7280); font-size: .8rem; }

.viewsum .row { justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.vgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 12px 0; }
.vcard { background: var(--green-soft); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.vcard .vlabel { color: var(--muted); font-weight: 600; }
.vcard strong { font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.vchange { font-size: .9rem; color: var(--muted); }
.vchange.up { color: #15803d; }
.vchange.down { color: #b42318; }
.spark { width: 100%; height: 90px; margin-top: 10px; overflow: visible; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .area { fill: var(--accent); opacity: .12; }
.vdates { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.segmented { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.segmented button { border: 0; background: transparent; color: var(--fg); padding: 6px 12px; font-weight: 600; cursor: pointer; font: inherit; font-size: .85rem; }
.segmented button.on { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vchange.up { color: #4cc487; } :root:not([data-theme="light"]) .vchange.down { color: #f97066; } }

.ad-btnslide { border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.ad-choice { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ad-choice-card { background: var(--card, #fff); color: inherit; border-radius: 16px; padding: 20px; width: min(380px, 100%); display: grid; gap: 10px; text-align: center; }
.ad-choice-card h2 { margin: 0; font-size: 1.15rem; }
.ad-choice-card .linklike { background: none; border: 0; color: inherit; text-decoration: underline; padding: 8px; cursor: pointer; }
.price.varies { font-size: 0.95rem; font-weight: 700; color: var(--muted); }
.price.big.varies { font-size: 1.15rem; }
.photoreview { display: grid; gap: 10px; margin: 8px 0; }
.pr-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 2px solid var(--line, #ddd); border-radius: 12px; }
.pr-item.approved { border-color: #1a9a4a; } .pr-item.rejected { border-color: #c0392b; background: #fff5f4; }
.pr-item img { border-radius: 8px; object-fit: cover; display: block; }
.pr-side { display: grid; gap: 6px; flex: 1; min-width: 0; }
.pr-badge { font-weight: 700; font-size: .8rem; } .pr-badge.approved { color: #1a9a4a; } .pr-badge.rejected { color: #c0392b; }
.pr-form { display: grid; gap: 6px; } .pr-form[hidden] { display: none; }
.capline { margin: 6px 2px 0; font-size: .95rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.bigimg .capline { background: rgba(0,0,0,.04); padding: 8px 10px; border-radius: 0 0 10px 10px; }
.ph { display: grid; gap: 4px; justify-items: start; }
.capin { width: 100%; min-width: 150px; font-size: .85rem; padding: 6px 8px; }
.thumb, .bigimg, .thumbbtn { position: relative; }
.oos-badge { position: absolute; top: 8px; left: 8px; background: #c0392b; color: #fff; font-weight: 800; font-size: .75rem; padding: 4px 8px; border-radius: 8px; }
.oos-badge.big { font-size: .95rem; padding: 6px 12px; top: 12px; left: 12px; }
.oos-badge.small { top: 2px; left: 2px; padding: 0 6px; font-size: .8rem; }
img.dim { filter: grayscale(.8) opacity(.65); }
.oos-check { font-size: .8rem; display: flex; align-items: center; gap: 4px; }
.pinmodal { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.pinmodal .panel { width: min(92vw, 420px); max-height: 88vh; overflow-y: auto; background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.pinmodal .panel h3, .pinmodal .panel p, .pinmodal .panel li { color: var(--fg); }
.pinmodal .panel .muted { color: var(--muted); }
.notices h2 .alertdot { margin-left: 8px; }
.noticelist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.noticelist li { padding: 6px 12px; border-radius: 10px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); display: grid; gap: 4px; }
.noticelist li.unread { background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-left: 5px solid var(--notice-blue); }
.noticelist li p { margin: 0; color: var(--fg); }
.noticelist li a.btn { justify-self: start; }
.noticepop { position: fixed; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 90; max-width: 520px; margin: 0 auto; display: flex; align-items: stretch; background: var(--surface); color: var(--fg); border: 2px solid var(--green); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: npdrop .35s ease-out; }
.noticepop .np-body { flex: 1; text-align: left; display: grid; gap: 2px; padding: 12px 14px; background: transparent; color: inherit; border: 0; font: inherit; cursor: pointer; }
.noticepop .np-body span { color: var(--muted); font-size: .9rem; }
.noticepop .np-x { background: transparent; color: var(--fg); border: 0; font-size: 1.6rem; padding: 0 14px; cursor: pointer; }
@keyframes npdrop { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
.pushslot { margin: 6px 0; }
.ph.removed { opacity: .75; } .rejnote { color: #c0392b; display: block; max-width: 160px; }
.pr-item video { max-width: 140px; border-radius: 8px; }

.badge.biz { background: #1d4ed8; color: #fff; }
.certimg { max-width: 100%; max-height: 360px; border: 1px solid var(--line, #ddd); border-radius: 8px; }
.biz-card .pr-form { display: grid; gap: 8px; margin-top: 8px; }

.notice-toggle { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left; background: transparent; color: var(--fg); border: 0; padding: 4px 0; font: inherit; cursor: pointer; }
.notice-toggle .nt-title { grid-column: 1; display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.notice-toggle .nt-preview { grid-column: 1; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-toggle .nt-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: 1.3rem; transition: transform .2s; }
.notice-toggle.open .nt-arrow { transform: rotate(180deg); }
.notice-toggle.open .nt-preview { display: none; }
.notice-body { margin-top: 8px; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.notice-body[hidden] { display: none; }
.tp-list { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; }

.ni-head { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; text-align: left; background: transparent; color: var(--fg); border: 0; padding: 6px 0; font: inherit; cursor: pointer; }
.ni-text { display: grid; gap: 2px; min-width: 0; }
.ni-line { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.noticelist li.open .ni-line { display: none; }
.ni-arrow { font-size: 1.2rem; transition: transform .2s; }
.noticelist li.open .ni-arrow { transform: rotate(180deg); }
.ni-full { display: grid; gap: 6px; padding: 2px 0 8px; }
.ni-full[hidden] { display: none; }

.noticelist li strong, .noticepop strong { color: var(--notice-blue); }
.mark { display: inline-block; width: 1.3em; font-weight: 700; color: var(--notice-blue); }
.lead { color: var(--notice-blue); font-weight: 600; }

/* Payment confirmation screen. Uses the theme colours so it blends with the page in light and dark mode. */
#payconfirm { position: fixed; inset: 0; z-index: 1200; background: var(--bg); color: var(--fg); overflow-y: auto; display: grid; place-items: center; padding: 22px 16px 28px; animation: pcIn .3s both; }
#payconfirm .pc-wrap { width: min(100%, 470px); }
#payconfirm .pc-logo { display: block; width: min(52%, 200px); height: auto; margin: 0 auto 14px; background: transparent; }
#payconfirm .pc-dark { display: none; }
#payconfirm .pc-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px 24px 22px; text-align: center; }
#payconfirm .pc-card:before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, #082653 0 58%, #22b51b 58% 100%); }
#payconfirm .pc-kicker { font-size: 11px; letter-spacing: .16em; font-weight: 800; color: var(--muted); text-transform: uppercase; margin: 0 0 18px; }
#payconfirm h1 { font-size: 26px; line-height: 1.15; margin: 0 0 9px; color: var(--fg); letter-spacing: -.03em; }
#payconfirm .pc-sub { margin: 0 auto 20px; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 330px; }
#payconfirm .pc-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .13em; font-weight: 800; margin-bottom: 5px; }
#payconfirm .pc-amount { font-size: 33px; font-weight: 850; letter-spacing: -.04em; color: var(--fg); font-variant-numeric: tabular-nums; }
#payconfirm .pc-icon { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); position: relative; animation: pcPop .55s .2s cubic-bezier(.2,1.5,.4,1) both; }
#payconfirm .pc-icon:before { content: ""; position: absolute; inset: -7px; border: 1px solid var(--green); opacity: .35; border-radius: 50%; animation: pcRing 1.1s .4s ease-out both; }
#payconfirm .pc-icon svg { width: 42px; height: 42px; stroke: var(--green); stroke-width: 4.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
#payconfirm .pc-icon path { stroke-dasharray: 52; stroke-dashoffset: 52; animation: pcDraw .55s .6s ease forwards; }
#payconfirm .pc-receipt { margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 4px; text-align: left; background: var(--bg); }
#payconfirm .pc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#payconfirm .pc-head strong { font-size: 12px; color: var(--fg); }
#payconfirm .pc-head span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--green); background: var(--green-soft); border-radius: 99px; padding: 6px 9px; font-weight: 800; }
#payconfirm .pc-row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 12px; }
#payconfirm .pc-row span:first-child { color: var(--muted); }
#payconfirm .pc-row span:last-child { color: var(--fg); font-weight: 700; text-align: right; overflow-wrap: anywhere; }
#payconfirm .pc-done { margin-top: 20px; width: 100%; }
#payconfirm .pc-secure { margin: 14px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
#payconfirm .pc-spin { width: 52px; height: 52px; border: 4px solid var(--line); border-top-color: var(--green); border-radius: 50%; margin: 8px auto 22px; animation: pcSpin .8s linear infinite; }
#payconfirm .pc-fail { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 18px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; font-size: 40px; }
.pc-confetti { position: fixed; top: -15px; width: 8px; height: 12px; z-index: 1250; pointer-events: none; animation: pcFall var(--dur) linear forwards; opacity: .95; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #payconfirm .pc-light { display: none; } :root:not([data-theme="light"]) #payconfirm .pc-dark { display: block; } }
:root[data-theme="dark"] #payconfirm .pc-light { display: none; }
:root[data-theme="dark"] #payconfirm .pc-dark { display: block; }
@keyframes pcSpin { to { transform: rotate(360deg); } }
@keyframes pcDraw { to { stroke-dashoffset: 0; } }
@keyframes pcPop { 0% { transform: scale(.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pcRing { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes pcIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pcFall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(720deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { #payconfirm *, #payconfirm *:before, .pc-confetti { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
#payconfirm .pc-spin.small { width: 26px; height: 26px; border-width: 3px; margin: 16px auto 8px; }
#payconfirm .pc-copy { padding: 4px 10px; margin-left: 6px; }
#payconfirm .pc-close { margin-top: 12px; width: 100%; }
#payconfirm .pc-check { margin-top: 12px; width: 100%; }
#payconfirm .pc-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); font-size: 13px; line-height: 1.5; text-align: left; font-weight: 700; }
.badge.biz.medal { background: #0b7a3e; color: #fff; display: inline-flex; align-items: center; gap: 3px; padding-left: 5px; }
.badge.biz.medal.gold { background: linear-gradient(135deg, #7a5200, #b8860b 55%, #8a6200); color: #fff8d6; border: 1px solid #f5c518; box-shadow: 0 0 0 1px rgba(245,197,24,.25); text-shadow: 0 1px 0 rgba(0,0,0,.25); }

#payconfirm .pc-next { margin: 8px 0 0; font-weight: 700; color: var(--accent); }
#payconfirm .pc-wait { font-size: 44px; line-height: 1; color: var(--muted); font-weight: 700; margin: 6px 0; }
