/* Streamlined full-page planning layout. */
:root { --topbar: 58px; }

.sidebar { display: none !important; }
main { margin-left: 0; }
.page { max-width: none; padding: 24px 28px 88px; }
.topbar { height: var(--topbar); padding: 0 28px; gap: 26px; }
.top-brand { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 0; }
.top-brand .brand-mark { display: grid; }
.top-nav { display: flex; align-items: stretch; height: 100%; gap: 4px; }
.top-nav .nav-item { border-radius: 0; padding: 0 13px; color: var(--muted); border-bottom: 2px solid transparent; }
.top-nav .nav-item:hover { color: var(--ink); }
.top-nav .nav-item.active { color: var(--ink); border-bottom-color: var(--accent); }
.crumb { margin-left: auto; color: var(--muted); font-size: 12px; }
.topbar .icon-btn { margin-left: 0; }
.language-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.language-btn:hover { color: var(--ink); border-color: #aab5b0; }
.logout-btn { border: 0; background: transparent; color: var(--muted); padding: 7px 4px; font-size: 12px; }
.logout-btn:hover { color: var(--ink); }
.mobile-nav i { font-style: normal; }

body.auth-page main { margin: 0; }
body.auth-page .top-nav, body.auth-page .crumb, body.auth-page .mobile-nav { display: none !important; }
body.auth-page .topbar { background: transparent; border-bottom: 0; position: fixed; inset: 0 0 auto; }
body.auth-page .topbar .language-btn { margin-left: auto; }
.login-page { min-height: calc(100vh - 48px); display: grid; place-items: center; padding: 56px 16px; }
.login-shell { width: min(400px, 100%); }
.login-intro { text-align: center; margin-bottom: 24px; }
.login-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto 16px; background: #ddf257; color: #1c2c25; font-size: 19px; font-weight: 900; box-shadow: 0 9px 25px rgba(55,83,69,.16); }
.login-intro h1 { margin: 0 0 7px; font-size: 28px; letter-spacing: -.03em; }
.login-intro p { color: var(--muted); margin: 0; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); animation: dialog-in .24s ease both; }
.login-card .button { width: 100%; margin-top: 8px; padding: 11px; }
.login-error { min-height: 20px; margin: 8px 0 0; color: var(--danger); font-size: 12px; }

dialog { max-height: min(760px, calc(100vh - 32px)); max-width: calc(100% - 28px); overflow: hidden; }
dialog form { width: 100%; max-width: 100%; padding: 0 !important; display: flex; flex-direction: column; max-height: min(760px, calc(100vh - 32px)); overflow-x: hidden; }
.dialog-head { position: sticky; top: 0; z-index: 3; flex: none; margin: 0 !important; padding: 20px 22px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
#formFields { flex: 1 1 auto; width: 100%; max-width: 100%; overflow-x: hidden; overflow-y: auto; min-height: 0; padding: 4px 22px 16px; overscroll-behavior: contain; }
.field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field, .field-grid > * { min-width: 0; }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; }
.dialog-actions { position: sticky; bottom: 0; z-index: 3; flex: none; margin: 0 !important; padding: 14px 22px; background: var(--panel); border-top: 1px solid var(--line); }

.project-compact-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.project-compact-head h1 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.project-compact-head .project-meta { color: var(--muted); font-size: 12px; }
.project-compact-head .head-actions { margin-left: auto; display: flex; gap: 8px; }
.compact-stats { display: flex; gap: 18px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; margin-bottom: 12px; }
.compact-stat { display: flex; gap: 7px; align-items: baseline; color: var(--muted); font-size: 12px; }
.compact-stat strong { color: var(--ink); font-size: 14px; }

.planning-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.planning-toolbar .search { max-width: 420px; }
.filter-strip { display: flex; align-items: center; gap: 8px; }
.planning-toolbar .toolbar-spacer { flex: 1; }

