/* Supporting pages share the current home's palette, type and pixel outlines. */
:root { --border: #1a1000; --text: #1a1000; --yellow: #f5c030; --yellow-d: #c89010; --panel: #e8dfc0; --white: #fffbe8; --sky-1: #4aaae8; --sky-2: #7ccaf5; --sky-3: #a8dff8; --chart-bar: #4a7fd4; --error-text: #ad2436; }
:root[data-theme="dark"] { --border: #0c0800; --text: #ede2c4; --yellow: #c99a1f; --yellow-d: #8a6a10; --panel: #2c2416; --white: #201a10; --sky-1: #0a1230; --sky-2: #141c42; --sky-3: #1c2854; --chart-bar: #79b3f0; --error-text: #ff9cac; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: linear-gradient(180deg,var(--sky-1),var(--sky-2) 60%,var(--sky-3)); min-height: 100vh; }
.subpage-wrap { max-width: 1240px; }
.subpage-wrap .home-top-actions a { background: var(--home-soft); border: 1px solid var(--home-line); color: var(--text); font-weight: 400; }
.subpage-nav { display: flex; align-items: center; gap: 8px; padding: 8px; margin: 16px 0; overflow-x: auto; }
.subpage-nav a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: 4px; text-decoration: none; font-size: 15px; }
.subpage-nav a[aria-current="page"] { background: var(--yellow); color: #1a1000; border-color: #b58a26; font-weight: 600; }
.subpage-nav a:hover { background: var(--home-soft); }
.subpage-nav a[aria-current="page"]:hover { background: var(--yellow); }
.subpage-nav .home-icon { width: 20px; height: 20px; }
.subpage-content { min-width: 0; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; margin-bottom: 20px; }
.page-intro h1 { font-size: 30px; font-weight: 600; line-height: 1.4; letter-spacing: -.5px; }
.page-intro p { color: var(--home-muted); font-size: 16px; margin-top: 5px; }
.page-intro img { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.card-box { min-width: 0; background: var(--white); border: 3px solid var(--border); box-shadow: 3px 3px 0 var(--border); border-radius: 6px; padding: 22px; }
.card-box h2, .section-title { font-size: 20px; line-height: 1.5; font-weight: 600; margin-bottom: 16px; }
.about-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,1fr); align-items: start; gap: 20px; }
.about-timeline, #highlight-section { grid-column: 1 / -1; }
.profile-card { display: flex; align-items: center; gap: 18px; min-width: 0; }
.profile-photo-box { display: grid; place-items: center; width: 104px; height: 104px; flex-shrink: 0; border: 2px solid var(--home-line); border-radius: 6px; background: var(--home-soft); overflow: hidden; }
.profile-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-placeholder { font-size: 40px; }
.profile-info { min-width: 0; flex: 1; }
#profile-name { font-size: 25px; line-height: 1.4; font-weight: 600; }
#profile-title { color: var(--home-muted); font-size: 15px; margin-top: 4px; }
#profile-tagline { font-size: 16px; line-height: 1.7; margin-top: 8px; }
#profile-tagline:empty { display: none; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.profile-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--home-line); border-radius: 4px; background: var(--home-soft); color: var(--home-blue) !important; font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.profile-story-box { margin-top: 22px; border-top: 1px solid var(--home-line); padding-top: 20px; }
.profile-story-box h3 { margin-bottom: 10px; }
#profile-story { font-size: 16px; line-height: 1.9; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.stat-tile { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 14px 4px; text-align: center; background: var(--home-soft); border: 1px solid var(--home-line); border-radius: 4px; }
.stat-tile .num { font-size: 26px; line-height: 1.5; font-weight: 600; color: var(--home-blue); overflow-wrap: anywhere; }
.stat-tile .label { display: block; font-size: 13px; line-height: 1.5; color: var(--home-muted); margin-top: 4px; }
.visit-chart-box { margin-top: 22px; }
.visit-chart-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.visit-chart { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; align-items: end; padding: 14px 8px 10px; border: 1px solid var(--home-line); border-radius: 4px; background: var(--home-soft); }
.vc-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.vc-num, .vc-day { font-size: 12px; line-height: 1.5; color: var(--home-muted); text-align: center; }
.vc-num { color: var(--text); font-weight: 600; }
.vc-bar { width: 100%; max-width: 28px; background: var(--chart-bar); border: 1px solid #326192; border-radius: 2px 2px 0 0; }
.vc-bar.today { background: var(--yellow); border-color: #b58a26; }
.badge-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-top: 1px solid var(--home-line); }
.badge-item:first-child { border-top: 0; padding-top: 0; }
.badge-item:last-child { padding-bottom: 0; }
.badge-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; background: var(--home-soft); border: 1px solid var(--home-line); border-radius: 4px; font-size: 24px; }
.badge-body { min-width: 0; }
.badge-year { display: block; font-size: 14px; color: var(--home-blue); font-weight: 600; margin-bottom: 4px; }
.badge-text { font-size: 16px; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.empty-msg, .gb-empty, .qr-empty { padding: 24px 8px; font-size: 15px; text-align: center; color: var(--home-muted); }
.qr-toolbar { margin-bottom: 20px; padding: 18px 20px; display: grid; grid-template-columns: minmax(0,1fr) 180px auto; gap: 12px; align-items: end; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.qr-toolbar input, .qr-toolbar select { display: block; min-width: 0; width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--home-line); border-radius: 4px; background: var(--white); color: var(--text); font: inherit; }
.qr-toolbar input { border: 2px solid #6c9ec7; }
.qr-toolbar input::placeholder { color: var(--home-muted); opacity: 1; }
.page-primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 16px; border: 1px solid #1d4978; border-radius: 4px; background: #326caa; color: #fff; font: 600 16px/1.5 Pretendard,sans-serif; cursor: pointer; }
.page-primary-button:hover { background: #255b93; }
.qr-toolbar-note { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--home-muted); }
.qr-toolbar-note strong { color: var(--text); font-weight: 500; }
#qr-print-status { grid-column: 1 / -1; font-size: 14px; color: var(--error-text); }
.page-primary-button:disabled { opacity: .65; cursor: default; }
.qr-section-count { font-weight: 400; font-size: 14px; margin-left: 6px; }
.qr-section { margin-bottom: 24px; }
.qr-section-title { font-size: 19px; line-height: 1.6; font-weight: 600; padding: 10px 16px; margin-bottom: 14px; background: var(--yellow); color: #1a1000; border: 2px solid var(--border); border-radius: 4px; box-shadow: 2px 2px 0 var(--border); }
.qr-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.qr-item { min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 16px 12px; background: var(--white); color: var(--text); border: 2px solid var(--border); border-radius: 5px; box-shadow: 2px 2px 0 var(--border); }
.qr-item-title { min-height: 54px; font-size: 17px; line-height: 1.6; font-weight: 600; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.qr-item-img { display: block; width: 180px; max-width: 100%; height: auto; aspect-ratio: 1; background: #fff; border: 1px solid #d2d2d2; border-radius: 3px; padding: 6px; margin: 14px auto 10px; }
.qr-item-url { width: 100%; margin-top: auto; text-align: center; font-size: 13px; line-height: 1.6; color: var(--home-muted); overflow-wrap: anywhere; }
.qr-item-open { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 12px; padding: 8px 12px; border: 1px solid var(--home-line); border-radius: 4px; color: var(--home-blue) !important; text-decoration: none; font-size: 14px; }
.guestbook-layout { display: grid; grid-template-columns: 340px minmax(0,1fr); align-items: start; gap: 20px; }
.guestbook-compose { position: sticky; top: 20px; }
#gb-form { display: flex; flex-direction: column; gap: 14px; }
#gb-form input, #gb-form textarea { display: block; width: 100%; min-height: 48px; border: 1px solid var(--home-line); border-radius: 4px; padding: 11px 12px; font: 400 16px/1.6 Pretendard,sans-serif; color: var(--text); background: var(--white); }
#gb-form input::placeholder, #gb-form textarea::placeholder { color: var(--home-muted); opacity: 1; }
#gb-form textarea { min-height: 160px; resize: vertical; }
#gb-form button { width: 100%; }
#gb-form button:disabled { cursor: default; opacity: .65; }
.gb-form-status { color: var(--error-text); font-size: 14px; min-height: 1.5em; }
.gb-entry { padding: 18px 0; border-top: 1px solid var(--home-line); }
.gb-entry:first-child { border-top: 0; padding-top: 0; }
.gb-entry:last-child { padding-bottom: 0; }
.gb-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.gb-meta strong { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.gb-date { font-size: 13px; color: var(--home-muted); }
.gb-like-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 8px 10px; margin-left: auto; border: 1px solid var(--home-line); border-radius: 4px; background: var(--home-soft); color: var(--text); font: 400 14px/1.5 Pretendard,sans-serif; cursor: pointer; }
.gb-like-btn.liked { background: #ffe1e7; color: #97283d; border-color: #dc9aa8; }
.gb-text { font-size: 16px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
:root[data-theme="dark"] .subpage-nav a:not([aria-current]) .home-icon { stroke: #ede2c4; }
.subpage-wrap a, .subpage-wrap button { touch-action: manipulation; }
.subpage-wrap .home-footer { text-align: left; }
@media (max-width: 1000px) { .qr-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .about-layout { grid-template-columns: minmax(0,1fr) minmax(280px,1fr); } }
@media (max-width: 760px) {
  .about-layout, .guestbook-layout { grid-template-columns: 1fr; gap: 16px; }
  .guestbook-compose { position: static; }
  .qr-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .qr-toolbar { grid-template-columns: minmax(0,1fr) auto; }
  .qr-search-field { grid-column: 1 / -1; }
  .qr-toolbar-note { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .subpage-wrap .home-top-actions a { min-height: 48px; font-size: 14px; padding: 8px; }
  .subpage-nav { margin: 12px 0; gap: 4px; padding: 6px; }
  .subpage-nav a { font-size: 14px; padding: 9px 10px; gap: 6px; }
  .subpage-nav .home-icon { width: 18px; height: 18px; }
  .page-intro { padding: 16px; gap: 12px; margin-bottom: 16px; }
  .page-intro h1 { font-size: 25px; }
  .page-intro p { font-size: 15px; }
  .page-intro img { width: 52px; height: 60px; }
  .card-box { padding: 18px 16px; }
  .card-box h2, .section-title { font-size: 19px; }
  .profile-card { align-items: flex-start; gap: 12px; }
  .profile-photo-box { width: 68px; height: 68px; }
  #profile-name { font-size: 22px; }
  #profile-title { font-size: 14px; }
  .profile-links { gap: 6px; }
  .profile-link { padding: 8px 10px; }
  .stat-tile .num { font-size: 23px; }
  .qr-toolbar { padding: 16px 12px; gap: 12px 8px; }
  .qr-toolbar-note { font-size: 13px; }
  .qr-grid { gap: 12px; }
  .qr-item { padding: 12px 8px; }
  .qr-item-title { font-size: 16px; min-height: 52px; }
  .qr-item-img { padding: 4px; }
  .qr-item-url { font-size: 12px; }
  .qr-section-title { font-size: 18px; padding: 9px 12px; }
}
@media (max-width: 360px) { .qr-grid { grid-template-columns: 1fr; } .profile-card { flex-direction: column; } .stat-tile .label { font-size: 12px; } .stat-grid { gap: 6px; } }
@media print {
  @page { size: A4; margin: 12mm; }
  :root, :root[data-theme="dark"] { --text: #000; --white: #fff; --home-muted: #333; --home-line: #ccc; }
  body { background: #fff !important; color: #000 !important; }
  body::before, .home-topbar, .subpage-nav, .home-footer, .skip-link, .qr-toolbar, .qr-item-open, .page-intro img { display: none !important; }
  .home-wrap { max-width: none; padding: 0; margin: 0; }
  .page-intro { display: block; padding: 0 0 5mm; margin: 0 0 5mm; background: #fff; color: #000; border: 0; box-shadow: none; }
  .page-intro h1 { font-size: 18pt; }
  .page-intro p { font-size: 10pt; }
  .qr-section-title { background: #fff; color: #000; border: 0; border-bottom: 1px solid #999; padding: 0 0 2mm; margin-bottom: 4mm; box-shadow: none; font-size: 12pt; break-after: avoid; }
  .qr-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4mm; }
  .qr-item { background: #fff; color: #000; border: 1px solid #ccc; border-radius: 0; padding: 3mm; box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
  .qr-item-title { font-size: 10pt; min-height: 12mm; }
  .qr-item-img { width: 40mm; max-width: 100%; margin: 2mm auto; padding: 1mm; border: 0; border-radius: 0; }
  .qr-item-url { font-size: 8pt; color: #333; }
}
