:root {
  font-family: "Zen Maru Gothic", system-ui, sans-serif;
  color: #233035;
  background: #f8f7f2;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; min-height: 100vh; }
button, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { max-width: 1440px; min-height: 100vh; margin: 0 auto; padding: 22px clamp(20px, 5vw, 72px) 48px; }
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d9ded9; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; font-size: 18px; letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.brand-mark { color: #f1c84c; font-size: 28px; line-height: 1; transform: rotate(8deg); }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.add-control { position: relative; }
.note-count, .eyebrow, .drag-label { font-family: "DM Mono", monospace; letter-spacing: .08em; }
.note-count { margin: 0; color: #798281; font-size: 11px; }
.add-button { min-height: 46px; border: 0; border-radius: 8px; padding: 0 18px; color: #fff; background: #263d42; font-weight: 700; box-shadow: 0 4px 0 #17272a; transition: transform .15s, box-shadow .15s; }
.add-button span { font-size: 20px; vertical-align: -1px; }
.add-button:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #17272a; }
.add-button:active { transform: translateY(3px); box-shadow: 0 1px 0 #17272a; }
.create-color-menu { position: absolute; z-index: 20; top: calc(100% + 12px); right: 0; display: none; width: 210px; padding: 12px; border: 1px solid #d7ded7; border-radius: 10px; background: #fffefa; box-shadow: 0 14px 28px rgba(34, 48, 45, .16); }
.create-color-menu.is-open { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.create-color-menu p { grid-column: 1 / -1; margin: 0 0 2px; color: #73807b; font-size: 11px; font-weight: 700; }
.create-color-menu button { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 7px; border: 1px solid transparent; border-radius: 6px; color: #33403e; background: #f4f5ef; font-size: 11px; font-weight: 700; }
.create-color-menu button:hover { border-color: #aab8ae; background: #fff; }
.color-dot, .color-choice { display: inline-block; border-radius: 50%; }
.color-dot { width: 13px; height: 13px; border: 1px solid rgba(51, 64, 62, .16); }
.yellow { background: #fff29c; }.pink { background: #ffc0bf; }.blue { background: #abdce0; }.green { background: #cce6ac; }
.project-bar { display: flex; align-items: center; gap: 8px; padding-top: 18px; }.project-bar label { color: #718078; font-size: 11px; font-weight: 700; }.project-bar select { min-width: 150px; min-height: 36px; padding: 0 28px 0 10px; border: 1px solid #d5dcd6; border-radius: 7px; color: #29403e; background: #fff; font-weight: 700; }.project-bar button { min-height: 32px; padding: 0 9px; border: 1px solid #d5dcd6; border-radius: 6px; color: #53615b; background: #fff; font-size: 11px; font-weight: 700; }.project-bar button:disabled { cursor: not-allowed; opacity: .4; }

.tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; padding-top: 15px; }
.search-field { display: flex; align-items: center; gap: 7px; width: min(275px, 45%); min-height: 38px; padding: 0 11px; border: 1px solid #d9ded9; border-radius: 8px; background: #fff; color: #789; }
.search-field span { font-size: 21px; line-height: 1; transform: rotate(-18deg); }
.search-field input { width: 100%; border: 0; outline: 0; color: #263d42; background: transparent; font-size: 13px; }
.search-field input::placeholder { color: #98a29e; }
.filter-group { display: flex; align-items: center; gap: 7px; }
.filter-label { margin-right: 2px; color: #72807a; font-size: 11px; font-weight: 700; }
.filter-color { width: 24px; height: 24px; padding: 0; border: 1px solid rgba(49, 64, 57, .25); border-radius: 50%; transition: opacity .15s, transform .15s; }
.filter-color[aria-pressed="false"] { opacity: .27; transform: scale(.82); }
.show-all { min-height: 28px; padding: 0 9px; border: 1px solid #d3dad5; border-radius: 5px; color: #53615b; background: #fff; font-size: 11px; font-weight: 700; }
.status-group { display: flex; gap: 4px; margin-left: auto; }.status-group button { min-height: 30px; padding: 0 10px; border: 1px solid #d4dbd5; border-radius: 6px; color: #627069; background: #fff; font-size: 11px; font-weight: 700; }.status-group button[aria-pressed="true"] { border-color: #334b47; color: #fff; background: #334b47; }

.board-panel { position: relative; margin-top: 32px; }
.board-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 8px; color: #d29823; font-size: 11px; font-weight: 500; }
h1 { margin: 0; font-size: clamp(31px, 4.2vw, 56px); line-height: 1.25; letter-spacing: -.06em; }
.board-help { margin: 0 6px 5px 0; color: #7e8784; font-size: 13px; line-height: 1.7; text-align: right; }
.board-actions { display: flex; align-items: end; gap: 12px; }.align-button { min-height: 34px; padding: 0 10px; border: 1px solid #cdd8d0; border-radius: 6px; color: #40524d; background: #fff; font-size: 12px; font-weight: 700; }
.board { position: relative; overflow: hidden; min-height: 620px; border: 1px solid #d8dcd5; border-radius: 18px; background-color: #e8ece5; background-image: radial-gradient(#bec7bd 1px, transparent 1px); background-size: 20px 20px; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 16px 35px rgba(37, 57, 57, .08); }
.empty-state { position: absolute; z-index: 0; top: 51%; left: 50%; width: min(270px, 80%); margin: 0; color: #82908a; font-size: 14px; line-height: 1.8; text-align: center; transform: translate(-50%, -50%); }
.board:not(:empty) + .empty-state { display: none; }
.completed-zone { margin-top: 26px; padding: 18px; border: 2px dashed #b7c8ba; border-radius: 14px; background: #eff4ec; transition: border-color .15s, background .15s, transform .15s; }.completed-zone.is-drop-target { border-color: #527a61; background: #dfecda; transform: scale(1.01); }.completed-heading { display: flex; align-items: center; gap: 10px; }.completed-heading > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #fff; background: #527a61; font-weight: 700; }.completed-heading h2 { margin: 0; color: #3d5946; font-size: 16px; }.completed-heading p { margin: 2px 0 0; color: #708274; font-size: 11px; }.completed-list { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }.completed-list .note { position: relative; width: 190px; height: 158px; left: auto !important; top: auto !important; transform: rotate(var(--tilt, -1deg)); }.completed-list .note-handle { cursor: default; }.completed-zone.is-empty .completed-list::after { content: "まだ完了した付箋はありません"; color: #8a9a8d; font-size: 12px; }
.project-dialog { width: min(390px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px; color: #2a3c39; box-shadow: 0 22px 60px rgba(28, 42, 37, .28); }.project-dialog::backdrop { background: rgba(27, 39, 36, .36); }.project-dialog form { padding: 24px; }.dialog-title { margin: 0; font-size: 18px; font-weight: 700; }.dialog-message { margin: 8px 0 18px; color: #697871; font-size: 13px; line-height: 1.6; }.dialog-input { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid #cbd6cd; border-radius: 7px; outline-color: #426454; font-size: 15px; }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }.dialog-actions button { min-height: 38px; padding: 0 14px; border: 1px solid #ccd6ce; border-radius: 7px; color: #53615b; background: #fff; font-weight: 700; }.dialog-actions #project-submit { border-color: #304a43; color: #fff; background: #304a43; }.dialog-actions #project-submit.danger { border-color: #a64f4f; background: #a64f4f; }
.settings-content { padding: 24px; }.settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }.settings-heading .dialog-message { margin-bottom: 20px; }.dialog-close { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; color: #5b6b65; background: #edf1ed; font-size: 21px; line-height: 1; }.theme-switch { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 14px; border: 1px solid #d7e0d8; border-radius: 10px; cursor: pointer; }.theme-switch strong, .theme-switch small { display: block; }.theme-switch strong { color: #31423d; font-size: 14px; }.theme-switch small { margin-top: 3px; color: #728078; font-size: 11px; }.theme-switch input { position: absolute; opacity: 0; }.switch-track { display: flex; align-items: center; width: 48px; height: 28px; padding: 3px; border-radius: 99px; background: #b9c5bd; transition: background .2s; }.switch-track span { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.24); transition: transform .2s; }.theme-switch input:checked + .switch-track { background: #466d60; }.theme-switch input:checked + .switch-track span { transform: translateX(20px); }.theme-switch input:focus-visible + .switch-track { outline: 3px solid #9bc4d3; outline-offset: 3px; }

.note { position: absolute; z-index: 1; display: flex; flex-direction: column; width: 224px; height: 196px; padding: 15px 16px 14px; border: 1px solid rgba(76, 80, 53, .08); border-radius: 2px 3px 9px 3px; background: #fff29c; box-shadow: 2px 3px 1px rgba(49, 65, 60, .09), 7px 11px 13px rgba(38, 51, 45, .17), 13px 19px 27px rgba(38, 51, 45, .08); transform: rotate(var(--tilt, -1deg)); transition: box-shadow .16s, transform .16s; touch-action: none; }
.note[data-color="yellow"] { background: #fff29c; }.note[data-color="pink"] { background: #ffc0bf; }.note[data-color="blue"] { background: #abdce0; }.note[data-color="green"] { background: #cce6ac; }
.note.is-complete { filter: saturate(.55); opacity: .68; }
.note.is-complete .note-content { color: #69746e; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.note:hover, .note:focus-within { z-index: 4; box-shadow: 3px 4px 1px rgba(49, 65, 60, .1), 9px 14px 16px rgba(38, 51, 45, .19), 15px 22px 30px rgba(38, 51, 45, .1); }
.note.is-dragging { z-index: 10; transition: none; transform: rotate(0deg) scale(1.03); cursor: grabbing; }
.note-handle { display: flex; align-items: center; justify-content: space-between; height: 24px; margin: -5px -4px 7px; color: #63706b; cursor: grab; user-select: none; }
.grip { font-size: 18px; letter-spacing: -4px; transform: rotate(90deg); }
.drag-label { font-size: 9px; }
.note-content { width: 100%; min-height: 94px; flex: 1; resize: none; border: 0; outline: 0; color: #273538; background: transparent; font-family: "Yomogi", "Hiragino Maru Gothic ProN", cursive; font-size: 19px; font-weight: 400; line-height: 1.45; letter-spacing: .04em; }
.note-content::placeholder { color: rgba(50, 65, 58, .52); }
.note-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; }
.complete-note { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 26px; padding: 0 6px; border: 1px solid rgba(49, 64, 57, .3); border-radius: 5px; color: #415149; background: rgba(255,255,255,.36); font-size: 10px; font-weight: 700; white-space: nowrap; }
.complete-note span { display: grid; width: 13px; height: 13px; place-items: center; border: 1px solid currentColor; border-radius: 3px; font-size: 10px; line-height: 1; color: transparent; }
.complete-note[aria-pressed="true"] { color: #fff; background: #47695a; }
.complete-note[aria-pressed="true"] span { color: #47695a; background: #fff; }
.note-colors { display: flex; gap: 4px; }
.color-choice { width: 20px; height: 20px; padding: 0; border: 1px solid rgba(49, 64, 57, .25); box-shadow: none; }
.color-choice[aria-pressed="true"] { border: 2px solid #31413d; box-shadow: 0 0 0 2px rgba(255,255,255,.65); }
.delete-note { position: absolute; top: 10px; right: 10px; display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 50%; color: #5d6963; background: rgba(255,255,255,.43); font-size: 20px; line-height: 1; opacity: 0; transition: opacity .15s, background .15s; }
.note:hover .delete-note, .note:focus-within .delete-note { opacity: 1; }
.delete-note:hover { color: #fff; background: #d16262; }

html[data-theme="dark"] { color: #e6eee9; background: #182321; }
html[data-theme="dark"] body { background: #182321; }
html[data-theme="dark"] .topbar { border-color: #3d504b; }
html[data-theme="dark"] .brand, html[data-theme="dark"] h1 { color: #f2f6f3; }
html[data-theme="dark"] .note-count, html[data-theme="dark"] .project-bar label, html[data-theme="dark"] .filter-label, html[data-theme="dark"] .board-help { color: #aabbb3; }
html[data-theme="dark"] .add-button { background: #426a62; box-shadow: 0 4px 0 #0d1715; }
html[data-theme="dark"] .add-button:hover { box-shadow: 0 6px 0 #0d1715; }
html[data-theme="dark"] .create-color-menu, html[data-theme="dark"] .project-bar select, html[data-theme="dark"] .project-bar button, html[data-theme="dark"] .search-field, html[data-theme="dark"] .show-all, html[data-theme="dark"] .status-group button, html[data-theme="dark"] .align-button { border-color: #42564f; color: #dce7e0; background: #263530; }
html[data-theme="dark"] .create-color-menu button { color: #dce7e0; background: #31433d; }
html[data-theme="dark"] .create-color-menu button:hover { border-color: #668076; background: #3a4e47; }
html[data-theme="dark"] .search-field input { color: #f0f6f2; }
html[data-theme="dark"] .search-field input::placeholder { color: #91a29a; }
html[data-theme="dark"] .status-group button[aria-pressed="true"] { border-color: #8ab3a1; background: #557d70; }
html[data-theme="dark"] .board { border-color: #3d504a; background-color: #25342f; background-image: radial-gradient(#4a6158 1px, transparent 1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 16px 35px rgba(0,0,0,.24); }
html[data-theme="dark"] .empty-state { color: #afc0b7; }
html[data-theme="dark"] .completed-zone { border-color: #587264; background: #273b34; }
html[data-theme="dark"] .completed-zone.is-drop-target { border-color: #9bc8a7; background: #314c3d; }
html[data-theme="dark"] .completed-heading h2 { color: #d7e8dc; }
html[data-theme="dark"] .completed-heading p, html[data-theme="dark"] .completed-zone.is-empty .completed-list::after { color: #a4bbab; }
html[data-theme="dark"] .project-dialog { color: #e6eee9; background: #263530; }
html[data-theme="dark"] .dialog-message, html[data-theme="dark"] .theme-switch small { color: #afc0b7; }
html[data-theme="dark"] .dialog-input { border-color: #50665d; color: #eff6f1; background: #1c2824; }
html[data-theme="dark"] .dialog-actions button { border-color: #50665d; color: #dce8e0; background: #31433d; }
html[data-theme="dark"] .dialog-close { color: #dce8e0; background: #34483f; }
html[data-theme="dark"] .theme-switch { border-color: #4d655a; background: #21302b; }
html[data-theme="dark"] .theme-switch strong { color: #edf5f0; }

@media (max-width: 767px) {
  .app-shell { padding: 12px 14px 28px; }
  .topbar { min-height: 62px; gap: 8px; }
  .brand { font-size: 15px; }
  .brand-mark { font-size: 23px; }
  .topbar-actions { gap: 10px; }
  .note-count { display: none; }
  .add-button { min-height: 48px; padding: 0 13px; font-size: 14px; }
  .board-panel { margin-top: 34px; }
  .project-bar { flex-wrap: wrap; padding-top: 14px; }.project-bar select { flex: 1; min-width: 0; }
  .tools { align-items: stretch; flex-direction: column; gap: 10px; padding-top: 14px; }
  .search-field { width: 100%; min-height: 42px; }
  .filter-group { justify-content: space-between; }
  .filter-label { margin-right: auto; }
  .status-group { margin-left: 0; }
  .board-heading { margin-bottom: 15px; align-items: end; }
  .board-help { font-size: 11px; }
  .board-actions { gap: 6px; }.align-button { min-height: 38px; }
  .board { min-height: 600px; border-radius: 14px; }
  .note { width: 184px; height: 176px; padding: 14px; }
  .note-content { min-height: 76px; font-size: 18px; }
  .color-choice { width: 27px; height: 27px; }
  .complete-note { min-height: 30px; }
  .note-colors { gap: 3px; }
  .color-choice { width: 22px; height: 22px; }
  .delete-note { width: 36px; height: 36px; top: 5px; right: 5px; opacity: 1; }
  .completed-zone { padding: 14px; }.completed-list { gap: 12px; }.completed-list .note { width: 100%; height: 160px; }
}
