.card-workspace { display:grid; grid-template-columns:minmax(290px,350px) minmax(0,1fr); gap:22px; align-items:start; }
.card-editor { position:sticky; top:100px; display:grid; gap:16px; }
.card-editor .data-card { padding:22px; }
.card-editor h3 { margin:0 0 6px; font-size:1.08rem; }
.card-editor p { margin:0 0 18px; color:var(--muted); font-size:.82rem; line-height:1.6; }
.card-editor label { display:grid; gap:6px; margin-bottom:13px; color:#3c4043; font-size:.8rem; font-weight:700; }
.card-editor input,.card-editor select { min-height:42px; }
.card-editor .card-check { display:flex; align-items:center; gap:8px; }
.card-editor .card-check input { width:18px; min-height:18px; height:18px; }
.card-editor #cardAddMemberButton { margin-top:10px; text-align:left; font-size:.82rem; }
.card-editor .card-status-help { margin:-5px 0 17px; font-size:.76rem; }
.card-field-pair { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.card-editor-actions button { width:100%; border-radius:12px; }
.card-ready-note { margin:12px 0 0 !important; padding:11px 13px; border-radius:10px; background:#e6f4ea; color:#137333 !important; font-size:.81rem; font-weight:700; }
.card-preview-shell { min-width:0; padding:16px; border:1px solid var(--line); border-radius:18px; background:#e9edf3; overflow:auto; }
.card-preview-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 15px; color:#4b5563; font-size:.8rem; font-weight:700; }
.card-empty { display:grid; min-height:400px; place-content:center; text-align:center; color:var(--muted); }
.card-empty strong { display:block; margin-bottom:8px; color:var(--ink); font-size:1.1rem; }
.karte-pages { display:grid; justify-content:center; gap:20px; min-width:210mm; }
.karte-page { position:relative; width:210mm; height:297mm; display:flex; flex-direction:column; flex:none; padding:7mm 12.5mm 5mm; overflow:hidden; background:#fff; color:#20324e; box-shadow:0 10px 28px rgba(25,40,66,.16); font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif; font-size:7pt; line-height:1.2; }
.karte-page * { box-sizing:border-box; }
.karte-status-band { height:10mm; flex:none; display:flex; align-items:center; gap:3mm; padding:0 3mm; background:var(--card-accent); color:#fff; }
.karte-status-band b { display:grid; width:8mm; height:7mm; place-items:center; background:#fff; color:var(--card-accent); font-size:12pt; }
.karte-status-band small { font-size:6pt; }
.karte-status-band strong { font-size:8pt; }
.karte-document-head { flex:none; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--card-accent); }
.karte-document-head > div:first-child { display:flex; align-items:baseline; gap:9mm; }
.karte-document-head strong { color:var(--card-accent); font-size:15pt; }
.karte-document-head span { color:#20324e; font-size:7pt; }
.karte-head-note { text-align:right; font-size:6pt; line-height:1.45; }
.karte-head-note b { color:#20324e; font-size:7pt; }
.karte-head-note em { color:#b34d12; font-style:normal; }
.karte-front .karte-status-band { margin-bottom:4mm; }
.karte-front .karte-document-head { height:9mm; align-items:flex-start; margin-bottom:2mm; padding-top:.5mm; }
.karte-front .karte-head-note { align-self:flex-end; margin-bottom:1mm; }
.karte-person-box { height:31.5mm; flex:none; display:grid; grid-template-columns:28% 45% 27%; grid-template-rows:23.5mm 8mm; margin-bottom:3.5mm; border:1px solid #8d9bac; }
.karte-person-box > div { min-width:0; }
.karte-id,.karte-person-lines,.karte-staff-lines { padding:2mm 2.5mm 0; }
.karte-id,.karte-person-lines { border-right:1px solid #8d9bac; }
.karte-id { display:flex; flex-direction:column; gap:1mm; }
.karte-id small { font-size:6pt; }
.karte-id strong { font-size:16pt; line-height:1.15; }
.karte-id span { margin-top:auto; overflow-wrap:anywhere; font-size:6pt; }
.karte-person-lines { display:flex; flex-direction:column; justify-content:space-around; }
.karte-person-lines > div { display:grid; grid-template-columns:15mm minmax(0,1fr); gap:1mm; align-items:end; min-height:7mm; }
.karte-person-lines strong { min-height:1em; border-bottom:1px solid #8d9bac; overflow-wrap:anywhere; font-size:8pt; font-weight:600; }
.karte-person-lines span { font-size:6.3pt; }
.karte-staff-lines { display:flex; flex-direction:column; justify-content:space-between; gap:1mm; }
.karte-staff-lines > div { min-height:5mm; border-bottom:1px solid #8d9bac; font-size:6pt; }
.karte-staff-lines > div:last-child { border:0; }
.karte-address-check { font-size:7pt !important; }
.karte-plan-line { grid-column:1/-1; display:grid; grid-template-columns:15mm minmax(0,1fr); align-items:center; gap:1mm; padding:0 2.5mm; }
.karte-plan-line span { font-size:6pt; }
.karte-plan-line strong { min-height:5mm; padding-top:1mm; border-bottom:1px solid #8d9bac; font-size:6.5pt; font-weight:500; overflow-wrap:anywhere; }
.karte-block { display:flex; flex-direction:column; min-height:0; }
.karte-block h3 { height:6.5mm; flex:none; display:flex; justify-content:space-between; align-items:center; margin:0; padding:0 2mm; background:#20324e; color:#fff; font-size:7.5pt; }
.karte-block h3 small { font-size:5.6pt; font-weight:400; }
.karte-block table,.karte-year table { width:100%; min-width:0; table-layout:fixed; border-collapse:collapse; }
.karte-block table { height:calc(100% - 6.5mm); }
.karte-block th,.karte-block td,.karte-year th,.karte-year td { padding:0 1mm; border:1px solid #8d9bac; text-align:center; overflow-wrap:anywhere; }
.karte-block tbody tr:last-child td,.karte-year tbody tr:last-child td { border-bottom:1px solid #8d9bac; }
.karte-block th,.karte-year th { height:6mm; background:#eaf0f5; color:#20324e; font-size:6pt; font-weight:700; }
.karte-block td { font-size:6.5pt; }
.karte-family { height:39.5mm; flex:none; margin-bottom:4mm; }
.karte-family th:first-child { width:8%; }.karte-family th:nth-child(2) { width:34%; }.karte-family th:nth-child(3) { width:14%; }
.karte-family td:nth-child(2),.karte-family td:last-child { text-align:left; }
.karte-courses { height:62.5mm; flex:none; margin-bottom:4mm; }
.karte-courses th:first-child { width:30%; }.karte-courses th:nth-child(2) { width:23%; }.karte-courses th:nth-child(3) { width:23%; }
.karte-front-lower { height:106mm; flex:none; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:5mm; }
.karte-front-lower > div { min-width:0; display:grid; grid-template-rows:48mm 48mm; gap:4mm; align-content:start; }
.karte-events th:first-child,.karte-contact th:first-child { width:19%; }.karte-events th:nth-child(2) { width:20%; }.karte-events th:last-child { width:21%; }.karte-contact th:nth-child(2) { width:19%; }
.karte-notes { border:1px solid #8d9bac; }.karte-notes h3 { margin:-1px -1px 0; }.karte-notes > div { flex:1; display:flex; flex-direction:column; justify-content:space-around; padding:2mm 3mm; }.karte-notes i { height:1px; border-bottom:1px solid #b8c2ce; }
.karte-page footer { height:5mm; flex:none; display:flex; justify-content:space-between; align-items:end; gap:3mm; border-top:1px solid #8d9bac; color:#455568; font-size:5.5pt; }
.karte-page footer span:last-child { white-space:nowrap; }
.karte-front footer { margin-top:3mm; }
.karte-back .karte-document-head { height:10mm; align-items:flex-start; padding-top:1mm; }
.karte-back .karte-document-head > div:first-child strong { font-size:15pt; }
.karte-legend { height:6mm; flex:none; display:flex; align-items:center; margin:2mm 0 1mm; font-size:6.2pt; }
.karte-years { height:232mm; flex:none; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:112mm 112mm; gap:8mm 10mm; }
.karte-year { display:flex; flex-direction:column; min-width:0; min-height:0; }
.karte-year-heading { height:7mm; flex:none; display:flex; justify-content:space-between; align-items:center; padding:0 2mm; background:#20324e; color:#fff; }
.karte-year-heading strong { font-size:8pt; }.karte-year-heading span { font-size:6pt; }
.karte-year table { height:calc(100% - 7mm); }
.karte-year th { height:6mm; }.karte-year th:nth-child(1) { width:9%; }.karte-year th:nth-child(2) { width:8%; }.karte-year th:nth-child(3) { width:9%; }.karte-year th:nth-child(4) { width:11%; }.karte-year th:nth-child(5) { width:49%; }.karte-year th:last-child { width:14%; }
.karte-year td { font-size:5pt; }
.karte-back footer { margin-top:auto; }
@media (max-width:1080px) { .card-workspace { grid-template-columns:1fr; }.card-editor { position:static; }.card-editor .data-card { max-width:none; } }
@media (max-width:700px) { .card-preview-shell { padding:10px; }.card-preview-head { align-items:flex-start; flex-direction:column; } }
@media print {
  body.print-card { width:210mm; margin:0; padding:0; background:#fff !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  body.print-card .app-header,body.print-card .connection-notice,body.print-card .page-heading,body.print-card .card-editor,body.print-card .card-preview-head,body.print-card #toast,body.print-card .view:not(#cardView) { display:none !important; }
  body.print-card main,body.print-card #appView,body.print-card #cardView,body.print-card .card-workspace,body.print-card .card-preview-shell,body.print-card .karte-pages { display:block !important; width:210mm !important; min-width:210mm !important; max-width:none !important; margin:0 !important; padding:0 !important; border:0 !important; background:#fff !important; box-shadow:none !important; overflow:visible !important; transform:none !important; animation:none !important; }
  body.print-card .karte-page { margin:0 !important; box-shadow:none !important; break-after:page; page-break-after:always; }
  body.print-card .karte-page:last-child { break-after:auto; page-break-after:auto; }
}
