@import url('../assets/fonts/whiteboard-fonts.css');

/* The public homepage has its own palette. Room and presentation styles keep
   their existing variables when data-app-view changes. */
body[data-app-view="lobby"] { background: #fbf6ef; }
body[data-app-view="lobby"]:has(.home-room-dialog[open]) { overflow: hidden; }
body[data-app-view="lobby"] #app {
  --primary: #a9412c;
  --primary-hover: #893320;
  --primary-light: #f5e6dd;
  --primary-border: #d7af9b;
  --accent: #a9412c;
  --bg-main: #fbf6ef;
  --bg-surface: #fffdf9;
  --bg-surface-elevated: #f1e6d8;
  --bg-glass: #fbf6eff2;
  --border-color: #e5d8ca;
  --text-main: #342c28;
  --text-muted: #76675c;
  --text-subtle: #76675c;
  --shadow-md: 0 12px 36px #4937270b;
  color: var(--text-main);
  word-break: keep-all;
}
body[data-app-view="lobby"] .lobby-container { width: 100%; max-width: 1160px; padding: 0 32px 56px; gap: 0; }
body[data-app-view="lobby"] .app-navbar { padding: 22px max(32px, calc((100% - 1096px) / 2)); border: 0; gap: 24px; }
body[data-app-view="lobby"] .brand-title { font: 700 26px Georgia, serif; color: var(--text-main); background: none; -webkit-text-fill-color: currentColor; }
body[data-app-view="lobby"] .brand-badge,
body[data-app-view="lobby"] .nav-portal-link { display: none; }
body[data-app-view="lobby"] .nav-right { gap: 15px; }
body[data-app-view="lobby"] .user-profile-badge { font-size: 12px; }
body[data-app-view="lobby"] .lang-switch-btn:hover { color: var(--primary); background: var(--primary-light); }
.home-nav-link { font-size: 13px; text-decoration: none; color: var(--text-main); }
.home-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 23px; border: 1px solid var(--primary); border-radius: 8px; color: #fff; background: var(--primary); font: 700 14px/1.5 var(--font-sans); text-decoration: none; cursor: pointer; transition: transform .2s, background .2s; }
.home-btn:hover { background: var(--primary-hover); transform: translateY(-2px); }
.home-btn-outline { color: var(--text-main); border-color: var(--border-color); background: transparent; }
.home-btn-outline:hover { background: var(--bg-surface-elevated); }
.home-nav-join { padding: 10px 14px; font-size: 12px; color: var(--text-main); background: transparent; border-color: var(--border-color); }
.home-nav-join:hover { background: var(--bg-surface-elevated); }
body[data-app-view="lobby"] #app :is(button, a, input):focus-visible { outline: 3px solid #a75c19; outline-offset: 4px; }
.home-hero { display: grid; grid-template-columns: .9fr 1.1fr; gap: 45px; align-items: center; padding: 64px 0 52px; }
.home-tag { display: inline-block; border: 1px solid var(--border-color); border-radius: 30px; padding: 8px 14px; font-size: 11px; margin-bottom: 24px; }
.home-hero h1 { font-family: 'Noto Serif KR', Georgia, serif; font-weight: 600; font-size: clamp(40px, 4.4vw, 62px); line-height: 1.3; letter-spacing: -2.5px; margin-bottom: 24px; }
.home-hero h1 em { font-style: normal; color: var(--primary); }
.home-lead { color: var(--text-muted); font-size: 16px; line-height: 1.9; }
.home-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.home-checks { display: flex; gap: 20px; color: var(--text-muted); font-size: 12px; margin-top: 22px; }
.home-scene-stage { padding: 32px 20px 20px; background: #e7efde; border-radius: 160px 160px 16px 16px; position: relative; }
.home-scene-mood { display: block; text-align: center; font: italic 19px Georgia, serif; color: #4e6a46; }
.home-board { background: #fff; border: 1px solid #deddd2; border-radius: 14px; overflow: hidden; box-shadow: 0 22px 65px #4937270d; transform: rotate(-2deg); margin-top: 22px; }
.home-board-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #deddd2; padding: 17px 20px; gap: 12px; }
.home-board-top strong { font-size: 13px; }
.home-avatars { display: flex; padding-left: 8px; }
.home-avatars span { display: grid; place-items: center; width: 27px; height: 27px; background: #c7dcbd; border: 2px solid white; border-radius: 50%; margin-left: -7px; font-size: 10px; }
.home-avatars span:nth-child(2) { background: #f5c6a9; }
.home-avatars span:nth-child(3) { background: #dacbea; }
.home-canvas { min-height: 300px; padding: 28px; position: relative; background-image: radial-gradient(#ccd4c6 1px, transparent 1px); background-size: 18px 18px; }
.home-canvas h2 { font-size: 17px; margin-bottom: 20px; }
.home-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.home-note { background: #ffe998; min-height: 104px; padding: 16px 17px; box-shadow: 2px 5px 0 #00000008; transform: rotate(-3deg); font-size: 13px; line-height: 1.65; }
.home-note:nth-child(2) { background: #d7e8cf; transform: rotate(3deg); }
.home-note:nth-child(3) { background: #f6d1bc; transform: rotate(2deg); }
.home-note:nth-child(4) { background: #e4dff7; transform: rotate(-2deg); }
.home-note small { display: block; font-size: 10px; margin-top: 12px; color: #6e614a; }
.home-cursor { position: absolute; right: 23px; bottom: 24px; background: var(--primary); color: white; padding: 6px 12px; border-radius: 4px; font-size: 11px; }
.home-board-bottom { padding: 14px 20px; display: flex; justify-content: space-between; gap: 16px; font-size: 10px; color: #687060; background: #fafbf8; }
.home-example-caption { text-align: center; font-size: 10px; color: var(--text-muted); margin: 15px 0 0; }
.home-scenes { scroll-margin-top: 110px; }
.home-scene-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--border-color); }
.home-scene-tabs button { display: flex; justify-content: center; align-items: center; gap: 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 23px 8px; font: 400 12px var(--font-sans); color: var(--text-muted); cursor: pointer; }
.home-scene-tabs button[aria-pressed="true"] { border-bottom-color: var(--primary); color: var(--primary); font-weight: 700; }
.home-story { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; padding: 60px 0 70px; }
.home-eyebrow { display: block; font-size: 10px; letter-spacing: 2px; font-weight: 700; color: var(--primary); margin-bottom: 20px; }
.home-story-copy h2 { font: 600 32px/1.5 'Noto Serif KR', Georgia, serif; letter-spacing: -1.2px; margin-bottom: 20px; }
.home-story-copy p { font-size: 14px; color: var(--text-muted); line-height: 1.9; margin-bottom: 25px; }
.home-story-steps { list-style: none; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; padding: 25px 30px; }
.home-story-steps li { display: flex; gap: 20px; padding: 19px 0; align-items: start; border-bottom: 1px solid var(--border-color); }
.home-story-steps li:last-child { border: 0; }
.home-step-number { color: var(--primary); font-weight: 700; }
.home-story-steps p { font-size: 14px; margin-bottom: 3px; }
.home-story-steps small { font-size: 11px; color: var(--text-muted); }
.home-strip { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding: 25px 30px; background: #f1e4d6; border-radius: 6px; font-size: 13px; }
.home-strip span { color: var(--text-muted); }
.home-features { padding: 70px 0; }
.home-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 30px; }
.home-section-heading h2, .home-how h2 { font-size: 30px; letter-spacing: -1.2px; line-height: 1.4; }
.home-section-heading p { font-size: 13px; color: var(--text-muted); }
.home-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.home-tool { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-main); border-radius: 12px; padding: 24px; font-family: inherit; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.home-tool:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.home-tool-icon { display: grid; place-items: center; width: 44px; height: 44px; background: #f1e4d6; border-radius: 12px; font-size: 23px; margin-bottom: 22px; }
.home-tool:nth-child(4n+2) .home-tool-icon { background: #e7efde; }
.home-tool:nth-child(4n+3) .home-tool-icon { background: #eee6f3; }
.home-tool:nth-child(4n+4) .home-tool-icon { background: #f7ebc9; }
.home-tool-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; line-height: 1.5; }
.home-tool-copy { font-size: 12px; color: var(--text-muted); line-height: 1.8; margin-bottom: 22px; }
.home-tool-footer { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; }
.home-tool-footer small { font-size: 10px; color: var(--text-muted); }
.home-tool-footer > span { font-size: 22px; }
.home-how { padding: 10px 0 60px; }
.home-how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; list-style: none; margin-top: 30px; }
.home-how-steps li > span { display: block; color: var(--primary); font: italic 38px Georgia, serif; margin-bottom: 15px; }
.home-how h3 { font-size: 18px; margin-bottom: 12px; }
.home-how p { font-size: 13px; line-height: 1.8; color: var(--text-muted); }
.home-privacy { display: flex; align-items: center; justify-content: space-between; gap: 40px; border-radius: 12px; background: #f1e4d6; padding: 35px; margin-bottom: 35px; }
.home-privacy h2 { font-size: 20px; margin-bottom: 12px; }
.home-privacy p { max-width: 670px; font-size: 13px; line-height: 1.8; color: var(--text-muted); }
.home-privacy .home-btn { flex-shrink: 0; }
body[data-app-view="lobby"] .philosophy-banner { background: transparent; box-shadow: none; padding: 24px; gap: 24px; }
body[data-app-view="lobby"] .banner-eyebrow { color: var(--text-muted); }
body[data-app-view="lobby"] .banner-content h4 { color: var(--text-main); }
body[data-app-view="lobby"] .banner-badge { color: #365537; background: #e7efde; border-color: #c8d7bf; }
body[data-app-view="lobby"] .banner-action-btn { color: var(--primary); }
body[data-app-view="lobby"] .site-footer { background: #f3ebdf; }
body[data-app-view="lobby"] .site-footer :is(.footer-brand-title, .footer-nav-col h4) { color: var(--text-main); }
body[data-app-view="lobby"] .site-footer :is(.footer-desc, .footer-operator-info, .footer-nav-btn, .footer-sub-btn, .site-footer-bottom) { color: var(--text-muted); }
body[data-app-view="lobby"] .site-footer :is(.footer-email-link, .footer-portal-link) { color: var(--primary); }
body[data-app-view="lobby"] .footer-brand-badge { display: none; }
body[data-app-view="lobby"] .site-footer-bottom { border-color: var(--border-color); }
body[data-app-view="lobby"] .lobby-alert-banner { margin: 0 0 25px; background: #fff1dc; border-color: #dfc493; }
body[data-app-view="lobby"] .lobby-alert-banner :is(strong, p) { color: #754e26; }
body[data-app-view="lobby"] .ad-safe-container { margin-top: 35px; }
.home-room-dialog { position: fixed; inset: 0; margin: auto; width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid var(--border-color); border-radius: 16px; padding: 28px; background: var(--bg-main); color: var(--text-main); box-shadow: 0 25px 100px #342c2830; }
.home-room-dialog:not([open]) { display: none; }
.home-room-dialog::backdrop { background: #30251d66; backdrop-filter: blur(5px); }
.home-dialog-header { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.home-dialog-header h2 { font-size: 24px; margin-bottom: 8px; }
.home-dialog-header p { font-size: 13px; color: var(--text-muted); }
.home-dialog-close { border: 0; background: transparent; color: var(--text-main); font-size: 28px; width: 36px; height: 36px; flex-shrink: 0; cursor: pointer; }
body[data-app-view="lobby"] .home-room-dialog .lobby-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; background: var(--bg-surface-elevated); border-radius: 8px; margin-bottom: 20px; }
.home-room-dialog .lobby-tab { border: 0; border-radius: 6px; font: 700 14px var(--font-sans); background: transparent; color: var(--text-muted); padding: 12px; cursor: pointer; }
.home-room-dialog .lobby-tab.active { background: var(--primary); color: white; }
body[data-app-view="lobby"] .home-room-dialog .lobby-actions-grid { display: block; }
body[data-app-view="lobby"] .home-room-dialog [data-lobby-card][hidden] { display: none; }
body[data-app-view="lobby"] .home-room-dialog .action-card { padding: 0; border: 0; box-shadow: none; background: transparent; gap: 19px; }
.home-room-dialog .card-header-icon, .home-room-dialog .action-card-intro { display: none; }
.home-room-dialog .app-select-chip { color: var(--text-main); font: inherit; text-align: left; background: var(--bg-surface); }
.home-room-dialog .app-select-chip.active { background: var(--primary-light); }
.home-room-dialog .chip-badge { color: var(--text-muted); }
.home-room-dialog .btn-secondary { background: var(--primary); color: #fff; }
.home-room-dialog .form-input { background: var(--bg-surface); }
.home-room-dialog .form-input::placeholder { color: var(--text-muted); }
.home-room-dialog .form-toggle-text strong { color: var(--text-main); }
@media (max-width: 1000px) {
  .home-tools { grid-template-columns: repeat(2, 1fr); }
  .home-story { gap: 35px; }
  .home-nav-link { display: none; }
  .home-hero { gap: 28px; }
  .home-canvas { padding: 20px; }
  .home-note { font-size: 12px; padding: 13px; }
}
@media (max-width: 800px) {
  body[data-app-view="lobby"] .app-navbar { height: auto; min-height: 72px; padding: 16px 24px; gap: 12px; }
  body[data-app-view="lobby"] .nav-right { gap: 10px; }
  body[data-app-view="lobby"] .user-profile-badge { max-width: 100px; }
  .home-hero { grid-template-columns: 1fr; padding: 40px 0; gap: 38px; }
  .home-hero-copy { max-width: 640px; }
  .home-hero h1 { font-size: 52px; }
  .home-scene-stage { max-width: 630px; margin: 0 auto; }
  .home-privacy { align-items: start; flex-direction: column; gap: 22px; }
  .home-section-heading { flex-direction: column; align-items: start; gap: 12px; }
}
@media (max-width: 600px) {
  body[data-app-view="lobby"] .lobby-container { padding: 0 20px 35px; }
  body[data-app-view="lobby"] .app-navbar { flex-wrap: wrap; padding: 14px 20px; }
  body[data-app-view="lobby"] .brand-title { font-size: 23px; }
  body[data-app-view="lobby"] .nav-right { width: 100%; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
  body[data-app-view="lobby"] .nav-brand { margin-right: auto; }
  body[data-app-view="lobby"] .topbar-spacer { display: none; }
  .home-nav-join { margin-right: auto; font-size: 12px; }
  .home-hero { padding-top: 32px; }
  .home-hero h1 { font-size: 40px; letter-spacing: -2px; }
  .home-lead { font-size: 14px; }
  .home-tag { font-size: 10px; }
  .home-btn { font-size: 12px; padding: 13px 17px; }
  body[data-app-view="lobby"] .home-nav-join { padding: 9px 10px; font-size: 11px; white-space: nowrap; flex-shrink: 0; }
  body[data-app-view="lobby"] .user-profile-badge .user-name-text { max-width: 55px; }
  .home-scene-stage { padding: 25px 10px 10px; border-radius: 120px 120px 12px 12px; }
  .home-scene-mood { font-size: 16px; }
  .home-board-top { padding: 14px; }
  .home-board-top strong { font-size: 12px; }
  .home-canvas { min-height: 275px; padding: 20px 16px; }
  .home-canvas h2 { font-size: 15px; }
  .home-notes { gap: 13px; }
  .home-note { min-height: 95px; padding: 12px 10px; font-size: 11px; }
  .home-board-bottom { padding: 12px; gap: 10px; flex-wrap: wrap; }
  .home-scene-tabs { grid-template-columns: repeat(2, 1fr); }
  .home-scene-tabs button { padding: 17px 5px; gap: 10px; font-size: 12px; }
  .home-story { grid-template-columns: 1fr; padding: 35px 0; gap: 28px; }
  .home-story-copy h2 { font-size: 26px; }
  .home-strip { flex-direction: column; align-items: start; gap: 10px; padding: 22px; }
  .home-features { padding: 40px 0; }
  .home-section-heading h2, .home-how h2 { font-size: 26px; }
  .home-tools { grid-template-columns: 1fr; gap: 12px; }
  .home-tool { padding: 23px; }
  .home-tool-icon { margin-bottom: 17px; }
  .home-tool-title { font-size: 18px; }
  .home-tool-copy { font-size: 13px; }
  .home-how-steps { grid-template-columns: 1fr; gap: 25px; }
  .home-how { padding-bottom: 35px; }
  .home-privacy { padding: 25px; }
  body[data-app-view="lobby"] .philosophy-banner { padding: 20px; }
  body[data-app-view="lobby"] .banner-badge { white-space: normal; }
  .home-room-dialog { padding: 21px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  body[data-app-view="lobby"] .home-room-dialog .create-app-group { display: block; }
  body[data-app-view="lobby"] .home-room-dialog .action-card .form-group { margin-bottom: 0; }
  body[data-app-view="lobby"] .home-room-dialog .form-label-hint { display: block; }
  body[data-app-view="lobby"] .home-room-dialog .form-toggle-text small { display: block; }
  .home-room-dialog .app-selection-grid { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-btn, .home-tool { transition: none; }
}
