/* TBF Print Studio app: light theme. Plain CSS, no framework. */
@font-face { font-family: 'NotoSans'; src: url('../fonts/NotoSansLatin-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'NotoSans'; src: url('../fonts/NotoSansLatin-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root { --bg: #f6f5f1; --panel: #ffffff; --ink: #1a1a1a; --mute: #5f5f5f; --line: #dcdad2; --gold: #b8860b; --gold-d: #8f6a08; --ok: #1d7a3e; --warn: #9a6400; --err: #b3261e; --r: 10px; --sh: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 'NotoSans', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
a { color: var(--gold-d); }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 99; } .skip:focus { left: 8px; top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 10px 20px; background: #111; color: #fff; position: sticky; top: 0; z-index: 20; }
.brand { color: #fff; text-decoration: none; font-size: 18px; } .brand b { color: #e0b53c; }
#nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
#nav a { color: #d8d8d8; text-decoration: none; padding: 5px 10px; border-radius: 99px; font-size: 14px; }
#nav a:hover { background: #2a2a2a; } #nav a.on { background: #e0b53c; color: #111; }

main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 40px; outline: none; }
.page-head h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; } .lead { margin: 0 0 18px; color: var(--mute); max-width: 70ch; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 20px; align-items: start; }
.col.controls { display: grid; gap: 14px; } .two > .col:last-child { position: sticky; top: 64px; }
.card, .panel, .quick { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; }

.fld { display: grid; gap: 4px; margin-bottom: 10px; min-width: 0; } .fld.sm { margin-bottom: 6px; }
.fld-l { font-size: 13px; font-weight: 700; color: #333; } .fld-h { font-size: 13px; color: var(--mute); margin: 4px 0 8px; } .fld-e { color: var(--err); font-size: 13px; min-height: 0; }
input[type=text], input[type=number], input[type=tel], input[type=email], select, textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #bdbab0; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, .drop:focus-visible { outline: 3px solid #e0b53c; outline-offset: 1px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px 12px; }
.chk { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; } .chk input { width: 18px; height: 18px; accent-color: var(--gold); } .chk small { color: var(--mute); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border: 1px solid #b0ad9f; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f2f0e8; } .btn.primary { background: var(--gold); border-color: var(--gold-d); color: #fff; } .btn.primary:hover { background: var(--gold-d); } .btn.sm { min-height: 34px; padding: 4px 12px; font-size: 14px; } .btn:disabled { opacity: .55; cursor: progress; }
.icon-btn { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 6px; } .icon-btn:hover { background: #eee; }
.linkbtn { border: 0; background: none; color: var(--gold-d); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.btns, .print-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.seg { display: inline-flex; border: 1px solid #b0ad9f; border-radius: 8px; overflow: hidden; margin: 6px 0 10px; flex-wrap: wrap; }
.seg button { border: 0; background: #fff; padding: 8px 12px; font: inherit; cursor: pointer; } .seg button.on { background: #111; color: #fff; }

.preview-wrap { display: grid; justify-items: center; gap: 8px; padding: 14px; background: repeating-conic-gradient(#ecebe6 0% 25%, #f7f6f2 0% 50%) 0 0/16px 16px; border-radius: 8px; border: 1px dashed var(--line); min-height: 120px; }
.preview-canvas { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.2); max-width: 100%; }
.msgs { width: 100%; } .msg { margin: 2px 0; font-size: 13px; padding: 6px 8px; border-radius: 6px; } .msg.err { background: #fdecea; color: var(--err); } .msg.warn { background: #fff4de; color: var(--warn); } .msg.ok { background: #e6f4ea; color: var(--ok); }
.summary { margin: 10px 0 0; font-weight: 700; } .summary.err { color: var(--err); } .summary.warn { color: var(--warn); }
.adv { margin-top: 10px; } .adv > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.slot-grid { display: grid; gap: 3px; max-width: 320px; background: #eee; padding: 6px; border-radius: 6px; margin: 8px 0; }
.slot { border: 1px solid #aaa; background: #fff; border-radius: 4px; min-height: 20px; font-size: 11px; padding: 2px; cursor: pointer; } .slot.used { background: #cfcdc4; color: #777; text-decoration: line-through; } .slot.first { outline: 2px solid var(--gold); }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; } .tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); } .tbl input { width: 80px; min-height: 32px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 12px; margin-top: 10px; }
.drop { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px 14px; border: 2px dashed #b0ad9f; border-radius: 10px; background: #fcfbf7; cursor: pointer; } .drop.over, .drop:hover { border-color: var(--gold); background: #fff8e4; } .drop span { color: var(--mute); font-size: 13px; }
.bar { height: 10px; background: #e5e3da; border-radius: 99px; overflow: hidden; margin-top: 8px; } .bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .15s; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 18px 0; }
.card-link { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-decoration: none; color: inherit; box-shadow: var(--sh); transition: transform .12s, border-color .12s; }
a.card-link:hover { transform: translateY(-2px); border-color: var(--gold); } .card-link.off { opacity: .62; }
.card-link .ico { font-size: 26px; display: block; margin-bottom: 4px; } .card-link h3 { margin: 0 0 4px; font-size: 16px; } .card-link p { margin: 0 0 10px; color: var(--mute); font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; } .tag.ok { background: #e6f4ea; color: var(--ok); } .tag.soon { background: #eee; color: #666; }
.quick ol { margin: 6px 0 0; padding-left: 22px; } .quick h2 { margin: 0; font-size: 18px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 12px; } .tpl-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; text-align: center; } .tpl-card h4 { margin: 8px 0 0; } .thumb { border: 1px solid var(--line); background: #fff; } .empty { color: var(--mute); }

.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 14px; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: min(520px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); } .modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 14px 16px; overflow: auto; } .modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.reg-why { margin-top: 0; } .form-msg { color: var(--err); min-height: 1.2em; font-weight: 700; }
#toasts { position: fixed; right: 14px; bottom: 14px; display: grid; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 28px)); }
.toast { background: #111; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.3); } .toast.error { background: var(--err); }
.foot { max-width: 1240px; margin: 0 auto; padding: 8px 20px 36px; color: var(--mute); font-size: 14px; } .foot .fine { font-size: 12px; }

@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; } .two > .col:last-child { position: static; }
  main { padding: 16px 14px 30px; } .top { padding: 8px 14px; } .page-head h1 { font-size: 23px; }
  #nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; } #nav a { white-space: nowrap; }
}
@media print { .top, .foot, #toasts { display: none; } }