.planner { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; overflow: hidden; }
.planner-scroll { overflow: auto; max-height: calc(100vh - 235px); }
.planner-grid { min-width: 1050px; }
.planner-row { display: grid; grid-template-columns: minmax(310px, 30vw) var(--timeline-width); min-height: 46px; border-bottom: 1px solid var(--line); }
.planner-row:last-child { border-bottom: 0; }
.planner-row:hover:not(.planner-header) { background: color-mix(in srgb, var(--accent-soft) 30%, transparent); }
.planner-header { position: sticky; top: 0; z-index: 8; min-height: 62px; background: var(--panel); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.planner-task-head, .planner-task-cell { position: sticky; left: 0; z-index: 4; background: var(--panel); border-right: 1px solid var(--line); }
.planner-task-head { z-index: 9; display: grid; grid-template-columns: 1fr 116px; align-items: center; padding: 0 12px; }
.planner-row:hover .planner-task-cell { background: #f9fbf9; }
.dark .planner-row:hover .planner-task-cell { background: #202925; }
.planner-task-cell { display: grid; grid-template-columns: minmax(0, 1fr) 116px; align-items: center; }
.task-identity { position: relative; min-width: 0; display: grid; grid-template-columns: 22px max-content minmax(0,1fr); align-items: start; column-gap: 8px; row-gap: 4px; padding: 8px 5px 8px calc(9px + var(--depth) * 18px); }
.task-wbs { color: var(--muted); font: 600 11px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.task-name { min-width: 0; white-space: normal; overflow: visible; overflow-wrap: anywhere; font-weight: 600; line-height: 1.35; }
.task-name.is-done { color: var(--muted); text-decoration: line-through; text-decoration-color: #abb3af; }
.task-identity > .overdue-mark { grid-column: 3; justify-self: start; margin-left: 0; }
.task-actions { position: absolute; right: 4px; top: 50%; display: flex; align-items: center; border-radius: 6px; background: var(--panel); opacity: 0; transform: translateY(-50%); transition: opacity .14s ease; }
.planner-row:hover .task-actions, .mobile-task-row .task-actions { opacity: 1; }
.task-edit, .task-add-child { border: 0; background: transparent; color: var(--muted); width: 24px; height: 28px; padding: 0; border-radius: 5px; }
.task-edit { font-size: 18px; }
.task-add-child { font-size: 18px; font-weight: 500; }
.task-edit:hover, .task-add-child:hover { color: var(--accent); background: var(--accent-soft); }
.accordion { flex: none; width: 22px; height: 28px; border: 0; background: transparent; display: grid; place-items: center; padding: 0; }
.accordion-icon { width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translate(-1px,-1px); transition: transform .12s ease; }
.accordion.collapsed .accordion-icon { transform: rotate(-45deg); }
.accordion.blank { visibility: hidden; }
.status-select { appearance: none; border: 0; border-radius: 999px; padding: 5px 22px 5px 9px; width: 105px; font-size: 10px; font-weight: 800; letter-spacing: .025em; background-repeat: no-repeat; background-position: right 9px center; background-size: 9px 6px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%235f6965' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.status-select.TODO { background-color: #eef0ee; color: #626c68; }
.status-select.IN_PROGRESS { background-color: #e1f1eb; color: #126a50; }
.status-select.DONE { background-color: #dfe9e2; color: #345f4c; }
.status-select.UNSET { background-color: #f1f2f1; color: #717975; }
.status-select.ON_HOLD { background-color: #fff0d8; color: #8a5a12; }
.status-select.NEEDS_BREAKDOWN { background-color: #f8e6e2; color: #9b3f2f; }
.badge.UNSET { background: #eff1ef; color: #67716c; }
.badge.ON_HOLD { background: #fff0d8; color: #8a5a12; }
.badge.NEEDS_BREAKDOWN { background: #f8e6e2; color: #9b3f2f; }
.dark .status-select.TODO { background-color: #333d39; color: #c3cbc7; }
.dark .status-select.IN_PROGRESS { background-color: #244438; color: #77d4af; }
.dark .status-select.DONE { background-color: #32483e; color: #a7d2bd; }
.dark .status-select.UNSET { background-color: #303734; color: #b6c0bb; }
.dark .status-select.ON_HOLD { background-color: #4b3a20; color: #f2c879; }
.dark .status-select.NEEDS_BREAKDOWN { background-color: #4a2f2a; color: #f2afa3; }

.timeline-head { position: relative; overflow: hidden; display: block; }
.timeline-months, .timeline-days { display: grid; }
.timeline-months { height: 29px; border-bottom: 1px solid var(--line); background: color-mix(in srgb,var(--panel) 85%,var(--accent-soft)); }
.timeline-days { height: 33px; }
.timeline-month { display: flex; align-items: center; padding: 0 9px; border-right: 1px solid var(--line); color: var(--ink); font-size: 11px; font-weight: 750; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.timeline-day { display: grid; place-items: center; border-right: 1px solid var(--line); font-size: 10px; }
.timeline-day.today { background: #fff3cf; color: #795b00; }
.dark .timeline-day.today { background: #41381f; color: #f3d67b; }
.timeline-cell { position: relative; background-image: linear-gradient(to right,color-mix(in srgb,var(--line) 90%,#83908a) 1px,transparent 1px); background-size: var(--day-width) 100%; overflow: hidden; }
.schedule-bar { position: absolute; border-radius: 4px; min-width: 5px; }
.schedule-bar.planned { top: 5px; height: 13px; border: 2px solid #2563a9; color: #2563a9; background: repeating-linear-gradient(135deg,#d8e9fb 0,#d8e9fb 4px,#78aee2 4px,#78aee2 8px); opacity: 1; box-shadow: 0 1px 1px rgba(24,67,112,.18); }
.schedule-bar.actual { top: 25px; height: 13px; border: 1px solid rgba(0,0,0,.3); box-shadow: 0 1px 3px rgba(20,35,29,.32); }
.schedule-bar.actual.TODO { color: #46514d; background-color: #5d6a65; }
.schedule-bar.actual.IN_PROGRESS { color: #07543e; background-color: #087a58; }
.schedule-bar.actual.DONE { color: #214c3a; background-color: #2f674f; }
.schedule-bar.actual.UNSET { color: #505a56; background-color: #87928d; }
.schedule-bar.actual.ON_HOLD { color: #65420d; background-color: #c58b35; }
.schedule-bar.actual.NEEDS_BREAKDOWN { color: #722f24; background-color: #bb6252; }
.dark .schedule-bar.actual.TODO { color: #d5ded9; background-color: #8b9993; border-color: #d5ded9; }
.dark .schedule-bar.actual.IN_PROGRESS { color: #a8efd3; background-color: #28b184; border-color: #a8efd3; }
.dark .schedule-bar.actual.DONE { color: #b8dbc9; background-color: #579978; border-color: #b8dbc9; }
.dark .schedule-bar.planned { color: #8ac1ff; border-color: #8ac1ff; background: repeating-linear-gradient(135deg,#173755 0,#173755 4px,#3978b5 4px,#3978b5 8px); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.today-marker { position: absolute; top: 0; bottom: 0; width: 2px; background: #e0aa22; z-index: 3; pointer-events: none; }
.planner-legend { display: flex; gap: 18px; padding: 9px 12px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); }
.legend-line { display: inline-block; width: 22px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.legend-line.planned { border: 2px solid #2563a9; background: repeating-linear-gradient(135deg,#d8e9fb 0,#d8e9fb 4px,#78aee2 4px,#78aee2 8px); }
.legend-line.actual { border: 1px solid #214c3a; background: #087a58; box-shadow: 0 1px 2px rgba(20,35,29,.24); }
.mobile-task-list { display: none; }

.gantt-start-control { display: grid; gap: 3px; color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.gantt-start-control input { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); padding: 5px 8px; font-size: 11px; }

.next-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.next-toolbar select { min-width: 240px; }
.next-toolbar strong { color: var(--muted); font-size: 12px; }
.next-shell { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.next-head, .next-row { display: grid; grid-template-columns: 118px minmax(240px,1.6fr) 115px minmax(150px,1fr) 110px 118px 95px 64px; align-items: center; min-height: 50px; border-bottom: 1px solid var(--line); }
.next-head { min-height: 40px; background: color-mix(in srgb,var(--panel) 84%,var(--accent-soft)); color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.next-head > *, .next-row > * { min-width: 0; padding: 8px 10px; }
.next-row:last-child { border-bottom: 0; }
.next-row:hover { background: color-mix(in srgb,var(--accent-soft) 28%,transparent); }
.next-row > div { display: grid; gap: 2px; }
.next-row strong { overflow: visible; overflow-wrap: anywhere; white-space: normal; font-size: 12px; line-height: 1.35; }
.next-row small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.next-row > span:not(.badge), .next-row code { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.next-row .badge { justify-self: start; }
.next-cards { display: none; }

.overdue-mark { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: #b42318; font-size: 9px; font-weight: 850; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; }
.overdue-mark i { width: 6px; height: 6px; border-radius: 50%; background: #d92d20; box-shadow: 0 0 0 3px rgba(217,45,32,.12); }
.planner-row.is-overdue .planner-task-cell { box-shadow: inset 3px 0 #d92d20; }
.schedule-bar.planned.is-overdue { border-color: #d92d20; box-shadow: 0 0 0 1px rgba(217,45,32,.28); }
.next-row.is-overdue { box-shadow: inset 3px 0 #d92d20; }
.next-card.is-overdue, .mobile-task-row.is-overdue { border-left-color: #d92d20; }
.dark .overdue-mark { color: #ff9b91; }
.dark .overdue-mark i { background: #ff7166; box-shadow: 0 0 0 3px rgba(255,113,102,.13); }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.pagination > div { display: flex; align-items: center; gap: 10px; }
.pagination strong { min-width: 110px; text-align: center; color: var(--ink); font-size: 11px; }
.pagination button:disabled { opacity: .42; cursor: default; transform: none; }

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.calendar-nav, .calendar-filters { display: flex; align-items: center; gap: 8px; }
.calendar-nav input { min-width: 155px; }
.calendar-filters select { max-width: 200px; }
.calendar-layout { display: grid; grid-template-columns: minmax(680px, 2fr) minmax(330px, .85fr); gap: 14px; align-items: start; }
.calendar-shell, .calendar-agenda { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); min-height: 38px; background: color-mix(in srgb,var(--panel) 84%,var(--accent-soft)); border-bottom: 1px solid var(--line); }
.calendar-weekdays span { display: grid; place-items: center; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.calendar-day { position: relative; min-width: 0; min-height: 104px; padding: 9px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-last-child(-n+7) { border-bottom: 0; }
.calendar-day:hover { background: color-mix(in srgb,var(--accent-soft) 35%,transparent); }
.calendar-day.outside { color: var(--muted); background: color-mix(in srgb,var(--bg) 58%,transparent); }
.calendar-day.today .calendar-day-number { display: grid; place-items: center; width: 24px; height: 24px; margin: -3px; border-radius: 50%; background: #e4b227; color: #3c310d; font-weight: 850; }
.calendar-day.selected { box-shadow: inset 0 0 0 2px var(--accent); z-index: 1; }
.calendar-day.has-overdue { box-shadow: inset 3px 0 #d92d20; }
.calendar-day.selected.has-overdue { box-shadow: inset 0 0 0 2px var(--accent), inset 4px 0 #d92d20; }
.calendar-day-number { font-size: 12px; font-weight: 750; }
.calendar-count { position: absolute; top: 8px; right: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 9px; font-weight: 850; }
.calendar-preview { display: grid; gap: 4px; margin-top: 9px; }
.calendar-preview i { overflow: visible; padding: 3px 5px; border-radius: 5px; background: color-mix(in srgb,var(--accent-soft) 68%,var(--panel)); color: var(--ink); font-size: 9px; font-style: normal; line-height: 1.25; overflow-wrap: anywhere; white-space: normal; }
.calendar-preview i.overdue { background: #ffebe9; color: #a8241a; }
.dark .calendar-preview i.overdue { background: #4c2926; color: #ffaca4; }
.calendar-agenda { position: sticky; top: calc(var(--topbar) + 14px); }
.calendar-agenda-head { display: grid; gap: 3px; padding: 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb,var(--panel) 84%,var(--accent-soft)); }
.calendar-agenda-head span, .calendar-agenda-head small { color: var(--muted); font-size: 10px; }
.calendar-agenda-head strong { font-size: 17px; }
.calendar-task { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.calendar-task.is-overdue { box-shadow: inset 3px 0 #d92d20; }
.calendar-task:last-of-type { border-bottom: 0; }
.calendar-task h3 { margin: 4px 0 3px; font-size: 13px; line-height: 1.3; }
.calendar-task p, .calendar-task small { margin: 0; color: var(--muted); font-size: 10px; }
.calendar-task > div:last-child { display: grid; justify-items: end; align-content: start; gap: 7px; }
.calendar-task-meta { display: flex; align-items: center; }
.calendar-task-meta code { color: var(--muted); font-size: 9px; }
.calendar-agenda > .pagination { padding: 0 14px 14px; flex-wrap: wrap; }
.calendar-agenda > .pagination > span { width: 100%; }

.project-card, .button, .status-select, .language-btn { transition: transform .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease, box-shadow .14s ease; }
.button:active, .language-btn:active { transform: translateY(1px); }
dialog[open] { animation: dialog-in .18s ease both; }
dialog::backdrop { animation: backdrop-in .18s ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

@media (max-width: 900px) {
  .mobile-nav { grid-template-columns: repeat(5,1fr); }
  .topbar { height: 54px; padding: 0 12px; gap: 9px; }
  .top-brand strong, .top-nav, .crumb { display: none; }
  .topbar .icon-btn { margin-left: auto; }
  .language-btn { padding: 5px 8px; }
  .page { padding: 12px 12px 84px; }
  .project-compact-head { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 5px 18px rgba(25,43,36,.06); }
  .project-compact-head > .button.small { width: 40px; height: 40px; padding: 0; border-radius: 12px; font-size: 0; }
  .project-compact-head > .button.small::before { content: "←"; font-size: 19px; }
  .project-compact-head h1 { font-size: 19px; line-height: 1.15; }
  .project-compact-head .project-meta { margin-top: 4px; font-size: 10px; }
  .project-compact-head > .badge { justify-self: end; }
  .project-compact-head .head-actions { grid-column: 1 / -1; width: 100%; margin: 2px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .project-compact-head .head-actions .button { min-height: 40px; padding: 8px 10px; font-size: 11px; border-radius: 11px; }
  .compact-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 0; border: 0; background: transparent; margin-bottom: 12px; }
  .compact-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 66px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); font-size: 10px; line-height: 1.25; }
  .compact-stat strong { font-size: 18px; }
  .planning-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-bottom: 12px; }
  .planning-toolbar .search { grid-column: 1; grid-row: 1; max-width: none; }
  .planning-toolbar .search input { height: 44px; padding: 9px 12px; font-size: 13px; border-radius: 12px; }
  .planning-toolbar .filter-strip { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 8px; overflow-x: auto; padding: 1px 1px 4px; scrollbar-width: none; }
  .planning-toolbar .filter-strip::-webkit-scrollbar { display: none; }
  .planning-toolbar .filter-btn { flex: 0 0 auto; min-width: 126px; height: 40px; padding: 7px 30px 7px 11px; font-size: 11px; border-radius: 999px; }
  .planning-toolbar .toolbar-spacer { display: none; }
  .planning-toolbar .button.primary { grid-column: 2; grid-row: 1; min-height: 44px; padding: 9px 13px; font-size: 11px; border-radius: 12px; }
  .gantt-start-control { display: none; }
  .planner { display: none; }
  .mobile-task-list { display: block; background: transparent; }
  .mobile-task-slide { overflow: hidden; padding-bottom: 9px; }
  .mobile-task-slide.is-hidden { display: none; }
  .mobile-task-row { min-height: 0; overflow: hidden; margin: 0 0 0 calc(var(--depth) * 10px); padding: 12px; border: 1px solid var(--line); border-left: 3px solid color-mix(in srgb,var(--accent) 42%,var(--line)); border-radius: 14px; background: var(--panel); box-shadow: 0 3px 12px rgba(25,43,36,.05); }
  .mobile-task-row.is-expandable { cursor: pointer; }
  .mobile-task-row.is-expandable:active { background: color-mix(in srgb, var(--accent-soft) 42%, var(--panel)); }
  .mobile-task-main { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 8px; }
  .mobile-task-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .mobile-task-wbs { color: var(--muted); font: 650 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
  .mobile-task-title { overflow: visible; color: var(--ink); font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; white-space: normal; }
  .mobile-task-title.is-done { color: var(--muted); text-decoration: line-through; }
  .mobile-task-row .accordion { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); }
  .mobile-task-row .accordion-icon { width: 9px; height: 9px; border-width: 0 2px 2px 0; }
  .mobile-task-row .accordion.blank { visibility: visible; pointer-events: none; background: transparent; }
  .mobile-task-row .accordion.blank .accordion-icon { display: none; }
  .mobile-task-row .status-select { width: 92px; min-height: 36px; padding: 6px 22px 6px 9px; font-size: 9px; }
  .mobile-task-dates { display: grid; gap: 5px; margin: 10px 0 0 48px; padding: 8px 10px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 10px; }
  .mobile-task-dates > span { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 5px; }
  .mobile-task-dates strong { color: var(--ink); font-weight: 700; }
  .mobile-task-actions { display: flex; justify-content: flex-end; gap: 6px; margin: 8px 0 -4px 48px; padding-top: 8px; border-top: 1px solid var(--line); }
  .mobile-task-actions button { min-width: 40px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 16px; }
  .mobile-task-actions button:first-child { padding: 0 11px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 750; }
  .mobile-task-actions button:active { transform: scale(.97); }
  .next-toolbar select { width: 100%; min-width: 0; height: 44px; border-radius: 12px; }
  .next-toolbar strong { margin-left: auto; }
  .next-shell { display: none; }
  .next-cards { display: grid; gap: 10px; }
  .next-card { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); box-shadow: 0 3px 12px rgba(25,43,36,.05); }
  .next-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .next-card code { color: var(--muted); font-size: 10px; }
  .next-card h3 { margin: 3px 0 0; font-size: 15px; line-height: 1.3; }
  .next-card > p { margin: 10px 0; color: var(--muted); font-size: 11px; white-space: pre-line; }
  .next-card dl { display: grid; gap: 6px; margin: 0 0 12px; padding: 10px; border-radius: 10px; background: var(--bg); }
  .next-card dl div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
  .next-card dt { color: var(--muted); font-size: 10px; }
  .next-card dd { margin: 0; font-size: 11px; }
  .next-card > .button { width: 100%; min-height: 42px; }
  .pagination { flex-direction: column; align-items: stretch; padding: 0 2px; }
  .pagination > span { text-align: center; }
  .pagination > div { justify-content: space-between; }
  .pagination strong { min-width: 0; }
  .calendar-toolbar { display: grid; gap: 9px; }
  .calendar-nav { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px auto; }
  .calendar-nav input { min-width: 0; width: 100%; }
  .calendar-filters { overflow-x: auto; padding: 1px 1px 4px; scrollbar-width: none; }
  .calendar-filters::-webkit-scrollbar { display: none; }
  .calendar-filters select { flex: 0 0 145px; height: 40px; border-radius: 999px; font-size: 10px; }
  .calendar-layout { display: grid; grid-template-columns: 1fr; }
  .calendar-weekdays { min-height: 32px; }
  .calendar-day { min-height: 55px; padding: 6px; }
  .calendar-preview { display: none; }
  .calendar-count { top: auto; right: 5px; bottom: 5px; min-width: 18px; height: 18px; }
  .calendar-day.today .calendar-day-number { width: 21px; height: 21px; }
  .calendar-agenda { position: static; }
  .calendar-task { padding: 13px; }
  dialog { width: calc(100% - 18px); max-height: calc(100vh - 18px); }
  dialog form { max-height: calc(100vh - 18px); }
  .dialog-head { padding: 14px 15px 11px; }
  #formFields { padding: 2px 15px 11px; }
  #formFields .field-grid { grid-template-columns: minmax(0,1fr); }
  .dialog-actions { padding: 9px 15px; }
}
