
:root{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue","Yu Gothic",sans-serif;color:#123941;background:#eef5f5}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}
.topbar{display:flex;justify-content:space-between;align-items:end;gap:20px;padding:28px 5vw;background:#007b89;color:#fff}
.topbar h1{margin:4px 0 0;line-height:1;font-size:40px}.topbar h1 span{color:#ffbd35}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.14em}
.status-pill{border:1px solid #ffffff66;border-radius:999px;padding:8px 12px;font-size:12px}
.layout{max-width:1440px;margin:auto;padding:24px;display:grid;grid-template-columns:390px 1fr;gap:20px}
.workspace{display:grid;gap:20px}.panel{background:#fff;border:1px solid #d9e7e8;border-radius:18px;padding:20px;box-shadow:0 6px 22px #16414910}
.controls{align-self:start;position:sticky;top:16px}.section-title{display:flex;gap:10px;align-items:start;margin-bottom:16px}.section-title h2{margin:0;font-size:19px}.section-title p{margin:3px 0;color:#6b8389;font-size:12px}
.step{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;background:#007b89;color:#fff;font-weight:900}
label{display:grid;gap:6px;margin:12px 0;font-size:12px;font-weight:800;color:#39585f}
input,textarea,select{width:100%;padding:10px 11px;border:1px solid #cbdcde;border-radius:10px;background:#fbfdfd;color:#123941}select:disabled{background:#f0f5f5;color:#5f767b;cursor:not-allowed}
textarea{resize:vertical}.meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.meta-grid div{border:1px solid #dce9ea;border-radius:10px;padding:9px}.meta-grid span{display:block;color:#789096;font-size:10px}.meta-grid strong{font-size:14px}
details{margin-top:14px;border-top:1px solid #e5eeee;padding-top:12px}summary{cursor:pointer;color:#007b89;font-weight:800}.top-gap{margin-top:24px;padding-top:20px;border-top:1px solid #e5eeee}
.gate{margin-top:10px;padding:10px;border-radius:10px;font-size:12px;font-weight:800}.gate.ok{background:#e8f6ec;color:#24683b}.gate.block{background:#fff0ec;color:#9a4029}
.asset-grid{display:grid;grid-template-columns:minmax(220px,420px);gap:12px;margin-bottom:12px;justify-content:start}.asset-card{overflow:hidden;border:1px solid #dbe8e9;border-radius:14px;background:#f9fcfc}.asset-card img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover}.asset-body{padding:11px}.asset-kicker{font-size:11px;color:#ef9200;font-weight:900}.asset-body h3{margin:3px 0;font-size:14px;overflow-wrap:anywhere}.asset-body p{margin:0 0 9px;color:#6b8186;font-size:11px;line-height:1.4}.asset-actions{display:flex;gap:10px}.asset-actions a{font-size:11px;color:#007b89;font-weight:800;text-decoration:none}
button{border:0;border-radius:10px;padding:10px 14px;font-weight:900;cursor:pointer}.primary{background:#007b89;color:#fff}.secondary{background:#edf5f5;color:#006d78;border:1px solid #d5e5e6}.button-row{display:flex;gap:9px;margin-top:10px}
.prompt-panel textarea{min-height:430px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5}.warning{padding:10px;border-radius:10px;background:#fff6d9;color:#745700;margin-bottom:10px;font-size:12px}.hidden{display:none}.usage ol{line-height:1.8}.small{font-size:11px;color:#6f858a}
.toast{position:fixed;right:18px;bottom:18px;background:#123941;color:#fff;padding:10px 14px;border-radius:10px}
@media(max-width:900px){.layout{grid-template-columns:1fr;padding:12px}.controls{position:static}.topbar{align-items:start;flex-direction:column}.topbar h1{font-size:32px}}

.info-box{margin:8px 0 14px;padding:11px 12px;border-radius:10px;background:#eef7f7;border:1px solid #d7e7e8;color:#3d5d63;font-size:12px;line-height:1.55}
button:disabled{opacity:.45;cursor:not-allowed;transform:none!important;filter:none!important}
.asset-grid.compact{grid-template-columns:repeat(auto-fit,minmax(220px,320px))}


/* Flyer builder */
.flyer-brief-fields{margin-top:8px}
.flyer-preview{display:flex;justify-content:center;overflow:auto;padding:12px;background:#e9f1f1;border-radius:14px}
.flyer-sheet{position:relative;width:210mm;min-width:210mm;height:297mm;background:#fff;overflow:hidden;box-shadow:0 8px 28px rgba(0,0,0,.14);color:#163c44}
.flyer-sheet *{box-sizing:border-box}
.fp-logo{display:block;max-width:58mm;max-height:16mm;object-fit:contain;object-position:left center}
.fp-logo-placeholder{font-weight:900;font-size:18px;color:#007b89}
.fp-footer{position:absolute;left:0;right:0;bottom:0;height:34mm;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:7mm 10mm;border-top:1.5mm solid #007b89}
.fp-footer>div:first-child{display:flex;flex-direction:column;gap:3mm}
.fp-contact{margin:0;font-size:9pt;color:#47666c}
.fp-footer-cta{display:flex;align-items:center;gap:5mm}
.fp-footer-cta>strong{display:grid;place-items:center;min-width:55mm;height:16mm;padding:0 8mm;border-radius:10mm;background:#fdab0d;color:#fff;font-size:19pt}
.fp-qr{width:22mm;height:22mm;object-fit:contain;background:#fff}
.fp-qr-placeholder{width:22mm;height:22mm;border:1mm solid #007b89;display:grid;place-items:center;font-weight:900;color:#007b89}
.fp-hero{position:relative;height:112mm;background:#cfe8eb center/cover no-repeat;overflow:hidden}
.fp-hero.compact{height:104mm}
.fp-hero.dominant{height:145mm}
.fp-hero.event{height:110mm}
.fp-hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,63,70,.34),rgba(0,63,70,.02) 65%)}
.fp-hero-copy{position:absolute;left:10mm;right:10mm;top:12mm;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.24)}
.fp-pill{display:inline-block;padding:3mm 6mm;border-radius:12mm;background:#fdab0d;color:#fff;font-size:13pt;font-weight:900}
.fp-hero-copy h1{margin:6mm 0 2mm;max-width:135mm;font-size:30pt;line-height:1.14;font-weight:1000;letter-spacing:-.03em}
.fp-hero-copy p{font-size:13pt;font-weight:800}
.fp-body{padding:8mm 10mm 38mm}
.fp-section-title{display:inline-block;padding:2.4mm 5mm;border-radius:7mm;background:#007b89;color:#fff;font-size:11pt;font-weight:900}
.fp-body h2{margin:4mm 0 4mm;font-size:21pt;color:#003f46}
.fp-benefits{display:grid;grid-template-columns:1fr;gap:2mm;margin:3mm 0 6mm;padding:0;list-style:none}
.fp-benefits.two-col{grid-template-columns:1fr 1fr}
.fp-benefits li{position:relative;padding:3mm 4mm 3mm 10mm;border-radius:4mm;background:#f4f9f9;font-size:11pt;font-weight:800}
.fp-benefits li:before{content:"✓";position:absolute;left:4mm;color:#fdab0d}
.fp-row{display:grid;grid-template-columns:42mm 1fr;border-top:.5mm solid #3fa8a4;min-height:12mm}
.fp-row:last-child{border-bottom:.5mm solid #3fa8a4}
.fp-row strong{display:flex;align-items:center;padding:2.5mm 4mm;background:#eef7f7;color:#007b89;font-size:10.5pt}
.fp-row span{display:flex;align-items:center;padding:2.5mm 4mm;font-size:10.5pt}
.fp-accent{display:inline-block;margin-bottom:4mm;padding:2.5mm 6mm;border-radius:8mm;background:#ffe000;color:#003f46;font-size:14pt;font-weight:1000}

/* Web family */
.fp-web-head{padding:9mm 10mm 4mm;display:flex;align-items:center;justify-content:space-between;gap:8mm;background:#fff}
.fp-web-pill{flex:1;padding:4mm 7mm;border-radius:12mm;background:#007b89;color:#fff;text-align:center;font-size:21pt;font-weight:1000}
.fp-web-lead{margin:2mm 10mm 4mm;padding:5mm 6mm;color:#3fa8a4;font-size:17pt;font-weight:900;line-height:1.45}
.fp-web-recommend{margin:0 10mm 6mm;padding:5mm 7mm;border-radius:5mm;background:#d8eeee}
.fp-web-recommend strong{display:block;color:#007b89;font-size:17pt;text-align:center}
.fp-web-recommend p{margin:3mm 0 0;font-size:12pt}
.fp-tag-grid{margin:0 10mm 6mm;display:grid;grid-template-columns:repeat(3,1fr);gap:3mm}
.fp-tag-grid span{display:grid;place-items:center;min-height:13mm;padding:2mm 3mm;border-radius:3mm;background:#007b89;color:#fff;text-align:center;font-size:10.5pt;font-weight:900}
.fp-info-table{margin:0 10mm 40mm}

/* Heritage information */
.fp-legacy-head{padding:8mm 10mm 5mm;background:#007b89;color:#fff}
.fp-legacy-head .fp-logo{filter:none;margin-bottom:5mm}
.fp-legacy-head h1{margin:0;font-size:27pt}
.fp-four-grid{display:grid;grid-template-columns:1fr 1fr;gap:5mm;padding:8mm 10mm 5mm}
.fp-four-grid>div{min-height:48mm;padding:5mm;border-radius:5mm;background:#fbf8e8;text-align:center}
.fp-four-grid span{display:block;color:#3fa8a4;font-weight:900;font-size:10pt}
.fp-four-grid strong{display:block;margin:4mm 0 2mm;color:#007b89;font-size:16pt}
.fp-four-grid p{margin:0;font-size:10pt}
.fp-legacy-note{margin:5mm 10mm 40mm;padding:5mm;border-radius:4mm;background:#ebf1f1;font-size:10.5pt;line-height:1.5}

/* Photo heritage */
.fp-photo-head{padding:8mm 10mm 5mm;background:#fff}
.fp-photo-head{position:relative}
.fp-photo-head>span{display:inline-block;margin-top:4mm;padding:2.5mm 4mm;background:#e6532f;color:#fff;font-size:12pt;font-weight:900}
.fp-photo-head h1{margin:4mm 0 0;color:#e6532f;font-size:28pt;line-height:1.15}
.fp-photo-area{height:142mm;margin:0 10mm;background:#eef3f3 center/cover no-repeat;display:grid;place-items:center;color:#6f858a;font-size:15pt;font-weight:900}
.fp-h02-band{margin:5mm 10mm 38mm;display:flex;justify-content:space-between;align-items:center;padding:4mm 6mm;background:#e6532f;color:#fff}
.fp-h02-band strong{font-size:18pt}.fp-h02-band span{font-size:11pt;font-weight:800}

/* Event */
.fp-event-date{margin:-6mm 10mm 5mm;position:relative;z-index:2;padding:5mm 7mm;border-radius:5mm;background:#fff;box-shadow:0 4px 14px rgba(0,0,0,.12);display:grid;grid-template-columns:24mm 1fr;gap:2mm 4mm}
.fp-event-date span{grid-row:1/3;display:grid;place-items:center;border-radius:3mm;background:#007b89;color:#fff;font-weight:1000}
.fp-event-date strong{font-size:19pt;color:#003f46}.fp-event-date em{font-style:normal;font-size:11pt;color:#47666c}
.fp-event-benefits{padding:0 10mm 40mm}.fp-event-benefits h2{color:#007b89;font-size:17pt}

@media(max-width:1100px){
  .flyer-sheet{transform:scale(.78);transform-origin:top left;margin-right:-46mm;margin-bottom:-65mm}
}
@media(max-width:760px){
  .flyer-sheet{transform:scale(.52);margin-right:-100mm;margin-bottom:-142mm}
}

@media print{
  @page{size:A4 portrait;margin:0}
  body.printing-flyer *{visibility:hidden!important}
  body.printing-flyer #flyerPreview,body.printing-flyer #flyerPreview *{visibility:visible!important}
  body.printing-flyer #flyerPreview{position:absolute;left:0;top:0;width:210mm;height:297mm;padding:0;background:#fff;overflow:visible}
  body.printing-flyer .flyer-sheet{position:absolute;left:0;top:0;transform:none!important;margin:0!important;box-shadow:none!important;width:210mm;height:297mm}
}


/* Designer-adjustable tokens */
:root{
  --brand-primary:#007B89;
  --brand-aqua:#3FA8A4;
  --brand-dark:#003F46;
  --brand-pale:#D8EEEE;
  --brand-orange:#FDAB0D;
  --brand-yellow:#FFE000;
  --headline-scale:1;
  --section-heading-scale:1;
  --body-scale:1;
  --body-line-height:1.55;
  --radius-scale:1;
  --gap-scale:1;
  --header-scale:1;
}
.topbar{background:var(--brand-primary);padding-top:calc(28px * var(--header-scale));padding-bottom:calc(28px * var(--header-scale))}
.topbar h1{font-size:calc(40px * var(--headline-scale))}
.topbar h1 span{color:var(--brand-orange)}
.step,.primary,.fp-section-title,.fp-web-pill,.fp-legacy-head,.fp-event-date span{background:var(--brand-primary)}
.secondary{color:var(--brand-primary)}
.panel,.asset-card,input,textarea,select{border-radius:calc(18px * var(--radius-scale))}
.layout,.workspace{gap:calc(20px * var(--gap-scale))}
.fp-footer{border-top-color:var(--brand-primary)}
.fp-footer-cta>strong,.fp-pill{background:var(--brand-orange)}
.fp-accent{background:var(--brand-yellow)}
.fp-row{border-color:var(--brand-aqua)}
.fp-row strong{color:var(--brand-primary)}
.fp-body h2,.fp-web-recommend strong,.fp-four-grid strong{color:var(--brand-dark)}
html[data-density="compact"] .panel{padding:15px}
html[data-density="airy"] .panel{padding:28px}
html[data-font-tone="strict_gothic"] .flyer-sheet{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif}
html[data-font-tone="friendly_gothic"] .flyer-sheet{font-family:"Hiragino Maru Gothic ProN","Yu Gothic",sans-serif}
html[data-font-tone="campaign_bold"] .flyer-sheet{font-family:-apple-system,BlinkMacSystemFont,"Yu Gothic",sans-serif;font-weight:600}

/* Header links */
.top-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.admin-link{color:#fff;text-decoration:none;display:inline-flex;align-items:center}
.button-link{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}

/* Access gate: convenience deterrent only */
html.nitc-locked body> *:not(#nitcAccessGate){filter:blur(12px);pointer-events:none;user-select:none}
#nitcAccessGate{position:fixed;inset:0;z-index:9999;background:rgba(0,45,52,.72);display:grid;place-items:center;padding:20px}
.access-card{width:min(430px,100%);background:#fff;border-radius:18px;padding:28px;box-shadow:0 20px 80px rgba(0,0,0,.3);display:grid;gap:12px}
.access-card strong{font-size:22px;color:var(--brand-dark)}
.access-card p,.access-card small{margin:0;color:#5e777c}
.access-card button{background:var(--brand-primary);color:#fff}
#nitcAccessError{color:#a83e2d;font-weight:800}

/* Admin */
.admin-layout{max-width:1180px;margin:0 auto;padding:24px;display:grid;gap:20px}
.admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
.admin-grid.colors{grid-template-columns:repeat(3,minmax(0,1fr))}
.admin-grid input[type="color"]{height:46px;padding:5px}
.check-row{display:flex;gap:14px;flex-wrap:wrap;margin:14px 0}
.check-row label{display:flex;align-items:center;gap:7px;margin:0}
.check-row input{width:auto}
.design-preview{--p:#007B89;--a:#FDAB0D;--y:#FFE000;--hs:1;--bs:1;--r:1;margin:18px 0;padding:24px;border:2px solid var(--p);border-radius:calc(16px * var(--r));background:#fff}
.design-preview span{display:inline-block;background:var(--p);color:#fff;padding:8px 14px;border-radius:999px;font-weight:900}
.design-preview h3{font-size:calc(34px * var(--hs));line-height:1.08;margin:16px 0 10px;color:#003F46}
.design-preview p{font-size:calc(16px * var(--bs));line-height:1.6}
.design-preview button{background:var(--a);color:#fff}
.github-archive-panel .admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

@media(max-width:760px){
  .admin-grid,.admin-grid.colors,.github-archive-panel .admin-grid{grid-template-columns:1fr}
  .top-actions{align-items:flex-start}
}


/* Full design-system console */
.admin-subtitle{margin:28px 0 10px;padding-top:18px;border-top:1px solid #e3eeee;color:var(--brand-dark);font-size:16px}
.system-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}
.system-summary-grid details{margin:0;border:1px solid #dbe8e9;border-radius:14px;padding:12px;background:#fbfdfd}
.system-summary-grid summary{font-size:14px}
.system-summary{padding-top:10px;color:#526d73;font-size:12px;line-height:1.75}
.system-summary b{color:var(--brand-dark)}
.design-preview p{line-height:var(--lh,1.55)}
.character-preview{display:flex;align-items:center;gap:12px;margin:14px 0;padding:12px;border-radius:12px;background:#eef8f8}
.character-preview .char-head{width:58px;height:58px;border:3px solid var(--p);border-radius:50%;display:grid;place-items:center;color:var(--p);font-weight:900;background:#fff}
.character-preview strong,.character-preview small{display:block}.character-preview small{margin-top:4px;color:#6a8186}
@media(max-width:760px){.system-summary-grid{grid-template-columns:1fr}}

body{font-family:"M PLUS 1p","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif}

.eyebrow,.status-pill,.asset-kicker,code,.fp-section-title,.fp-event-date span{font-family:"Jost","M PLUS 1p",sans-serif}
input,textarea,select,button{font-family:"M PLUS 1p","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif}
.reference-role-note{font-size:12px;color:#61787d;line-height:1.55}


/* Character reference preview in Builder */
.character-reference-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0 14px}
.character-reference-thumb{overflow:hidden;border:1px solid #d7e7e8;border-radius:12px;background:#fff}
.character-reference-thumb img{display:block;width:100%;aspect-ratio:4/3;object-fit:contain;background:#f7fbfb}
.character-reference-thumb>div:last-child{padding:7px 8px}
.character-reference-thumb strong,.character-reference-thumb small{display:block}
.character-reference-thumb strong{font-size:11px;color:#014f45}
.character-reference-thumb small{margin-top:3px;color:#6b8186;font-size:9px;line-height:1.3;overflow-wrap:anywhere}
.character-reference-missing{aspect-ratio:4/3;display:grid;place-items:center;background:#fff2ed;color:#a34c36;font-weight:800;font-size:11px}
@media(max-width:520px){.character-reference-preview{grid-template-columns:1fr}}

/* Fixed brand asset previews */
.brand-asset-card .brand-asset-preview{
  height:180px;
  padding:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid #dbe8e9;
}
.brand-asset-card .brand-asset-preview img{
  width:100%;
  height:100%;
  max-width:360px;
  max-height:110px;
  aspect-ratio:auto;
  object-fit:contain;
  object-position:center;
}
.brand-asset-card .brand-usage{
  margin:2px 0 8px;
  color:#007b89;
  font-weight:900;
  font-size:11px;
}
