:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-soft: #fbfaf8;
  --ink: #252a30;
  --muted: #777b80;
  --faint: #a3a5a7;
  --line: #e9e7e2;
  --line-strong: #dfddd7;
  --accent: #3877a9;
  --accent-hover: #28658f;
  --accent-soft: #edf4f8;
  --green: #397a62;
  --green-soft: #edf5f0;
  --amber: #a77637;
  --amber-soft: #faf3e8;
  --red: #ae5951;
  --red-soft: #faf0ee;
  --shadow: 0 2px 8px rgba(40, 43, 45, .035), 0 1px 2px rgba(40, 43, 45, .025);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(56, 119, 169, .25); outline-offset: 2px; }
.shell { width: 100%; margin: 0; padding: 0 16px; }

.topbar { display: flex; align-items: center; justify-content: space-between; height: 78px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 11px; background: #273d4d; color: white; font-size: 21px; font-weight: 600; letter-spacing: -1px; }
.brand strong { display: block; font-size: 16px; line-height: 1.1; font-weight: 650; letter-spacing: -.35px; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.topbar-right { display: flex; gap: 14px; align-items: center; }
.workspace-status { display: inline-flex; align-items: center; gap: 8px; color: #656b6f; font-size: 12px; }
.workspace-status i { width: 7px; height: 7px; border-radius: 50%; background: #5a9c7d; box-shadow: 0 0 0 3px #e7f1eb; }
.avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #e5edf1; color: #46687e; font-size: 12px; font-weight: 700; }
.avatar-you { background: #e4ece7; color: #4b705e; }
.sign-out { padding: 5px 7px; border: 0; border-radius: 5px; background: transparent; color: #858a8c; cursor: pointer; font-size: 10px; }
.sign-out:hover { background: #efeeea; color: #4d5659; }

.tabs { display: flex; gap: 28px; height: 60px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; position: relative; gap: 9px; align-items: center; padding: 0 2px; border: 0; background: none; color: #777d80; cursor: pointer; font-size: 13px; font-weight: 500; }
.tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.tab.active { color: #2c536d; font-weight: 650; }
.tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); content: ""; }

main { min-height: calc(100vh - 174px); }
.view { display: none; padding: 34px 0 56px; }
.view.active { display: block; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 9px; color: #85898b; font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
h1 { margin: 0; font-size: clamp(25px, 3vw, 31px); font-weight: 580; letter-spacing: -1.1px; line-height: 1.18; }
.heading-copy { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: #345f79; color: #fff; }
.button-primary:hover { background: #274c63; }
.button-secondary { border-color: var(--line-strong); background: rgba(255,255,255,.75); color: #475158; }
.button-secondary:hover { border-color: #c7d4dc; background: #fff; }
.button-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.button-quiet:hover { background: var(--bg); color: var(--ink); }
.button-plus { font-size: 18px; font-weight: 400; line-height: .7; }
.icon-button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #858a8e; cursor: pointer; font-size: 21px; line-height: 1; }
.icon-button:hover { background: var(--bg); color: var(--ink); }

.summary-strip { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-bottom: 17px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.55); color: #72777a; font-size: 11px; }
.summary-strip strong { color: #3d4d56; font-size: 13px; font-weight: 650; }
.summary-separator { width: 1px; height: 15px; margin: 0 4px; background: var(--line-strong); }
.summary-icon { color: #6285a0; font-size: 14px; }
.board-wrap { overflow-x: auto; padding-bottom: 5px; scrollbar-color: #d8d6d0 transparent; scrollbar-width: thin; }
.board { display: grid; grid-auto-columns: minmax(255px, 1fr); grid-auto-flow: column; gap: 15px; min-height: 248px; }
.member-column { display: flex; flex-direction: column; min-width: 255px; min-height: 252px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #f2f1ed; }
.column-head { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 13px; border-bottom: 1px solid #e6e4de; }
.member-avatar { display: grid; flex: 0 0 auto; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(60,90,100,.08); border-radius: 50%; background: #e4ece8; color: #547262; font-size: 10px; font-weight: 700; }
.member-avatar.tone-1 { background: #e6eaf1; color: #5a6b85; }
.member-avatar.tone-2 { background: #f0e8de; color: #876c50; }
.member-avatar.tone-3 { background: #ece4ee; color: #795e80; }
.member-meta { flex: 1; min-width: 0; }
.member-name { overflow: hidden; color: #343a3d; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.member-count { margin-top: 3px; color: #888c8d; font-size: 10px; }
.column-head .icon-button { width: 28px; height: 28px; font-size: 17px; }
.column-body { display: flex; flex: 1; flex-direction: column; gap: 9px; padding: 10px; }
.task-card { padding: 12px 12px 10px; border: 1px solid #e7e5df; border-radius: 8px; background: #fff; box-shadow: var(--shadow); cursor: grab; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.task-card:hover { border-color: #d7e0e4; box-shadow: 0 4px 14px rgba(40, 43, 45, .06); transform: translateY(-1px); }
.task-card.dragging { opacity: .45; }
.task-card h3 { margin: 9px 0 5px; color: #303639; font-size: 12px; font-weight: 620; line-height: 1.45; }
.task-description { display: -webkit-box; overflow: hidden; margin: 0; color: #777d80; font-size: 11px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.task-label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.priority { display: inline-flex; align-items: center; gap: 5px; color: #7b8081; font-size: 9px; font-weight: 650; letter-spacing: .15px; text-transform: uppercase; }
.priority::before { width: 6px; height: 6px; border-radius: 50%; background: #a9b0ad; content: ""; }
.priority.high { color: var(--red); }
.priority.high::before { background: #c5796f; }
.priority.low { color: #70877b; }
.priority.low::before { background: #7ea48d; }
.task-date { color: #858a8c; font-size: 10px; }
.task-date.overdue { color: var(--red); }
.task-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; padding-top: 8px; border-top: 1px solid #f0efeb; }
.task-created { color: #a1a3a2; font-size: 9px; }
.done-button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 5px; border: 0; border-radius: 4px; background: transparent; color: #62806d; cursor: pointer; font-size: 10px; font-weight: 600; }
.done-button:hover { background: var(--green-soft); color: #32654c; }
.done-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.column-add { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 36px; padding: 0 10px; border: 1px dashed #d4d2cb; border-radius: 7px; background: transparent; color: #7d8283; cursor: pointer; font-size: 11px; text-align: left; }
.column-add:hover { border-color: #9eb7c5; background: rgba(255,255,255,.56); color: #416982; }
.column-add span { font-size: 17px; font-weight: 300; }
.drop-active { outline: 2px dashed #8aafc4; outline-offset: -5px; background: #eaf1f3; }
.empty-column { display: grid; flex: 1; min-height: 93px; place-items: center; color: #a0a19d; font-size: 10px; }
.empty-board { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 255px; padding: 32px; border: 1px dashed #d7d4cc; border-radius: 10px; background: rgba(255,255,255,.42); text-align: center; }
.empty-board-mark { display: grid; width: 42px; height: 42px; margin-bottom: 13px; place-items: center; border-radius: 13px; background: #edf1ee; color: #66836f; font-size: 21px; }
.empty-board h2 { margin: 0; font-size: 15px; font-weight: 620; }
.empty-board p { max-width: 330px; margin: 7px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.completed-section { margin-top: 22px; border-top: 1px solid var(--line); }
.completed-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 2px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.completed-check { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid #cbd8ce; border-radius: 50%; color: var(--green); font-size: 12px; }
.completed-toggle strong { display: block; color: #555d5d; font-size: 11px; font-weight: 620; }
.completed-toggle small { display: block; margin-top: 3px; color: #979a99; font-size: 10px; }
.completed-count { display: grid; min-width: 22px; height: 21px; margin-left: auto; place-items: center; border-radius: 12px; background: #e9eee9; color: #617566; font-size: 10px; font-weight: 650; }
.chevron { margin-left: 3px; color: #969a99; font-size: 15px; transition: transform .15s ease; }
.completed-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.completed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; padding: 0 0 14px 33px; }
.completed-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.55); }
.completed-item strong { display: block; color: #707573; font-size: 11px; font-weight: 550; }
.completed-item small { display: block; margin-top: 4px; color: #989b98; font-size: 9px; }
.reopen-button { flex: 0 0 auto; padding: 4px 6px; border: 1px solid #d8e3db; border-radius: 5px; background: #f6faf7; color: #55715e; cursor: pointer; font-size: 9px; }
.reopen-button:hover { background: #e9f2eb; }
.hidden { display: none !important; }

.minutes-heading { margin-bottom: 26px; }
.minutes-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); min-height: 505px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.minutes-sidebar { border-right: 1px solid var(--line); background: #fcfbf9; }
.sidebar-title { display: flex; justify-content: space-between; align-items: center; padding: 16px 17px 13px; color: #868b8b; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.sidebar-title span:last-child { display: grid; min-width: 19px; height: 19px; place-items: center; border-radius: 10px; background: #eeede9; color: #777d7d; font-size: 9px; letter-spacing: 0; }
.minutes-list { padding: 0 8px 12px; }
.minutes-list-empty { margin: 8px; padding: 16px 12px; border: 1px dashed #ddd9d1; border-radius: 7px; color: #898d8b; font-size: 11px; line-height: 1.5; text-align: center; }
.minutes-list-item { display: block; width: 100%; margin: 3px 0; padding: 11px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; }
.minutes-list-item:hover { background: #f4f3f0; }
.minutes-list-item.selected { border-color: #e1e8e8; background: #eef3f3; }
.minutes-list-item strong { display: block; overflow: hidden; color: #454b4c; font-size: 11px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.minutes-list-item small { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; color: #929796; font-size: 9px; }
.minutes-list-item .file-count { white-space: nowrap; }
.minutes-detail { min-width: 0; padding: 30px 34px; }
.minutes-detail-empty { display: grid; min-height: 440px; place-items: center; color: #8a8e8d; text-align: center; }
.minutes-detail-empty-inner { max-width: 310px; }
.minutes-detail-empty .empty-board-mark { margin: 0 auto 13px; }
.minutes-detail-empty h2 { margin: 0; color: #414748; font-size: 15px; font-weight: 600; }
.minutes-detail-empty p { color: #888d8c; font-size: 12px; line-height: 1.6; }
.minutes-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.minutes-date-label { margin: 0 0 7px; color: #768a91; font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.minutes-detail-head h2 { margin: 0; font-size: 22px; font-weight: 580; letter-spacing: -.6px; }
.minutes-actions { display: flex; gap: 5px; }
.minutes-actions .icon-button { font-size: 14px; }
.minutes-meta { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 17px 0 19px; border-bottom: 1px solid var(--line); }
.minutes-meta-label { display: block; margin-bottom: 5px; color: #969a99; font-size: 9px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.minutes-meta-value { color: #555c5e; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.minutes-section { padding-top: 19px; }
.minutes-section h3 { margin: 0 0 8px; color: #464c4e; font-size: 11px; font-weight: 650; }
.minutes-section p { margin: 0; color: #656c6d; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.minutes-section .md { color: #656c6d; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.minutes-section .md-h { margin: 14px 0 6px; color: #464c4e; font-size: 13px; font-weight: 650; }
.minutes-section .md-h:first-child { margin-top: 0; }
.minutes-section .md-li { padding-left: 14px; text-indent: -14px; }
.minutes-section .md-li::before { content: "• "; color: #9aa5a8; }
.minutes-section .md strong { color: #3d4648; font-weight: 650; }
.attachments-section { margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--line); }
.attachments-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.attachments-title h3 { margin: 0; color: #555d5e; font-size: 11px; font-weight: 650; }
.attach-link { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 5px; color: #527b95; cursor: pointer; font-size: 10px; font-weight: 600; }
.attach-link:hover { background: #eff4f5; }
.attach-link input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.file-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 8px; }
.file-card { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.file-icon { display: grid; flex: 0 0 auto; width: 29px; height: 32px; place-items: center; border-radius: 5px; background: #f1f4f5; color: #628196; font-size: 8px; font-weight: 700; }
.file-copy { flex: 1; min-width: 0; }
.file-copy a { display: block; overflow: hidden; color: #4e6878; font-size: 10px; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.file-copy a:hover { text-decoration: underline; }
.file-copy small { display: block; margin-top: 4px; color: #969a99; font-size: 9px; }
.file-remove { padding: 4px; border: 0; background: transparent; color: #9c9f9d; cursor: pointer; font-size: 14px; }
.file-remove:hover { color: var(--red); }
.upload-hint { margin-top: 9px; color: #9a9d9c; font-size: 9px; }

.footer { display: flex; justify-content: space-between; padding: 17px 0 21px; border-top: 1px solid var(--line); color: #9a9c99; font-size: 9px; letter-spacing: .15px; }
.dialog { width: min(500px, calc(100vw - 30px)); max-height: min(88vh, 850px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 22px 70px rgba(30, 37, 40, .20); }
.dialog::backdrop { background: rgba(34, 42, 47, .36); backdrop-filter: blur(2px); }
.dialog form { padding: 24px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 23px; }
.dialog-head .eyebrow { margin-bottom: 6px; }
.dialog-head h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.45px; }
.field-label { display: block; margin: 16px 0 7px; color: #5e6567; font-size: 11px; font-weight: 620; }
.field-label span { margin-left: 4px; color: #9a9e9d; font-size: 10px; font-weight: 400; }
.text-input { display: block; width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; }
.text-input::placeholder { color: #b1b3b1; }
.text-input:focus { border-color: #9fb8c7; outline: 3px solid rgba(56, 119, 169, .10); }
.textarea { min-height: 78px; resize: vertical; line-height: 1.55; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-wide { grid-column: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 15px; border-top: 1px solid var(--line); }
.file-input { display: block; width: 100%; color: #737a7c; font-size: 10px; }
.file-input::file-selector-button { margin-right: 10px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #faf9f7; color: #56636a; cursor: pointer; font-size: 10px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; max-width: min(380px, calc(100vw - 36px)); padding: 11px 15px; border: 1px solid #dbe6dd; border-radius: 8px; background: #f4faf5; color: #426651; box-shadow: 0 7px 24px rgba(35,50,42,.12); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #ead6d2; background: #fff7f5; color: #984f47; }
.auth-screen { position: fixed; inset: 0; z-index: 10; display: grid; padding: 20px; place-items: center; background: rgba(247,246,243,.97); }
.auth-screen[hidden] { display: none; }
.auth-card { width: min(390px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 14px 44px rgba(34,42,46,.08); }
.auth-mark { margin-bottom: 24px; }
.auth-card h1 { font-size: 23px; letter-spacing: -.7px; }
.auth-copy { margin: 9px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-card .field-label { margin-top: 14px; }
.auth-error { min-height: 17px; margin: 8px 0 0; color: var(--red); font-size: 11px; }
.auth-submit { width: 100%; margin-top: 5px; }
.pin-input { text-align: center; font-size: 22px; letter-spacing: 12px; padding-left: 22px; }

@media (min-width: 1100px) {
  .board { grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
}
@media (max-width: 850px) {
  .shell { padding: 0 12px; }
  .board { grid-auto-columns: minmax(270px, 1fr); }
  .minutes-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .minutes-detail { padding: 25px 23px; }
}
@media (max-width: 620px) {
  .shell { padding: 0 8px; }
  .topbar { height: 67px; }
  .workspace-status { display: none; }
  .tabs { gap: 22px; height: 54px; }
  .view { padding-top: 26px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .page-heading > .button { align-self: flex-start; }
  .board { grid-auto-columns: minmax(265px, 84vw); }
  .minutes-layout { display: flex; flex-direction: column; }
  .minutes-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .minutes-list { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 9px; }
  .minutes-list-item { flex: 0 0 195px; }
  .minutes-list-empty { min-width: 210px; margin: 0; }
  .minutes-detail { min-height: 340px; padding: 22px 18px; }
  .minutes-detail-empty { min-height: 285px; }
  .minutes-detail-head h2 { font-size: 19px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer { font-size: 8px; }
}
