:root {
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: #162642;
  background: #f2f6fc;
  --text: #162642;
  --muted: #536783;
  --border: #dce6f3;
  --green: #194f91;
  --surface: #fff;
  --canvas: #f2f6fc;
  --focus: #2866ac;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 292px; min-height: 100dvh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
svg { flex: 0 0 auto; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 720; }
.skip { position: fixed; z-index: 10; left: 12px; top: -70px; background: white; color: var(--green); padding: 12px; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

.brand { display: flex; align-items: center; gap: 10px; padding: 1px 9px; width: fit-content; letter-spacing: -.045em; font-size: 23px; font-weight: 780; line-height: 1.02; }
.brand img { border-radius: 11px; }
.account { border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; padding: 15px 0 0 3px; min-width: 0; }
.account-icon { width: 34px; height: 34px; border-radius: 50%; background: #e7f0fc; color: #255b9d; display: grid; place-items: center; flex: 0 0 auto; font-weight: 750; }
.account-name { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.account-name strong, .account-name small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-name strong { font-size: 12px; }
.account-name small { font-size: 10px; color: var(--muted); }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid transparent; background: transparent; color: #546c87; flex: 0 0 auto; transition: background .15s, color .15s; }
.icon-button:hover { background: #ecf4fd; color: var(--green); }
.button { border: 1px solid #d8e4f4; border-radius: 9px; min-height: 40px; padding: 0 14px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; background: #fff; color: #214d80; font-size: 13px; font-weight: 720; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { border-color: #adc6e4; background: #f1f7fe; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: #205b9f; border-color: #205b9f; box-shadow: 0 2px 4px #13396824; }
.button-primary:hover { background: #286bb5; color: #fff; border-color: #286bb5; }
.button-danger { background: #a13a3a; color: #fff; border-color: #a13a3a; }
.button-danger:hover { background: #882f2f; color: #fff; border-color: #882f2f; }
.connection { white-space: nowrap; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #355d8a; padding: 0 3px; }
.connection.offline { color: #87562b; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #4d89d3; }
#content { max-width: 1550px; width: 100%; margin: 0 auto; padding: 35px clamp(19px, 3.1vw, 46px) 42px; outline-offset: -5px; }
.loading { margin: 40px 0; color: var(--muted); }
.tile { display: inline-grid; width: 43px; height: 43px; border-radius: 10px; place-items: center; background: #e5effc; color: #2961a7; flex: 0 0 auto; }
.tile.blue { color: #406591; background: #ecf2fa; }
.tile.gold { color: #9b681c; background: #fbf0d9; }
.tile.rose { color: #9c556e; background: #faedf2; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.section-heading h2 { font-size: 21px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.section-heading p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.search { display: flex; align-items: center; gap: 8px; width: min(238px, 47%); min-width: 110px; min-height: 40px; background: #fff; border: 1px solid #e0e6dc; color: #77847a; padding: 0 11px; border-radius: 9px; }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.search input { width: 100%; border: 0; background: transparent; outline: 0; font-size: 12px; color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; border-radius: 99px; white-space: nowrap; line-height: 1; font-weight: 720; background: #edf3fa; color: #556980; padding: 6px 7px; }
.badge > span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.active { color: #245d98; background: #e6f1ff; }
.badge.done { color: #245487; background: #e4effc; }
.badge.late { color: #9a4941; background: #faeeeb; }
progress { width: 100%; height: 6px; border: 0; border-radius: 10px; appearance: none; overflow: hidden; background: #e1ebf7; accent-color: #377cca; }
progress::-webkit-progress-bar { background: #e1ebf7; }
progress::-webkit-progress-value { background: #377cca; border-radius: 9px; }
progress::-moz-progress-bar { background: #377cca; border-radius: 9px; }
.blue progress::-webkit-progress-value { background: #729bc6; }
.gold progress::-webkit-progress-value { background: #c49a4f; }
.rose progress::-webkit-progress-value { background: #b98298; }
.empty { grid-column: 1/-1; padding: 49px 19px; border: 1px dashed #cbdaf0; border-radius: 15px; text-align: center; color: var(--muted); background: #ffffffa8; }
.empty > svg { color: #5083bc; margin-bottom: 8px; }
.empty h2, .empty h3 { color: #294f83; font-size: 17px; overflow-wrap: anywhere; }
.empty p { margin-top: 7px; font-size: 13px; }
.empty .button { margin-top: 17px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650; color: #2b649f; margin-bottom: 15px; }
.back-link:hover { text-decoration: underline; }
.project-banner { display: flex; align-items: center; gap: 14px; background: linear-gradient(115deg,#fff 30%,#f0f6ff); border: 1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: 0 9px 26px #244f8710; }
.project-banner > div:nth-child(2) { flex: 1; min-width: 0; }
.project-banner h1 { font-size: clamp(26px,3vw,37px); letter-spacing: -.055em; overflow-wrap: anywhere; line-height: 1.24; }
.project-banner p { color: var(--muted); margin-top: 6px; line-height: 1.6; font-size: 13px; overflow-wrap: anywhere; }
.detail-progress { width: 104px; min-width: 66px; text-align: right; }
.detail-progress strong { display: block; font-size: 22px; color: #2462a8; margin-bottom: 2px; }
.detail-section { padding: 19px 21px; border-radius: 15px; background: #fff; border: 1px solid var(--border); box-shadow: 0 8px 26px #244f870b; }
.detail-actions, .row-actions { display: flex; gap: 4px; align-items: center; }
.milestone-list { list-style: none; display: grid; gap: 0; padding: 0; margin: 3px 0 0; }
.milestone { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; gap: 10px; padding: 11px 0; align-items: center; min-height: 62px; }
.milestone + .milestone { border-top: 1px solid #e8eff7; }
.milestone:not(:last-child)::after { position: absolute; content: ''; width: 2px; top: 48px; height: calc(100% - 22px); left: 17px; background: #deebf8; pointer-events: none; }
.milestone-status { z-index: 1; width: 36px; height: 36px; border: 1px solid #dce7f3; border-radius: 50%; display: grid; place-items: center; color: #577697; background: #f4f8fc; }
.milestone-status:not(:disabled):hover { border-color: #6ea1db; color: #245e9e; background: #eaf3fd; }
.active .milestone-status { background: #e8f2ff; border-color: #c3dbf7; color: #3470aa; }
.done .milestone-status { background: #e5effe; color: #2464aa; border-color: #c9def9; }
.milestone-text { min-width: 0; display: grid; gap: 3px; }
.text-button { border: 0; padding: 0; text-align: left; background: transparent; color: var(--text); font-size: 14px; width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
.text-button:not(:disabled):hover { color: #2369ae; text-decoration: underline; }
.milestone-date { font-size: 11px; color: var(--muted); }
.milestone-status.just-done { animation: complete .44s ease-out both; }
@keyframes complete { 0% { transform: scale(.81); } 46% { transform: scale(1.17); box-shadow: 0 0 0 8px #80b7fb68; } 100% { transform: scale(1); box-shadow: 0 0 0 12px transparent; } }
.resource .row-actions .icon-button { width: 29px; height: 34px; }

.modal { max-width: min(460px,calc(100% - 28px)); width: 100%; max-height: min(690px,calc(100dvh - 24px)); border: 1px solid #d5e2f2; border-radius: 15px; color: var(--text); padding: 20px; box-shadow: 0 24px 65px #142b4d40; overscroll-behavior: contain; }
.modal[open] { animation: reveal .17s ease-out; }
.modal::backdrop { background: #17294b82; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 12px; }
.modal h2 { font-size: 21px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.modal p { font-size: 13px; color: #4e6483; line-height: 1.55; overflow-wrap: anywhere; }
.modal-fields { display: grid; gap: 13px; }
.field { display: grid; gap: 5px; min-width: 0; color: #324e76; font-size: 13px; font-weight: 690; }
.field small { font-weight: 500; font-size: 11px; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; min-width: 0; border: 1px solid #cfddf1; padding: 9px 10px; border-radius: 7px; color: var(--text); background: #f7faff; font-weight: 500; font-size: 15px; min-height: 39px; }
.field textarea { resize: vertical; min-height: 78px; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 8px; padding-top: 15px; }
.form-error { color: #923b3a !important; margin-top: 9px; }
.notice { position: fixed; right: 20px; bottom: 20px; z-index: 5; max-width: min(410px,calc(100% - 34px)); border-radius: 9px; padding: 12px 15px; color: #fff; background: #1b477b; font-size: 13px; line-height: 1.5; opacity: 0; transform: translateY(6px); transition: opacity .17s, transform .17s; pointer-events: none; box-shadow: 0 7px 30px #1b3f6930; overflow-wrap: anywhere; }
.notice.visible { opacity: 1; transform: none; }


@media (max-width: 870px) {
}
@media (max-width: 650px) {
  .brand { gap: 6px; padding: 2px 2px; font-size: 18px; }
  .brand img { width: 30px; height: 30px; border-radius: 8px; }
  .account-icon, .account-name { display: none; }
  .top-actions { gap: 5px; }
  .connection { font-size: 11px; gap: 4px; }
  #content { padding: 13px 12px 34px; }
  .section-heading h2 { font-size: 18px; }
  .project-banner { flex-wrap: wrap; padding: 12px; gap: 8px; }
  .project-banner > .tile { width: 37px; height: 37px; }
  .project-banner .detail-progress { flex-basis: 100%; display: flex; gap: 8px; align-items: center; }
  .detail-progress strong { font-size: 15px; }
  .detail-section { padding: 11px 9px; }
  .detail-actions { gap: 0; }
  .detail-actions .icon-button { width: 29px; }
  .button { padding: 0 9px; min-height: 38px; font-size: 12px; }
  .milestone { grid-template-columns: 34px minmax(0,1fr) auto; gap: 5px; }
  .milestone .row-actions { grid-column: 2/-1; justify-self: end; }
  .milestone-status { width: 33px; height: 33px; }
  .milestone .icon-button { height: 32px; width: 34px; }
  .notice { bottom: max(12px,env(safe-area-inset-bottom)); right: 10px; }
}
@media (max-width: 350px) {
  .top-actions .connection { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.site-header { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #dce6f3; background: #fff; padding: 8px clamp(15px, 3.1vw, 46px); }
.site-header .brand { padding: 0; color: #173b72; gap: 9px; font-weight: 780; }
.site-actions, .site-header .top-actions, .site-header .project-actions { display: flex; align-items: center; min-width: 0; }
.site-actions { gap: 9px; }
.site-header .top-actions { gap: 6px; }
.site-header .project-actions:empty, .site-header .account:empty { display: none; }
.site-header .account { border-top: 0; border-left: 1px solid var(--border); padding: 0 0 0 10px; gap: 7px; }
.site-header .account-name { max-width: 154px; }
.site-header .account-icon { width: 32px; height: 32px; background: #eaf1ff; }
.site-header .connection { border: 1px solid #dfe9f8; background: #f5f9ff; border-radius: 20px; min-height: 30px; padding: 0 9px; font-weight: 640; }
.site-header .connection.offline { background: #fff7ea; border-color: #f2dec4; }
.site-header .connection.local { background: #f6f8fb; color: #4f667f; }
.site-header .button-primary { min-height: 40px; border-radius: 10px; background: linear-gradient(130deg,#265faf,#16488c); border-color: #20579f; }
.site-header .button-primary:hover { background: #184786; box-shadow: 0 4px 12px #1f559b35; }

.schedule-heading { display: grid; gap: 6px; margin-bottom: 22px; }
.schedule-heading h1 { color: #122e56; font-size: clamp(31px, 4vw, 49px); line-height: 1.13; letter-spacing: -.055em; }
.schedule-heading p { color: #526f91; font-size: 13px; font-weight: 620; }
.schedule-heading p span { padding: 0 3px; color: #7892b2; }
.schedule-board { background: #fff; border: 1px solid #d8e5f5; border-radius: 17px; overflow: hidden; box-shadow: 0 12px 38px #294b7c0f, 0 2px 4px #294b7c08; }
.schedule-tools, .range-controls, .range-tools { display: flex; align-items: center; gap: 8px; }
.schedule-tools { justify-content: space-between; min-height: 64px; padding: 10px 16px; }
.schedule-tools .search { width: min(265px, 50%); border-color: #dfe8f5; color: #527398; background: #f8faff; }
.schedule-tools .search input { font-size: 13px; }
.range-controls { gap: 2px; white-space: nowrap; padding: 2px; border: 1px solid #dce8f5; border-radius: 10px; background: #f4f8ff; }
.range-controls .icon-button { width: 30px; height: 33px; border-radius: 7px; }
.range-controls .icon-button:hover { background: #e5f0fc; }
.range-controls .previous svg { transform: rotate(180deg); }
.period-label { font-variant-numeric: tabular-nums; text-align: center; color: #315783; font-weight: 650; font-size: 13px; min-width: 115px; }
.return-today { min-height: 39px; }
.schedule-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #e9eff7; padding: 12px 16px; min-height: 42px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: #536b88; font-size: 11px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 13px; height: 13px; display: grid; place-items: center; background: #fff; border-radius: 50%; border: 2px solid #4d83c2; color: #fff; }
.legend-dot.done { background: #235da1; border-color: #235da1; }
.legend-dot.active { background: #c2ddfe; border-color: #3980ce; }
.calendar-warning { color: #526984; font-size: 12px; padding: 0 16px 9px; }
.calendar-warning .button { margin-left: 5px; min-height: 30px; }
.calendar-scroll { --project-width: 237px; overflow-x: auto; overscroll-behavior-x: contain; max-width: 100%; border-block: 1px solid #e5edf7; background: #fff; }
.calendar-scroll:focus-visible { outline-offset: -3px; }
#calendar > .empty { margin: 0 16px 13px; }
.calendar-canvas { min-width: calc(var(--project-width) + 650px); }
.calendar-row { display: grid; grid-template-columns: var(--project-width) minmax(0, 1fr); background: #fff; border-bottom: 1px solid #edf2f8; min-height: 108px; transition: background .18s; }
.calendar-row:first-child + .calendar-row, .calendar-row:first-child { border-top: 0; }
.calendar-row:last-child { border-bottom: 0; }
.calendar-row.alternate { background: #f9fbff; }
.calendar-row:not(.calendar-head):focus-within { background: #f3f8ff; }
@media (hover: hover) {
  .calendar-row:not(.calendar-head):hover { background: #f3f8ff; }
}
.calendar-row.first-lane { border-top: 1px solid #dfe9f5; }
.calendar-head { min-height: 58px; background: #eef4fc; border-bottom-color: #dce8f6; color: #325879; font-size: 12px; font-weight: 720; }
.calendar-project { position: sticky; left: 0; z-index: 4; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; background: inherit; border-right: 1px solid #dce8f5; padding: 11px 15px; }
.calendar-project-link { display: flex; align-items: flex-start; gap: 6px; overflow-wrap: anywhere; }
.calendar-project-link { color: #18375f; font-size: 14px; font-weight: 750; line-height: 1.35; align-items: center; gap: 8px; }
.calendar-project-icon { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border-radius: 9px; color: #2a5eaa; background: #e9f1ff; }
.calendar-project-icon.blue { color: #246286; background: #e8f4ff; }
.calendar-project-icon.gold { color: #8f5e22; background: #fbf2e4; }
.calendar-project-icon.rose { color: #8d496d; background: #faecf4; }
.calendar-project-link:hover { color: #1459a8; text-decoration: underline; text-underline-offset: .15em; }
.calendar-dates { position: relative; min-width: 0; }
.calendar-month { position: absolute; top: 7px; transform: translateX(-50%); white-space: nowrap; font-weight: 650; color: #496d96; font-size: 12px; }
.calendar-month.leading { transform: none; }
.calendar-month.trailing { transform: translateX(-100%); }
.calendar-head .calendar-dates::after { position: absolute; content: ''; left: 18px; right: 18px; bottom: 0; height: 1px; background: #d1e0f3; }
.calendar-tick, .calendar-today-line { position: absolute; inset-block: 0; width: 1px; background: #dfe9f5; pointer-events: none; }
.calendar-today-line { background: #4487d6; z-index: 2; }
.today-flag { position: absolute; z-index: 2; top: 27px; transform: translateX(-50%); border-radius: 12px; padding: 3px 8px; color: white; background: #225fa6; font-size: 10px; white-space: nowrap; }
.calendar-line, .calendar-past { position: absolute; z-index: 1; left: 18px; right: 18px; top: calc(50% - 2px); height: 4px; border-radius: 4px; background: #cfdcee; pointer-events: none; }
.calendar-past { right: auto; background: linear-gradient(90deg,#99c3ee,#5392d6); }
.calendar-marker { position: absolute; z-index: 3; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; background: transparent; padding: 0; border: 0; width: 24px; height: 29px; }
.marker-dot { display: grid; place-items: center; width: 17px; height: 17px; border: 2px solid #367ac3; border-radius: 50%; background: #fff; color: #225f9e; line-height: 1; font-size: 9px; font-weight: 800; transition: transform .2s cubic-bezier(.18,.82,.4,1.4), outline-color .15s; outline: 3px solid transparent; }
.calendar-marker.active .marker-dot { color: #174c89; background: #bbd9fc; box-shadow: 0 0 0 3px #e1eeff; }
.calendar-marker.done .marker-dot { color: white; background: #255e9f; border-color: #255e9f; }
.calendar-marker:hover .marker-dot, .calendar-marker:focus-visible .marker-dot { outline-color: #c1dafa; transform: scale(1.22); }
.marker-label { position: absolute; left: 50%; padding: 3px 4px; min-width: 0; max-width: 104px; overflow: hidden; transform: translateX(-50%); text-overflow: ellipsis; white-space: nowrap; color: #264a75; font-size: 11px; font-weight: 670; line-height: 1.2; }
.slot-0 .marker-label { bottom: 32px; }
.slot-1 .marker-label { top: 32px; }
.edge-start .marker-label { transform: none; left: 0; }
.edge-end .marker-label { transform: translateX(-100%); }
.calendar-marker.done .marker-label { color: #526d8b; }
.calendar-no-nodes { position: absolute; left: 24px; top: calc(50% + 9px); color: #667b96; font-size: 11px; }
.calendar-pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 16px; min-height: 38px; color: #526987; font-size: 12px; }
.calendar-pagination div { display: flex; align-items: center; gap: 7px; }
.calendar-pagination .button { min-height: 31px; font-size: 12px; }
.calendar-node-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.calendar-node-menu span { font-size: 11px; color: #536f91; }
.site-footer { max-width: 1550px; padding: 0 clamp(19px, 2.7vw, 42px) 18px; margin: 0 auto; font-size: 12px; color: var(--muted); }
.site-footer a:hover, .policy p a { text-decoration: underline; }
.policy { max-width: 740px; margin: 0 auto; padding: 32px 20px 44px; line-height: 1.7; }
.policy h1 { font-size: clamp(26px, 5vw, 35px); margin-bottom: 8px; }
.policy h2 { margin-top: 23px; font-size: 18px; }
.policy p { margin-top: 5px; }
.policy .back-link { margin-top: 24px; }
@media (max-width: 900px) {
  .calendar-scroll { --project-width: 178px; }
}
@media (max-width: 650px) {
  .site-header { min-height: 54px; gap: 5px; padding-inline: 10px; }
  .site-header .brand { gap: 5px; }
  .site-header .site-actions, .site-header .top-actions { gap: 3px; }
  .site-header .account { padding-left: 3px; }
  .site-header .icon-button { width: 29px; }
  .site-header .button-primary { min-height: 36px; }
  .site-header .connection:not(.offline) { display: none; }
  .site-header .connection.offline { padding-inline: 4px; font-size: 11px; }
  .schedule-heading { margin-bottom: 13px; gap: 4px; }
  .schedule-heading p { font-size: 12px; }
  .schedule-board { border-radius: 13px; }
  .schedule-tools { gap: 5px; flex-wrap: wrap; padding: 8px; min-height: 0; }
  .range-tools { gap: 4px; }
  .schedule-tools .search { flex: 1; min-width: 122px; }
  .period-label { min-width: 95px; font-size: 11px; }
  .range-controls .icon-button { width: 26px; }
  .schedule-meta { padding: 9px 8px; }
  .legend { gap: 8px; }
  .calendar-scroll { --project-width: clamp(99px, 31vw, 130px); }
  .calendar-project { padding: 9px 7px; }
  .calendar-project-link { font-size: 12px; }
  .calendar-project-icon { width: 19px; height: 19px; border-radius: 5px; }
  .calendar-pagination { padding-inline: 8px; }
  .calendar-project-link svg, .calendar-track-link svg { width: 12px; }
  .calendar-head { font-size: 11px; }
  .calendar-marker { width: 24px; height: 34px; }
  .slot-0 .marker-label { bottom: 32px; }
  .slot-1 .marker-label { top: 32px; }
}
@media (max-width: 360px) {
  .schedule-tools .search { flex-basis: 100%; }
  .site-header .brand span { font-size: 17px; }
}

/* One lane per project: broad pointer target below each milestone. */
.schedule-heading { position: relative; padding-left: 17px; }
.schedule-heading::before { content: ''; position: absolute; inset: 7px auto 4px 0; width: 4px; background: #3679cf; border-radius: 4px; }
.project-row-name { display: grid; gap: 4px; }
.project-row-name small { color: #576f90; font-size: 11px; font-weight: 500; }
.calendar-add-rail { position: absolute; z-index: 2; inset: 50% 18px auto; height: 28px; transform: translateY(-50%); border: 0; padding: 0 5px; border-radius: 9px; background: transparent; display: flex; justify-content: flex-end; align-items: center; color: #245fa8; }
.calendar-add-rail svg { background: #f3f8ff; border: 1px solid #c7dcf6; border-radius: 50%; width: 23px; height: 23px; padding: 3px; margin-right: -12px; }
.calendar-add-rail:hover, .calendar-add-rail:focus-visible { background: #226dcb15; }
.calendar-no-nodes { top: calc(50% + 19px); pointer-events: none; }
.project-sections { display: grid; gap: 18px; align-items: start; grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr); }
.node-excerpt, .node-read-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.node-excerpt { color: #496483; margin: 3px 0 0; font-size: 13px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.modal.drawer { inset: 0 0 0 auto; margin: 0; width: min(100%, 510px); max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 23px 0 0 23px; padding: clamp(20px, 4vw, 34px); box-shadow: -12px 0 65px #142d4830; }
.modal.drawer[open] { animation: drawer-enter .24s cubic-bezier(.21,.7,.22,1) both; }
.drawer .modal-head { margin-bottom: 20px; }
.drawer .modal-buttons { position: sticky; bottom: -34px; background: white; padding-bottom: 10px; }
.drawer-context { display: flex; align-items: center; gap: 8px; color: #365c87; background: #ecf4ff; border-radius: 9px; width: fit-content; max-width: 100%; padding: 7px 10px; margin: 0; overflow-wrap: anywhere; }
.drawer-context svg { flex: 0 0 auto; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.calendar-node-menu button { display: grid; width: 100%; text-align: left; gap: 4px; padding: 11px 8px; }
.calendar-node-menu button span { color: #4e6584; font-size: 12px; }
@keyframes drawer-enter { from { transform: translateX(24px); opacity: .72; } to { transform: none; opacity: 1; } }

body.entry .site-actions { display: none; }
.entry #content { display: grid; align-content: center; min-height: min(670px, 76dvh); }
.entry-card { display: grid; width: min(100%, 880px); min-height: 400px; margin: auto; grid-template-columns: 1fr .9fr; background: white; border: 1px solid #d6e4f6; border-radius: 26px; box-shadow: 0 26px 64px #18396212; overflow: hidden; }
.entry-content { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(26px, 6vw, 70px); }
.entry-content h1 { font-size: clamp(29px, 4.5vw, 46px); margin: 0 0 10px; letter-spacing: -.047em; }
.entry-content p { color: #4c6381; margin: 0 0 30px; }
.entry-content .entry-offline { margin: 12px 0 0; font-size: 13px; }
.google-button { justify-content: center; background: white; color: #26374d; border-color: #b8cce6; border-radius: 12px; min-height: 49px; padding-inline: 18px; transition: box-shadow .2s, transform .2s; }
.google-button:hover { box-shadow: 0 5px 15px #255aab20; transform: translateY(-2px); }
.legacy-link { margin-top: 18px; font-size: 13px; }
.entry-art { isolation: isolate; position: relative; overflow: hidden; background: radial-gradient(ellipse at 76% 20%, #3b83d4, transparent 62%), linear-gradient(135deg,#103468,#154780); }
.entry-grid { position: absolute; inset: 0; background-image: linear-gradient(#cce2ff24 1px,transparent 1px),linear-gradient(90deg,#cce2ff24 1px,transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(130deg,transparent,#000 48%,#000); }
.entry-rail { position: absolute; top: 56%; left: -6%; right: -6%; height: 2px; display: flex; justify-content: space-evenly; align-items: center; background: linear-gradient(90deg, transparent, #9fd1ff 22%, #e7f4ff 54%, #87b8ed 83%, transparent); transform: rotate(-18deg); }
.entry-rail i { width: 10px; height: 10px; border-radius: 50%; background: #e0f2ff; box-shadow: 0 0 0 5px #d4eaff30; }
.entry-rail i:nth-child(3) { width: 18px; height: 18px; box-shadow: 0 0 0 8px #d4eaff38; }
.entry-orbit { position: absolute; top: 30%; left: 46%; display: grid; place-items: center; width: 61px; height: 61px; border: solid 1px #e7f4ff90; border-radius: 19px; color: #f1f8ff; background: #b3dbff29; transform: rotate(-8deg); animation: arrive .55s ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px) rotate(-8deg); } to { opacity: 1; transform: rotate(-8deg); } }
@media (max-width: 640px) {
  .entry-card { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 19px; }
  .entry-art { order: -1; min-height: clamp(112px, 31vw, 175px); }
  .entry-orbit { top: 19%; }
  .entry-content { padding: 30px 24px 36px; }
  .modal.drawer { top: auto; bottom: 0; height: auto; max-height: 94dvh; border-radius: 20px 20px 0 0; }
  .modal.drawer[open] { animation-name: mobile-drawer-enter; }
  .calendar-add-rail { height: 34px; }
}
@keyframes mobile-drawer-enter { from { transform: translateY(20px); opacity: .75; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .modal.drawer[open], .entry-orbit { animation: none; }
}

.calendar-project-icon, .project-banner .tile { overflow: hidden; position: relative; }
.calendar-project-icon img, .project-banner .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #e7effb; }
.node-attachment-count, .attachment-empty, .attachment-type { display: flex; gap: 6px; align-items: center; color: #4d6687; }
.node-attachment-count { margin-top: 4px; font-size: 11px; }
.attachment-empty { margin: 8px 0 4px; font-size: 14px; }
.attachment-fields { background: #f6faff; border: 1px solid #dceafb; border-radius: 15px; padding: 12px; display: grid; gap: 10px; }
.attachment-fields h3 { font-size: 15px; margin: 0; }
.attachment-link-fields { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.attachment-link-fields input, .attachment-name { width: 100%; min-width: 0; border: 1px solid #c8d8eb; border-radius: 8px; padding: 7px 9px; color: #17345c; background: white; }
.attachment-link-fields .button, .attachment-drop .button { font-size: 12px; padding-inline: 10px; }
.attachment-drop { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px 8px; border: 1px dashed #8fade0; border-radius: 10px; color: #3263a1; transition: background .18s; }
.attachment-drop.dragging { background: #dcedff; border-color: #296bc0; }
.attachment-drop strong, .attachment-drop small { display: block; font-size: 12px; }
.attachment-drop small { color: #556b85; }
.attachment-feedback { margin: 0; color: #355576; font-size: 12px; }
.attachment-gallery { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); gap: 9px; }
.attachment-fields .attachment-gallery { grid-template-columns: minmax(0,1fr); }
.attachment { min-width: 0; overflow: hidden; border: 1px solid #dce8f6; border-radius: 12px; background: #fff; }
.attachment-image { height: 136px; position: relative; overflow: hidden; display: grid; place-items: center; color: #5480b0; background: #eef5fd; }
.attachment-fields .attachment-image { height: 116px; }
.attachment-image img, .attachment-image a { position: absolute; inset: 0; width: 100%; height: 100%; }
.attachment-image img { object-fit: contain; }
.attachment-image img:not([src]), .calendar-project-icon img:not([src]), .project-banner .tile img:not([src]) { opacity: 0; }
.attachment-image img[hidden], .calendar-project-icon img[hidden], .project-banner .tile img[hidden] { display: none; }
.attachment-caption { padding: 9px; display: grid; gap: 6px; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; }
.attachment-type { grid-column: 1/-1; font-size: 11px; font-weight: 700; }
.attachment-title { font-size: 13px; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.attachment-title a:hover { text-decoration: underline; }
.attachment-title a svg { display: inline; vertical-align: -.12em; }
.attachment-caption .icon-button { width: 32px; height: 32px; }
.remove-node { justify-self: start; display: inline-flex; align-items: center; gap: 6px; color: #a32d42; font-size: 13px; }
@media (max-width: 420px) {
  .attachment-drop { grid-template-columns: minmax(0,1fr) auto; }
  .attachment-drop > svg { display: none; }
}

.calendar-quick { display: none; }
.calendar-add-rail { cursor: crosshair; }
.calendar-rail-peek { position: absolute; bottom: calc(100% + 4px); transform: translateX(-50%); left: var(--peek-left); border-radius: 7px; background: #215caa; color: #fff; font-size: 11px; padding: 3px 7px; opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity .13s; }
@media (hover: hover) and (pointer: fine) {
  .calendar-add-rail:hover .calendar-rail-peek:not(:empty) { opacity: 1; }
}
@media (max-width: 850px) {
  .project-sections { grid-template-columns: minmax(0,1fr); }
  .calendar-quick { display: flex; gap: 5px; align-items: center; align-self: flex-start; height: 24px; padding: 0; font-size: 11px; font-weight: 650; color: #265f9f; }
}

.calendar-help { display: flex; align-items: center; gap: 7px; margin: 0; padding: 7px 14px 9px; color: #4a6382; font-size: 12px; background: #fff; border-bottom: 1px solid #dce8f5; }
.calendar-help svg { color: #316eb7; }
.help-mobile { display: none; }
.workspace-empty { padding: clamp(32px, 7vw, 70px) 18px; }
.workspace-empty .button { margin-top: 7px; }
.empty-emblem { width: 57px; height: 57px; border-radius: 17px; display: grid; place-items: center; margin: auto auto 12px; color: #2b68b3; background: #e8f2ff; box-shadow: 0 0 0 5px #f5f9ff; }
.preview-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 11px 0; border-bottom: 1px solid #e5edf8; font-size: 14px; color: #3e5779; }
.preview-meta > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.preview-notes, .preview-attachments { min-width: 0; display: grid; gap: 8px; }
.preview-notes h3, .preview-attachments h3 { font-size: 15px; margin: 0; }
.node-read-note { color: #263f60; line-height: 1.7; padding: 12px; margin: 0; border-radius: 10px; background: #f5f9ff; }
.node-read-note a { color: #215fa7; text-decoration: underline; text-underline-offset: 3px; }
.preview-attachments .attachment-gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 174px), 1fr)); }
.app-update { position: fixed; z-index: 9; display: flex; align-items: center; gap: 9px; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); padding: 10px 12px; border-radius: 13px; border: 1px solid #c6daf4; color: #1f4e87; background: #f6faff; box-shadow: 0 12px 32px #143e7225; font-size: 13px; animation: settle .2s ease-out both; }
.app-update[hidden] { display: none; }
.app-update .button { min-height: 32px; }
.button-primary:active, .calendar-quick:active { transform: translateY(1px) scale(.98); }
.calendar-add-rail svg { transition: color .16s, background .16s, transform .16s; }
.calendar-add-rail:hover svg { background: #2b67aa; color: #fff; transform: scale(1.11); }
.calendar-rail-peek { transition: opacity .13s, translate .13s; translate: 0 3px; }
.calendar-add-rail:hover .calendar-rail-peek:not(:empty) { translate: 0 0; }
.attachment.just-added { animation: settle .22s cubic-bezier(.2,.7,.3,1) both; }
.drawer .preview-meta, .drawer .field-pair { animation: settle .19s ease-out both; }
@keyframes settle { from { opacity: .72; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (max-width: 850px) {
  .help-desktop { display: none; }
  .help-mobile { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .app-update, .attachment.just-added, .drawer .preview-meta, .drawer .field-pair { animation: none; }
  .button-primary:active, .calendar-quick:active, .calendar-add-rail:hover svg { transform: none; }
}
