@import url("./fonts.css");

:root {
  font-family: "Paperozi", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px; font-synthesis: none;
  color: #273e35; background: #f7f5ee;
  --primary: #174b3e; --primary-dark: #103c31; --surface: #f7f5ee;
  --muted: #646c61; --line: #d9dace; --gold: #b59b57; --radius: 4px;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, p, strong { overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -1.2px; line-height: 1.16; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
h2 { font-size: 1.125rem; } h3 { font-size: 1.5rem; line-height: 1.45; letter-spacing: -.7px; }
small { font-size: .8125rem; }
:focus-visible { outline: 3px solid #ac8530; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px; background: var(--surface); z-index: 20; }
.skip-link:focus { top: 12px; }
#app { min-height: 100vh; }
.page-width { width: min(1460px, calc(100% - 96px)); margin-inline: auto; }
.site-header, .masthead { background: var(--primary); color: var(--surface); }
.site-header { border-bottom: 1px solid #ffffff24; }
.topbar { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand-nav { display: flex; align-items: center; gap: 30px; min-width: 0; }
.brand { font-size: 1.625rem; font-weight: 700; letter-spacing: -.8px; white-space: nowrap; }
.brand-nav nav { border-left: 1px solid #ffffff40; padding-left: 30px; }
.nav-button, .nav-label { color: inherit; font-size: .9375rem; min-height: 44px; display: flex; align-items: center; }
.profile-label { display: flex; align-items: center; gap: 10px; font-size: .875rem; overflow-wrap: anywhere; }
.account-controls { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.account-controls .profile-label { max-width: 240px; }
.account-button { color: inherit; border: 1px solid #ffffff70; flex-shrink: 0; padding-inline: 12px; }
.page-heading { min-height: 108px; display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 20px 24px; }
.heading-copy { min-width: 0; }
.description { font-size: 1rem; line-height: 1.65; margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 760px; }
.masthead .description { color: #e1e6da; }
.heading-tools { flex-shrink: 0; text-align: right; }
.hero-note { font-size: .8125rem; color: #d5ddcf; margin-top: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: var(--radius); font-size: .9375rem; font-weight: 600; line-height: 1.45; }
.button:hover:not(:disabled) { background: #e5e9dc; color: var(--primary); }
.primary { background: var(--primary); color: var(--surface); }
.primary:hover:not(:disabled) { background: var(--primary-dark); color: white; }
.secondary { border: 1px solid #b7bdb0; background: transparent; color: var(--primary); }
.masthead .primary { min-width: 176px; color: var(--primary); background: var(--surface); }
.masthead .secondary { color: var(--surface); border-color: #ffffff70; }
.text, .small { color: var(--primary); background: transparent; }
.text { padding-inline: 8px; }
.small { font-size: .8125rem; padding: 8px; min-height: 44px; }
.icon-button { width: 44px; height: 44px; padding: 10px; flex-shrink: 0; }
.danger { background: #934332; color: white; }
.danger-text { color: #934332; }
.workspace-content { padding-bottom: 22px; }
.dashboard-toolbar { min-height: 76px; display: grid; grid-template-columns: 1fr minmax(260px,430px) 1fr; gap: 24px; align-items: center; }
.dashboard-toolbar h2 { font-size: 1rem; font-weight: 500; }
.count { font-weight: 700; }
.board-search { display: flex; align-items: center; gap: 12px; min-width: 0; border-bottom: 1px solid #b8bfb2; color: var(--muted); }
.board-search input { background: transparent; border: 0; width: 100%; min-width: 0; height: 46px; color: var(--primary); }
.board-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.board-search .button { flex-shrink: 0; font-size: .75rem; }
.board-sort { justify-self: end; }
.board-sort select { border: 0; background: transparent; color: var(--muted); min-height: 46px; padding: 8px 26px 8px 8px; font-size: .875rem; max-width: 100%; }
.search-status { font-size: .875rem; color: var(--muted); margin-bottom: 16px; }
.search-status:empty { display: none; }
.board-grid, .post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; border-top: 1px solid var(--line); }
.board-tile { position: relative; min-width: 0; min-height: 238px; padding: 18px 24px 14px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.board-tile:nth-child(3n) { border-right: 0; }
.board-tile::before { content: ''; display: block; width: 48px; height: 3px; background: var(--gold); margin-bottom: 18px; }
.board-tile:hover, .board-tile:focus-within { background: #edf0e5; }
.board-tile:has(.board-menu[open]) { z-index: 3; }
.tile-body { flex: 1; min-width: 0; }
.tile-body h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.tile-description { font-size: .9375rem; line-height: 1.65; color: var(--muted); margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-previews { margin: 16px 0 14px; min-height: 48px; }
.board-preview { display: flex; align-items: baseline; gap: 14px; font-size: .875rem; line-height: 1.85; }
.board-preview strong { flex-shrink: 0; max-width: 32%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.preview-empty { font-size: .875rem; color: var(--muted); line-height: 1.8; }
.tile-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: .875rem; color: var(--muted); }
.tile-meta>span::before { content: ''; width: 8px; height: 8px; display: inline-block; margin-right: 8px; background: var(--board-color); border: 1px solid #788075; border-radius: 50%; }
.tile-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.board-cover { display: flex; align-items: center; min-height: 44px; gap: 8px; color: var(--primary); font-weight: 700; }
.board-menu { position: relative; flex-shrink: 0; }
.board-menu summary { cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; list-style: none; border-radius: var(--radius); }
.board-menu summary::-webkit-details-marker { display: none; }
.board-menu summary:hover, .board-menu[open] summary { background: #dfe5d6; }
.board-menu-items { position: absolute; right: 0; top: 44px; width: 215px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px #173b3020; z-index: 4; }
.board-menu-items .button { width: 100%; justify-content: flex-start; padding: 10px; font-size: .875rem; text-align: left; white-space: normal; }
.board-menu-items .danger-text { border-top: 1px solid var(--line); }
.service-footer { display: flex; align-items: center; gap: 14px; padding-block: 22px; color: var(--muted); font-size: .75rem; line-height: 1.8; border-top: 1px solid var(--line); }
.service-footer span:first-child { font-weight: 700; white-space: nowrap; }
.empty-state { min-height: 330px; padding: 55px 24px; text-align: center; display: flex; align-items: center; justify-content: center; flex-direction: column; border-block: 1px solid var(--line); }
.empty-icon { color: var(--gold); margin-bottom: 22px; }
.empty-state h2 { font-size: 1.375rem; }
.empty-state p { color: var(--muted); line-height: 1.8; margin: 16px 0 24px; max-width: 560px; }
.subtle { font-size: .8125rem; color: var(--muted); }
/* Forms and native dialogs share the same quiet, flat controls. */
.modal { width: calc(100% - 32px); max-width: 600px; max-height: 90vh; max-height: 90dvh; padding: 0; border: 1px solid #c9cdbf; border-radius: var(--radius); background: var(--surface); color: #273e35; box-shadow: 0 20px 60px #10271f26; }
.modal::backdrop { background: #14221bd0; opacity: .55; }
.modal form { padding: 34px 36px 28px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.dialog-heading>div { min-width: 0; }
.dialog-heading h2 { font-size: 1.75rem; letter-spacing: -.8px; }
.dialog-heading h2::before { content: ''; width: 48px; height: 3px; background: var(--gold); display: block; margin-bottom: 16px; }
.dialog-heading p { font-size: .875rem; color: var(--muted); line-height: 1.6; margin-top: 10px; }
.dialog-body { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.field label, .color-field legend { font-size: .9375rem; font-weight: 600; }
.field label svg { margin-right: 6px; }
.field input:not([type=file]), .field textarea { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; color: #273e35; line-height: 1.6; border: 1px solid #bbc2b4; border-radius: var(--radius); background: #fffef9; }
.field textarea { resize: vertical; min-height: 110px; }
#field-body { min-height: 176px; }
input::placeholder, textarea::placeholder { color: #6e7569; }
.field small { color: var(--muted); line-height: 1.6; }
.field input[type=file] { font-size: .8125rem; max-width: 100%; color: var(--muted); }
.field input[type=file]::file-selector-button { padding: 10px 16px; min-height: 44px; background: transparent; border: 1px solid #bbc2b4; border-radius: var(--radius); color: var(--primary); font: inherit; margin-right: 12px; cursor: pointer; }
.color-field { padding: 0; border: 0; margin: 0; min-width: 0; }
.color-field legend { margin-bottom: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.swatch { width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; outline: 2px solid transparent; outline-offset: 3px; color: var(--primary); }
.swatch svg { opacity: 0; }
.swatch[aria-pressed=true] { outline-color: var(--primary); }
.swatch[aria-pressed=true] svg { opacity: 1; }
.swatch:focus-visible { outline: 3px solid #ac8530; outline-offset: 5px; }
.toggles { border-block: 1px solid var(--line); padding-block: 6px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 58px; font-size: .9375rem; }
.toggle-row small { display: block; color: var(--muted); margin-top: 6px; }
.toggle-row input { appearance: none; width: 44px; height: 26px; border: 1px solid #858e7f; border-radius: 20px; background: #ced4c8; position: relative; flex-shrink: 0; cursor: pointer; }
.toggle-row input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fffef9; border-radius: 50%; }
.toggle-row input:checked { background: var(--primary); border-color: var(--primary); }
.toggle-row input:checked::before { left: 21px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 26px; }
.form-error { color: #8c3024; background: #fbe9df; padding: 12px; font-size: .875rem; line-height: 1.7; margin-top: 14px; border-left: 3px solid #a54c35; }
.image-preview img { width: 100%; max-height: 200px; object-fit: contain; display: block; }
.image-preview .button { margin-top: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 15px 22px; width: max-content; max-width: calc(100% - 32px); background: var(--primary); color: var(--surface); border-radius: var(--radius); font-size: .875rem; line-height: 1.7; z-index: 10; }
.toast.error { background: #8c3024; }
.startup-error, .loading { padding: 60px 24px; max-width: 720px; margin: auto; }
.startup-error p { margin-block: 20px; line-height: 1.8; }
/* Reading surfaces keep full content visible, including attachments. */
.nav-label { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 44px; }
.board-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.route-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #d5ddcf; font-size: .8125rem; font-weight: 700; letter-spacing: .04em; }
.route-kicker::before { content: ''; width: 28px; height: 2px; background: var(--gold); }
.tile-invite { min-height: 40px; padding: 8px 10px; border: 1px solid #b7bdb0; border-radius: var(--radius); color: var(--primary); font-size: .8125rem; font-weight: 600; background: transparent; }
.tile-invite:hover:not(:disabled) { background: #dfe5d6; }
.board-content { padding-bottom: 24px; }
.board-workbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.board-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--primary); font-weight: 700; }
.board-back svg { transform: rotate(180deg); }
.board-workbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.section-heading { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.section-heading h2 { font-size: 1.125rem; }
.content-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.post-card { min-width: 0; min-height: 280px; padding: 24px 30px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.post-card:nth-child(3n) { border-right: 0; }
.post-card::before { content: ''; width: 48px; height: 3px; display: block; background: var(--gold); margin-bottom: 16px; }
.own-post { background: #eaf0e3; }
.post-author { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; margin-bottom: 14px; }
.author-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; min-width: 0; }
.author-name strong { font-size: 1rem; } .author-name small { color: var(--muted); }
.own-badge { font-size: .75rem; padding: 3px 9px; background: #d7e4d1; border-radius: 20px; }
.entry-actions { display: flex; flex-shrink: 0; }
.entry-actions .button { font-size: .75rem; padding-inline: 6px; }
.post-body { font-size: 1rem; line-height: 1.9; white-space: pre-wrap; margin-bottom: 22px; }
.post-lead { font-size: 1.1875rem; font-weight: 600; line-height: 1.65; }
.post-image { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; background: #efeee6; margin-bottom: 22px; }
.post-link { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 12px; min-height: 44px; margin-bottom: 22px; font-size: .875rem; color: var(--primary); }
.post-link span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.post-reactions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; border-top: 1px solid var(--line); margin-top: auto; padding-top: 8px; }
.reaction { padding: 8px 0; min-height: 44px; background: transparent; font-size: .875rem; font-weight: 400; }
.reaction.liked { color: #923c2e; } .reaction.liked svg { fill: #e8b9a9; }
.comments { border-top: 1px solid var(--line); padding-top: 10px; }
.comment { padding-block: 12px; }
.comment-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.comment-heading strong { font-size: .875rem; }
.comment-actions { display: flex; }
.comment p { white-space: pre-wrap; line-height: 1.8; font-size: .9375rem; margin-top: 4px; }
.comment-form { margin-block: 10px; }
.comment-input-row { display: flex; gap: 8px; align-items: start; }
.comment-input-row textarea { resize: vertical; flex: 1; min-width: 0; min-height: 46px; padding: 10px; line-height: 1.6; border: 1px solid #bbc2b4; background: #fffef9; border-radius: var(--radius); font-size: 1rem; }
.settings-danger { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 10px; }
.settings-danger h3 { font-size: 1rem; }
.settings-danger p { color: var(--muted); font-size: .875rem; line-height: 1.7; }
.join-wrap { display: grid; grid-template-columns: minmax(0, 52%) minmax(0, 1fr); margin-block: 32px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.join-intro { padding: 28px 0 28px 40px; border-left: 1px solid var(--line); }
.join-intro::before { content: ''; width: 56px; height: 3px; display: block; background: var(--gold); margin-bottom: 30px; }
.join-intro h2 { font-size: 1.75rem; line-height: 1.5; letter-spacing: -.8px; }
.join-intro p { color: var(--muted); line-height: 1.8; margin-top: 18px; }
.join-card { min-width: 0; padding: 20px 48px 18px 0; }
.join-card h2 { font-size: 1.875rem; letter-spacing: -.8px; margin-bottom: 24px; }
.eyebrow { font-size: .875rem; font-weight: 600; margin-bottom: 20px; }
.join-card .eyebrow::after { content: ''; width: 48px; height: 3px; display: block; background: var(--gold); margin-top: 20px; }
.join-card .field, .join-card .field-help { max-width: 620px; }
.field-help { color: var(--muted); font-size: .875rem; line-height: 1.8; margin-top: 10px; }
.join-card>.primary { margin-top: 24px; min-width: 280px; }
.join-note { font-size: .8125rem; line-height: 1.8; color: var(--muted); margin-top: 20px; max-width: 620px; }
.local-participation { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; color: var(--muted); font-size: .875rem; line-height: 1.8; }
.settings-note { color: var(--muted); font-size: .8125rem; line-height: 1.7; }

.login-wrap { grid-template-columns: minmax(0, 58%) minmax(0, 1fr); }
.login-wrap .join-card { padding-right: 48px; }
.login-wrap .join-intro { padding-left: 40px; }
.journey-steps { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; color: var(--primary); }
.journey-steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; line-height: 1.65; }
.journey-steps li::before { content: counter(step); width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--primary); background: #fcfaf4; font-size: .8125rem; font-weight: 700; }
@media(max-width:1100px) {
  .page-width { width: calc(100% - 64px); }
  .board-grid, .post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .board-tile:nth-child(3n) { border-right: 1px solid var(--line); }
  .board-tile:nth-child(2n), .post-card:nth-child(2n) { border-right: 0; }
  .post-card:nth-child(3n):not(:nth-child(2n)) { border-right: 1px solid var(--line); }
  .join-card { padding-right: 32px; }
  .join-intro { padding-left: 28px; }
  .page-heading:has(.board-header-actions) { flex-wrap: wrap; }
  .dashboard-toolbar { grid-template-columns: auto minmax(180px,1fr) auto; gap: 22px; }
  h1 { font-size: 2.125rem; }
}
@media(max-width:600px) {
  .page-width { width: calc(100% - 40px); }
  .topbar { min-height: 64px; gap: 12px; }
  .topbar:has(.account-controls) { flex-wrap: wrap; padding-block: 12px; }
  .account-controls { flex-wrap: wrap; }
  .account-controls .profile-label { max-width: 150px; }
  .brand { font-size: 1.25rem; }
  .brand-nav { gap: 14px; } .brand-nav nav { padding-left: 14px; }
  .nav-button, .nav-label { font-size: .75rem; }
  .nav-label { max-width: 90px; }
  .profile-label { font-size: .75rem; max-width: 100px; gap: 5px; } .profile-label svg { display: none; }
  h1 { font-size: 2rem; letter-spacing: -1px; }
  .page-heading { min-height: 138px; align-items: start; flex-direction: column; gap: 16px; padding-block: 20px; }
  .description { font-size: .9375rem; margin-top: 12px; }
  .heading-tools { text-align: left; } .hero-note { display: none; }
  .button { padding: 11px 16px; }
  .dashboard-toolbar { padding-block: 20px; grid-template-columns: 1fr auto; gap: 12px; }
  .board-search { grid-row: 2; grid-column: 1 / -1; }
  .board-sort { grid-column: 2; grid-row: 1; }
  .board-sort select { font-size: 16px; padding-right: 18px; }
  .board-grid, .post-grid { grid-template-columns: minmax(0,1fr); }
  .board-tile, .board-tile:nth-child(n) { border-right: 0; min-height: 232px; padding: 22px 14px 12px; }
  h3 { font-size: 1.375rem; }
  .service-footer { flex-wrap: wrap; gap: 8px; align-items: start; }
  .modal form { padding: 24px 20px; }
  .dialog-heading h2 { font-size: 1.5rem; }
  .dialog-heading { gap: 10px; }
  .swatches { gap: 10px; }
  .board-header-actions { justify-content: flex-start; }
  .board-header-actions .primary { min-width: 0; }
  .section-heading { min-height: 72px; align-items: start; flex-direction: column; padding-block: 14px; }
  .board-workbar { align-items: stretch; flex-direction: column; padding-block: 14px; }
  .board-workbar-actions { justify-content: flex-start; }
  .content-toolbar { justify-content: flex-start; }
  .post-card, .post-card:nth-child(n) { border-right: 0; padding: 24px 14px 12px; }
  .post-author { align-items: start; }
  .author-name { gap: 8px; }
  .post-reactions { gap: 18px; }
  .join-wrap { grid-template-columns: 1fr; margin-block: 18px; padding-bottom: 22px; }
  .join-intro { order: 2; padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .join-intro::before { margin-bottom: 18px; }
  .join-intro h2 { font-size: 1.375rem; }
  .join-intro p { font-size: .9375rem; margin-top: 10px; }
  .join-card { order: 1; border-left: 0; border-top: 0; padding: 0 0 20px; }
  .join-card h2 { font-size: 1.5rem; margin-bottom: 18px; }
  .join-card>.primary { width: 100%; min-width: 0; }
  .toggle-row { gap: 10px; }

  .login-wrap { grid-template-columns: 1fr; }
  .login-wrap .join-card { padding-right: 0; }
  .login-wrap .join-intro { padding-left: 0; }
  .toggle-row small { font-size: .75rem; }

}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
