:root {
  font-family: "DM Sans", "Noto Sans JP", sans-serif;
  color: #292d28;
  background: #f4f1e9;
  font-synthesis: none;
  --header-height: 112px;
  --project-bar-height: 68px;
  --board-gap: 18px;
  --note-width: 224px;
  --note-height: 206px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-width: 320px; min-height: 100%; }

body { overflow: hidden; }

button, textarea { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-header {
  height: var(--header-height);
  padding: 24px clamp(24px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(48, 54, 45, .1);
  background: rgba(244, 241, 233, .94);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 43px; height: 43px; border-radius: 12px; display: grid; place-items: center; background: #26372d; box-shadow: 0 5px 14px rgba(30, 45, 34, .18); }
.brand-mark span { width: 17px; height: 21px; background: #f3ca68; border-radius: 2px; transform: rotate(-5deg); box-shadow: 4px 4px 0 #d9aee3; }
.brand h1 { margin: 0; font-size: 24px; line-height: 1; letter-spacing: -.04em; }
.brand p { margin: 8px 0 0; color: #777b73; font-size: 12px; letter-spacing: .05em; }

.status-tabs { display: flex; align-items: center; padding: 4px; border: 1px solid rgba(48, 54, 45, .11); border-radius: 12px; background: rgba(228, 226, 217, .75); white-space: nowrap; }
.status-tabs button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 9px; color: #747870; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
.status-tabs button.selected { color: #304d3b; background: #fffef9; box-shadow: 0 2px 7px rgba(42, 47, 40, .11); }

.search-control { position: relative; flex: 1 1 360px; max-width: 430px; min-width: 210px; }
.search-icon { position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; border: 1.8px solid #777c74; border-radius: 50%; transform: translateY(-58%); pointer-events: none; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 7px; height: 1.8px; border-radius: 2px; background: #777c74; transform: rotate(45deg); }
#note-search { width: 100%; height: 46px; padding: 0 96px 0 43px; border: 1px solid rgba(48, 54, 45, .13); border-radius: 13px; outline: 0; color: #333831; background: rgba(255, 254, 249, .78); font-family: "Noto Sans JP", sans-serif; font-size: 14px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
#note-search::placeholder { color: #969a92; }
#note-search:focus { border-color: rgba(48, 77, 59, .45); background: #fffef9; box-shadow: 0 0 0 3px rgba(48, 77, 59, .1); }
#note-search::-webkit-search-cancel-button { margin-right: -78px; }
.search-count { position: absolute; right: 13px; top: 50%; padding-left: 8px; border-left: 1px solid rgba(54, 59, 52, .12); transform: translateY(-50%); color: #666b63; font-size: 11px; font-weight: 600; white-space: nowrap; }
.search-count[hidden] { display: none; }

.header-actions { display: flex; align-items: center; gap: 24px; }
.theme-button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(48, 54, 45, .13); border-radius: 12px; color: #4d554d; background: #fffdf7; font-size: 21px; cursor: pointer; box-shadow: 0 2px 7px rgba(46,49,43,.07); transition: transform .16s ease, background .16s ease; }
.theme-button:hover { background: #f1efe8; transform: translateY(-1px); }
.add-control { position: relative; }
.save-status { margin: 0; color: #747970; font-size: 12px; white-space: nowrap; }
.save-status span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #74a47f; }
.save-status.saving span { animation: pulse .6s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }

.add-button, .empty-add-button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: #304d3b;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(32, 58, 41, .16);
  transition: transform .16s ease, background .16s ease;
}
.add-button { padding: 0 20px; }
.add-button span { margin-right: 6px; font-size: 20px; font-weight: 400; }
.add-button:hover, .empty-add-button:hover { background: #253e30; transform: translateY(-1px); }
.add-button:active, .empty-add-button:active { transform: translateY(1px); }
.new-note-colors {
  position: absolute;
  z-index: 2000;
  right: 0;
  top: calc(100% + 10px);
  width: 210px;
  padding: 14px;
  border: 1px solid rgba(51, 56, 49, .1);
  border-radius: 15px;
  background: #fffdf7;
  box-shadow: 0 14px 34px rgba(40, 35, 27, .2);
}
.new-note-colors[hidden] { display: none; }
.new-note-colors::before { content: ""; position: absolute; right: 25px; top: -6px; width: 12px; height: 12px; background: #fffdf7; transform: rotate(45deg); }
.new-note-colors p { margin: 0 0 11px; color: #5e625b; font-size: 12px; font-weight: 600; }
.color-options { display: flex; justify-content: space-between; gap: 8px; }
.color-option { width: 36px; height: 36px; padding: 0; border: 2px solid rgba(255,255,255,.85); border-radius: 9px; cursor: pointer; box-shadow: 0 0 0 1px rgba(50, 45, 35, .12), 0 3px 7px rgba(50, 45, 35, .12); transition: transform .15s ease; }
.color-option:hover { transform: translateY(-2px); }
.yellow { background-color: #f8df87; }
.pink { background-color: #f2b8c3; }
.blue { background-color: #b9d9e8; }
.green { background-color: #bad9bd; }

.project-bar { height: var(--project-bar-height); padding: 10px clamp(24px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(48, 54, 45, .1); background: #ebe8df; }
.project-switcher { position: relative; }
.project-button { min-width: 220px; height: 48px; padding: 0 13px; display: flex; align-items: center; gap: 11px; border: 1px solid rgba(48, 54, 45, .12); border-radius: 12px; color: #333831; background: #fffdf7; cursor: pointer; box-shadow: 0 2px 7px rgba(46, 49, 43, .07); text-align: left; }
.project-button > span:nth-child(2) { min-width: 0; flex: 1; }
.project-button small, .project-button strong { display: block; }
.project-button small { margin-bottom: 2px; color: #858981; font-size: 9px; font-weight: 600; letter-spacing: .08em; }
.project-button strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-folder { position: relative; width: 20px; height: 15px; flex: 0 0 auto; border-radius: 3px; background: #d7ad50; }
.project-folder::before { content: ""; position: absolute; left: 2px; top: -4px; width: 9px; height: 5px; border-radius: 2px 2px 0 0; background: #d7ad50; }
.project-chevron { color: #858981; font-size: 18px; }
.project-summary { margin: 0; color: #777b73; font-size: 12px; }
.project-bar-actions { display: flex; align-items: center; gap: 16px; }
.align-button { min-height: 42px; padding: 0 15px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(48, 54, 45, .14); border-radius: 11px; color: #445148; background: #fffdf7; font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 6px rgba(46,49,43,.06); transition: transform .15s ease, background .15s ease; }
.align-button span { font-size: 18px; line-height: 1; }
.align-button:hover { background: #f7f8f3; transform: translateY(-1px); }
.align-button:active { transform: translateY(1px); }
.project-menu { position: absolute; z-index: 2100; left: 0; top: calc(100% + 8px); width: 330px; padding: 12px; border: 1px solid rgba(48, 54, 45, .11); border-radius: 15px; background: #fffdf7; box-shadow: 0 18px 40px rgba(44, 38, 29, .22); }
.project-menu[hidden], .project-editor[hidden] { display: none; }
.project-menu-heading { padding: 2px 3px 10px; display: flex; align-items: center; justify-content: space-between; }
.project-menu-heading strong { font-size: 13px; }
.project-menu-heading button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; color: #304d3b; background: #e9efe9; font-size: 11px; font-weight: 600; cursor: pointer; }
.project-list { max-height: 250px; overflow: auto; }
.project-item { display: flex; align-items: center; gap: 4px; border-radius: 10px; }
.project-item.selected { background: #eff2ec; }
.project-select { min-width: 0; min-height: 44px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 8px; border: 0; color: #454942; background: transparent; cursor: pointer; text-align: left; }
.project-select span { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.project-select small { color: #92968e; font-size: 10px; white-space: nowrap; }
.project-item-actions { display: flex; padding-right: 5px; opacity: .45; transition: opacity .15s ease; }
.project-item:hover .project-item-actions, .project-item.selected .project-item-actions { opacity: 1; }
.project-item-actions button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; color: #72766f; background: transparent; cursor: pointer; }
.project-item-actions button:hover { color: #304d3b; background: rgba(48, 77, 59, .09); }
.project-item-actions button:disabled { opacity: .25; cursor: not-allowed; }
.project-editor { margin-top: 10px; padding: 12px; border-radius: 11px; background: #f1efe8; }
.project-editor label { display: block; margin-bottom: 7px; color: #646861; font-size: 10px; font-weight: 600; }
.project-editor input { width: 100%; height: 39px; padding: 0 10px; border: 1px solid rgba(48, 54, 45, .18); border-radius: 8px; outline: 0; background: white; font-size: 13px; }
.project-editor input:focus { border-color: #53725e; box-shadow: 0 0 0 3px rgba(48,77,59,.09); }
.project-editor > div { margin-top: 9px; display: flex; justify-content: flex-end; gap: 7px; }
.project-editor button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; font-size: 11px; font-weight: 600; cursor: pointer; }
.editor-cancel { color: #6e726b; background: transparent; }
.editor-save { color: white; background: #304d3b; }

.board {
  position: relative;
  height: calc(100vh - var(--header-height) - var(--project-bar-height));
  min-height: 0;
  overflow: auto;
  background-color: #b97a4d;
  background-image:
    radial-gradient(ellipse at 18% 30%, rgba(90, 48, 25, .28) 0 1px, transparent 1.8px),
    radial-gradient(ellipse at 72% 64%, rgba(255, 203, 143, .28) 0 1.2px, transparent 2px),
    radial-gradient(ellipse at 42% 82%, rgba(107, 56, 28, .18) 0 2px, transparent 3px),
    radial-gradient(ellipse at 82% 18%, rgba(241, 168, 102, .24) 0 1px, transparent 2.5px),
    repeating-linear-gradient(112deg, transparent 0 4px, rgba(103, 55, 28, .035) 5px, transparent 7px),
    linear-gradient(135deg, rgba(255, 191, 122, .12), rgba(105, 55, 30, .08));
  background-size: 13px 17px, 19px 15px, 29px 23px, 31px 27px, 11px 11px, 100% 100%;
  box-shadow:
    inset 0 8px 20px rgba(72, 36, 18, .22),
    inset 0 0 0 4px rgba(91, 49, 27, .12);
}
.board::after { content: ""; position: absolute; left: 0; top: var(--board-content-height, 100%); width: 1px; height: 1px; pointer-events: none; }

.empty-state { position: absolute; left: 50%; top: 47%; width: min(420px, calc(100% - 48px)); transform: translate(-50%, -50%); text-align: center; color: rgba(68, 37, 21, .72); }
.empty-state[hidden] { display: none; }
.empty-illustration { position: relative; width: 118px; height: 86px; margin: 0 auto 25px; }
.empty-illustration span { position: absolute; width: 68px; height: 64px; border-radius: 5px; box-shadow: 0 7px 15px rgba(50, 54, 48, .09); }
.empty-illustration span:nth-child(1) { left: 4px; top: 14px; background: #efc969; transform: rotate(-9deg); }
.empty-illustration span:nth-child(2) { right: 2px; top: 10px; background: #d8addf; transform: rotate(8deg); }
.empty-illustration span:nth-child(3) { left: 28px; top: 0; background: #a9cdb1; transform: rotate(-1deg); }
.empty-state h2 { margin: 0 0 10px; color: #4b2b1b; font-size: 19px; }
.empty-state p { margin: 0; font-size: 13px; line-height: 1.8; }
.empty-add-button { display: none; margin: 20px auto 0; padding: 0 20px; }
.no-results { position: absolute; left: 50%; top: 47%; width: min(360px, calc(100% - 48px)); transform: translate(-50%, -50%); text-align: center; color: rgba(68, 37, 21, .72); }
.no-results[hidden] { display: none; }
.no-results > span { display: block; margin-bottom: 12px; color: rgba(68, 37, 21, .48); font-size: 52px; line-height: 1; }
.no-results h2 { margin: 0 0 8px; color: #4b2b1b; font-size: 19px; }
.no-results p { margin: 0; font-size: 13px; }

.completion-zone {
  position: fixed;
  z-index: 900;
  right: 22px;
  bottom: 22px;
  width: 228px;
  min-height: 92px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 2px dashed rgba(65, 38, 23, .56);
  border-radius: 16px;
  color: #543421;
  background: rgba(235, 205, 164, .82);
  box-shadow: 0 8px 24px rgba(61, 32, 17, .15), inset 0 0 0 3px rgba(255,255,255,.12);
  backdrop-filter: blur(3px);
  pointer-events: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.completion-zone-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid rgba(69, 75, 62, .55); border-radius: 50%; font-size: 22px; font-weight: 700; }
.completion-zone strong, .completion-zone small { display: block; }
.completion-zone strong { font-size: 14px; }
.completion-zone small { margin-top: 4px; opacity: .7; font-size: 11px; }
.completion-zone.drag-active { transform: scale(1.04); border-color: #304d3b; background: rgba(244, 222, 183, .95); }
.completion-zone.drag-over { transform: scale(1.09); color: white; border-style: solid; border-color: #304d3b; background: rgba(48, 77, 59, .94); box-shadow: 0 14px 34px rgba(34, 48, 38, .3); }
.completion-zone.drag-over .completion-zone-icon { border-color: white; }

.note {
  position: absolute;
  width: var(--note-width);
  height: var(--note-height);
  padding: 10px 14px 13px;
  border: 1px solid rgba(112, 90, 35, .08);
  border-radius: 1px 2px 5px 2px;
  background-color: #f8df87;
  background-image:
    linear-gradient(100deg, transparent 0 47%, rgba(118, 91, 28, .025) 50%, transparent 53%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, rgba(105,81,28,.018) 1px 2px, transparent 2px 5px);
  box-shadow: 1px 2px 2px rgba(54, 45, 28, .08), 5px 11px 18px rgba(54, 45, 28, .16);
  transition: box-shadow .18s ease, transform .18s ease;
  touch-action: none;
}
.note[hidden] { display: none; }
.note.aligning { transition: left .3s ease, top .3s ease, box-shadow .18s ease, transform .18s ease; }
.note::before {
  content: "";
  position: absolute;
  left: 12%;
  top: -7px;
  width: 76%;
  height: 15px;
  opacity: .58;
  background: rgba(246, 237, 205, .82);
  border-left: 1px dashed rgba(110, 99, 71, .13);
  border-right: 1px dashed rgba(110, 99, 71, .13);
  box-shadow: 0 1px 2px rgba(73, 59, 34, .08);
  transform: rotate(-.7deg);
  pointer-events: none;
}
.note::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 23px; height: 23px; background: linear-gradient(135deg, rgba(100, 77, 24, .1) 0 47%, #e8c969 49% 100%); box-shadow: -2px -2px 4px rgba(90, 70, 22, .05); border-radius: 1px 0 5px; pointer-events: none; }
.note:nth-of-type(3n + 1) { transform: rotate(-.7deg); }
.note:nth-of-type(3n + 2) { transform: rotate(.8deg); }
.note[data-color="pink"] { background-color: #f2b8c3; border-color: rgba(112, 57, 70, .08); }
.note[data-color="pink"]::after { background: linear-gradient(135deg, rgba(100, 48, 61, .08) 0 47%, #dfa4b0 49% 100%); }
.note[data-color="blue"] { background-color: #b9d9e8; border-color: rgba(44, 77, 94, .08); }
.note[data-color="blue"]::after { background: linear-gradient(135deg, rgba(44, 77, 94, .08) 0 47%, #a5c9da 49% 100%); }
.note[data-color="green"] { background-color: #bad9bd; border-color: rgba(52, 84, 62, .08); }
.note[data-color="green"]::after { background: linear-gradient(135deg, rgba(52, 84, 62, .09) 0 47%, #a5cba9 49% 100%); }
.note[data-completed="true"] { opacity: .76; filter: saturate(.48); box-shadow: 1px 2px 2px rgba(54, 45, 28, .06), 3px 7px 12px rgba(54, 45, 28, .11); }
.note[data-completed="true"] .note-text { color: rgba(52, 52, 47, .65); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.note.dragging { z-index: 1000; transform: rotate(1.5deg) scale(1.025); box-shadow: 0 18px 35px rgba(45, 42, 34, .24); }
.note-handle { height: 30px; display: flex; align-items: flex-start; justify-content: space-between; cursor: grab; }
.drag-dots { color: rgba(54, 55, 48, .28); font-size: 20px; line-height: 1; }
.note-actions { display: flex; align-items: center; gap: 2px; margin: -4px -7px 0 0; }
.complete-button, .delete-button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; line-height: 1; cursor: pointer; }
.complete-button { color: rgba(42, 54, 43, .5); font-size: 16px; font-weight: 700; }
.complete-button:hover { color: #304d3b; background: rgba(255,255,255,.35); }
.complete-button.selected { color: white; background: #4e765b; box-shadow: 0 2px 5px rgba(42, 71, 49, .2); }
.delete-button { color: rgba(42, 43, 38, .5); font-size: 23px; }
.delete-button:hover { color: #713d36; background: rgba(255,255,255,.35); }
.note-text { display: block; width: 100%; height: 127px; padding: 5px 2px; resize: none; border: 0; outline: 0; color: #34342f; background: transparent; font-family: "Klee One", "YuKyokasho", "Yu Kyokasho", cursive; font-size: 16px; font-weight: 600; line-height: 1.75; letter-spacing: .045em; touch-action: manipulation; }
.note-text::placeholder { color: rgba(55, 55, 47, .42); }
.note-footer { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-hint { margin: 3px 0 0; color: rgba(55, 55, 47, .42); font-size: 10px; letter-spacing: .03em; }
.note-colors { display: flex; align-items: center; gap: 5px; touch-action: manipulation; }
.note-color { width: 15px; height: 15px; padding: 0; border: 1px solid rgba(55, 50, 42, .15); border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.38); }
.note-color.selected { outline: 2px solid rgba(49, 52, 46, .65); outline-offset: 2px; }

[data-theme="dark"] { color-scheme: dark; color: #e8e5dc; background: #20241f; }
[data-theme="dark"] .app-header { border-color: rgba(255,255,255,.08); background: #20241f; }
[data-theme="dark"] .brand p,
[data-theme="dark"] .save-status,
[data-theme="dark"] .project-summary { color: #a9afa5; }
[data-theme="dark"] .brand-mark { background: #111a14; }
[data-theme="dark"] .status-tabs { border-color: rgba(255,255,255,.09); background: #181c18; }
[data-theme="dark"] .status-tabs button { color: #969d94; }
[data-theme="dark"] .status-tabs button.selected { color: #dce9df; background: #34443a; box-shadow: 0 2px 8px rgba(0,0,0,.24); }
[data-theme="dark"] #note-search { border-color: rgba(255,255,255,.1); color: #e5e8e2; background: #2b302a; }
[data-theme="dark"] #note-search:focus { border-color: #728f7a; background: #30362f; box-shadow: 0 0 0 3px rgba(111,145,121,.15); }
[data-theme="dark"] #note-search::placeholder { color: #848a81; }
[data-theme="dark"] .search-icon { border-color: #959c92; }
[data-theme="dark"] .search-icon::after { background: #959c92; }
[data-theme="dark"] .search-count { color: #abb1a8; border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .theme-button { border-color: rgba(255,255,255,.11); color: #f1ce78; background: #30362f; }
[data-theme="dark"] .theme-button:hover { background: #3a4239; }
[data-theme="dark"] .project-bar { border-color: rgba(255,255,255,.07); background: #292e28; }
[data-theme="dark"] .project-button,
[data-theme="dark"] .align-button { border-color: rgba(255,255,255,.1); color: #e2e5de; background: #353b34; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
[data-theme="dark"] .project-button small,
[data-theme="dark"] .project-chevron { color: #9ca299; }
[data-theme="dark"] .project-menu,
[data-theme="dark"] .new-note-colors { border-color: rgba(255,255,255,.09); color: #e6e8e2; background: #30362f; box-shadow: 0 18px 42px rgba(0,0,0,.45); }
[data-theme="dark"] .new-note-colors::before { background: #30362f; }
[data-theme="dark"] .new-note-colors p { color: #bdc2b9; }
[data-theme="dark"] .project-item.selected { background: #3d463d; }
[data-theme="dark"] .project-select { color: #e4e7e0; }
[data-theme="dark"] .project-select small,
[data-theme="dark"] .project-item-actions button { color: #aab0a7; }
[data-theme="dark"] .project-menu-heading button { color: #cfe0d2; background: #3d4a40; }
[data-theme="dark"] .project-editor { background: #252a25; }
[data-theme="dark"] .project-editor label { color: #afb5ac; }
[data-theme="dark"] .project-editor input { border-color: rgba(255,255,255,.12); color: #e9ebe6; background: #383e37; }
[data-theme="dark"] .board { background-color: #70472f; background-image: radial-gradient(ellipse at 18% 30%, rgba(26,14,8,.38) 0 1px, transparent 1.8px), radial-gradient(ellipse at 72% 64%, rgba(190,128,75,.22) 0 1.2px, transparent 2px), radial-gradient(ellipse at 42% 82%, rgba(38,20,12,.3) 0 2px, transparent 3px), radial-gradient(ellipse at 82% 18%, rgba(160,101,55,.18) 0 1px, transparent 2.5px), repeating-linear-gradient(112deg, transparent 0 4px, rgba(30,15,9,.08) 5px, transparent 7px), linear-gradient(135deg, rgba(143,88,48,.12), rgba(29,16,10,.13)); box-shadow: inset 0 8px 24px rgba(17,8,4,.5), inset 0 0 0 4px rgba(30,15,8,.22); }
[data-theme="dark"] .empty-state,
[data-theme="dark"] .no-results { color: rgba(235,216,194,.7); }
[data-theme="dark"] .empty-state h2,
[data-theme="dark"] .no-results h2 { color: #f0dfcc; }
[data-theme="dark"] .no-results > span { color: rgba(235,216,194,.5); }
[data-theme="dark"] .completion-zone { color: #e9d8c3; border-color: rgba(231,205,174,.5); background: rgba(61,43,32,.88); box-shadow: 0 8px 28px rgba(0,0,0,.3); }

@media (max-width: 1100px) and (min-width: 768px) {
  :root { --header-height: 170px; }
  .app-header { padding: 20px 28px; display: grid; grid-template-columns: 1fr auto auto; grid-template-rows: 52px 48px; gap: 10px 18px; }
  .status-tabs { grid-column: 2; grid-row: 1; }
  .search-control { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; }
  .header-actions { grid-column: 3; grid-row: 1; }
  .save-status { display: none; }
}

@media (max-width: 767px) {
  :root { --header-height: 204px; --note-width: 200px; --note-height: 196px; }
  .app-header { padding: 14px 16px; gap: 8px 12px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: 52px 40px 48px; }
  .brand { gap: 10px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand h1 { font-size: 21px; }
  .brand p { display: none; }
  .status-tabs { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: 3px; }
  .status-tabs button { flex: 1; min-height: 34px; }
  .search-control { grid-column: 1 / -1; grid-row: 3; width: 100%; max-width: none; min-width: 0; }
  #note-search { height: 48px; font-size: 16px; }
  .header-actions { gap: 8px; }
  .save-status { display: none; }
  .add-button { width: 52px; min-height: 52px; padding: 0; font-size: 0; border-radius: 15px; }
  .add-button span { margin: 0; font-size: 28px; }
  .new-note-colors { position: fixed; top: 70px; right: 14px; width: 220px; }
  .color-option { width: 40px; height: 40px; }
  .empty-state { top: 43%; }
  .empty-state p { max-width: 270px; margin-inline: auto; }
  .empty-add-button { display: block; min-height: 52px; }
  .note-actions { margin-top: -8px; }
  .complete-button, .delete-button { width: 40px; height: 40px; }
  .delete-button { font-size: 26px; }
  .note-text { height: 118px; font-size: 17px; }
  .note-handle { height: 35px; }
  .note-color { width: 18px; height: 18px; }
  .note-hint { display: none; }
  .completion-zone { right: 12px; bottom: 12px; width: 194px; min-height: 76px; padding: 12px 14px; border-radius: 14px; }
  .completion-zone-icon { width: 32px; height: 32px; font-size: 18px; }
  .project-bar { padding: 8px 14px; }
  .project-button { min-width: 0; width: min(230px, calc(100vw - 118px)); }
  .project-summary { display: none; }
  .project-bar-actions { gap: 8px; }
  .align-button { min-height: 44px; padding: 0 13px; font-size: 12px; }
  .project-menu { position: fixed; left: 12px; top: calc(var(--header-height) + var(--project-bar-height) - 2px); width: calc(100vw - 24px); max-height: calc(100vh - var(--header-height) - var(--project-bar-height) - 12px); overflow: auto; }
}

@media (max-width: 359px) {
  .brand h1 { font-size: 18px; }
  .brand-mark { width: 36px; height: 36px; }
}

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