:root {
  --bg: #f4efe5;
  --card: #fffdf8;
  --ink: #1e2a2a;
  --muted: #6f7774;
  --line: #d9d4ca;
  --accent: #2f6f62;
  --accent-soft: #dfece7;
  --warn: #a76d2a;
  --bad: #9c4d44;
  --good: #4d7452;
  --shadow: 0 10px 30px rgba(30,42,42,.08);
}
* { box-sizing: border-box; }
body { margin:0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:var(--bg); color:var(--ink); }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
#app { min-height:100vh; }
.loading-shell { padding:40px; text-align:center; color:var(--muted); }
.shell { max-width:1500px; margin:0 auto; padding:18px; }
.topbar { display:flex; gap:14px; justify-content:space-between; align-items:center; margin-bottom:14px; flex-wrap:wrap; }
.brand { display:flex; align-items:baseline; gap:10px; }
.brand h1 { font-size:22px; margin:0; }
.brand small { color:var(--muted); }
.identity { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.pill { border:1px solid var(--line); background:var(--card); border-radius:999px; padding:7px 11px; }
.tabs { display:flex; gap:6px; overflow:auto; padding-bottom:8px; }
.tab { border:1px solid var(--line); background:transparent; padding:9px 13px; border-radius:10px; white-space:nowrap; }
.tab.active { background:var(--ink); color:white; border-color:var(--ink); }
.panel { display:none; }
.panel.active { display:block; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); }
.section-head { display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-bottom:12px; }
.section-head h2 { margin:0; font-size:18px; }
.muted { color:var(--muted); }
.small { font-size:12px; }
.btn { border:1px solid var(--line); background:var(--card); padding:9px 12px; border-radius:10px; color:var(--ink); }
.btn.primary { background:var(--accent); color:white; border-color:var(--accent); }
.btn.ghost { background:transparent; }
.btn.danger { color:var(--bad); }
.input, select, textarea { width:100%; border:1px solid var(--line); background:white; border-radius:9px; padding:9px 10px; color:var(--ink); }
label { display:block; font-size:12px; color:var(--muted); margin-bottom:5px; }
.grid2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.grid3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.form-row { margin-bottom:10px; }
.list { display:grid; gap:8px; }
.item { border:1px solid var(--line); border-radius:11px; padding:10px; background:var(--card); }
.item-title { font-weight:650; }
.meta { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:6px; }
.tag { padding:3px 7px; border-radius:999px; background:#ece9e1; font-size:11px; color:#4d5552; }
.tag.good { background:#e3eee3; color:var(--good); }
.tag.warn { background:#f2e7d6; color:var(--warn); }
.tag.bad { background:#f1dfdc; color:var(--bad); }
.planning-layout { display:grid; grid-template-columns:270px minmax(0,1fr) 250px; gap:12px; align-items:start; }
.sidebar { padding:12px; position:sticky; top:10px; max-height:calc(100vh - 40px); overflow:auto; }
.daytabs { display:flex; gap:5px; overflow:auto; padding:0 0 8px; }
.daybtn { border:1px solid var(--line); background:var(--card); border-radius:9px; padding:8px 10px; min-width:58px; }
.daybtn.active { background:var(--accent-soft); border-color:var(--accent); color:var(--accent); font-weight:700; }
.calendar-wrap { overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--card); max-height:78vh; }
table.calendar { border-collapse:separate; border-spacing:0; min-width:760px; width:100%; font-size:13px; }
.calendar th,.calendar td { border-right:1px solid var(--line); border-bottom:1px solid var(--line); vertical-align:top; }
.calendar th { position:sticky; top:0; z-index:5; background:#f6f3ed; padding:8px; text-align:left; }
.calendar .time { position:sticky; left:0; z-index:4; background:#faf8f2; width:68px; padding:7px; white-space:nowrap; font-weight:650; }
.calendar th.time { z-index:8; }
.slot { min-height:47px; padding:4px; transition:background .12s, outline .12s; }
.slot.dragover { background:var(--accent-soft); outline:2px solid var(--accent); outline-offset:-2px; }
.drag-card { border:1px solid var(--line); border-radius:9px; background:white; padding:8px; margin:2px 0; cursor:grab; box-shadow:0 2px 7px rgba(0,0,0,.04); }
.drag-card:active { cursor:grabbing; }
.drag-card .title { font-weight:650; }
.drag-card .sub { font-size:11px; color:var(--muted); margin-top:3px; }
.need-card { border-left:4px solid var(--warn); }
.need-card.planned { border-left-color:var(--accent); }
.need-card.addressed { border-left-color:var(--good); opacity:.72; }
.activity-card { border-left:4px solid var(--accent); }
.activity-card.drop-target { outline:2px dashed var(--warn); }
.auth-screen { max-width:520px; margin:12vh auto 0; padding:22px; }
.auth-screen h1 { margin-top:0; }
.person-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
.person-btn { text-align:left; border:1px solid var(--line); background:white; padding:11px; border-radius:10px; }
.person-btn.suggested { border-color:var(--accent); background:var(--accent-soft); }
.statusbar { position:fixed; right:14px; bottom:14px; background:rgba(30,42,42,.92); color:white; border-radius:9px; padding:8px 11px; font-size:12px; opacity:0; pointer-events:none; transition:opacity .2s; }
.statusbar.show { opacity:1; }
.empty { padding:12px; border:1px dashed var(--line); border-radius:10px; color:var(--muted); text-align:center; }
.vote-row { display:flex; gap:5px; margin-top:8px; }
.vote { border:1px solid var(--line); background:white; border-radius:8px; padding:5px 8px; font-size:12px; }
.vote.active { background:var(--accent-soft); border-color:var(--accent); }
.checkbox-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.check { display:flex; gap:6px; align-items:center; font-size:12px; color:var(--ink); }
.check input { width:auto; }
.log { display:grid; gap:7px; }
.log-row { border-bottom:1px solid var(--line); padding:8px 0; }
@media (max-width:1050px){ .planning-layout{grid-template-columns:1fr;} .sidebar{position:static;max-height:none;} }
@media (max-width:650px){ .shell{padding:10px;} .grid2,.grid3{grid-template-columns:1fr;} .person-grid{grid-template-columns:1fr;} .checkbox-grid{grid-template-columns:repeat(2,minmax(0,1fr));} }
.shopping-item { display:grid; gap:10px; }
.shopping-item.shopping-done { opacity:.72; }
.shopping-head { display:flex; gap:10px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; }
.shopping-title { margin:0; color:var(--ink); font-size:14px; }
.bringing-label { font-size:11px; color:var(--muted); font-weight:650; }
.bringing-grid { display:flex; gap:6px; flex-wrap:wrap; }
.bring-person { display:flex; align-items:center; gap:5px; margin:0; padding:6px 8px; border:1px solid var(--line); border-radius:999px; background:white; color:var(--ink); font-size:12px; cursor:pointer; }
.bring-person input { width:auto; margin:0; }
.bring-person.active { background:var(--accent-soft); border-color:var(--accent); color:var(--accent); }

/* Day titles */
.planning-layout > main { min-width:0; }
.daybtn { display:flex; flex-direction:column; align-items:flex-start; gap:2px; max-width:150px; }
.day-code { font-weight:700; }
.day-tab-title { max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:500; color:var(--muted); }
.daybtn.active .day-tab-title { color:var(--accent); }
.day-title-editor { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; margin-bottom:8px; box-shadow:none; }
.day-title-copy { display:flex; flex-direction:column; gap:2px; min-width:max-content; }
.day-title-form { display:flex; gap:6px; flex:1; max-width:560px; }
.day-title-form .input { min-width:0; }

/* Phone-friendly planning width */
@media (max-width:650px){
  .planning-layout > main { order:1; }
  .planning-layout > aside:first-child { order:2; }
  .planning-layout > aside:last-child { order:3; }
  .daytabs { gap:4px; }
  .daybtn { min-width:64px; max-width:96px; padding:6px 7px; }
  .day-tab-title { max-width:80px; }
  .day-title-editor { align-items:stretch; flex-direction:column; gap:7px; }
  .day-title-copy { flex-direction:row; align-items:baseline; gap:8px; min-width:0; }
  .day-title-form { width:100%; max-width:none; }
  .calendar-wrap { width:100%; max-width:100%; overflow-x:auto; }
  table.calendar { min-width:0; width:100%; table-layout:fixed; font-size:11px; }
  .calendar .time { width:44px; min-width:44px; padding:5px 3px; font-size:10px; }
  .calendar th:not(.time) { width:calc((100% - 44px)/3); padding:6px 3px; text-align:center; }
  .calendar td { min-width:0; overflow:hidden; }
  .slot { min-height:42px; padding:2px; }
  .calendar .drag-card { min-width:0; padding:5px; border-radius:7px; font-size:10px; overflow-wrap:anywhere; word-break:break-word; }
  .calendar .drag-card .sub { font-size:9px; }
  .calendar .tag { font-size:9px; padding:2px 4px; white-space:normal; overflow-wrap:anywhere; }
  .calendar .meta { gap:3px; }
}
@media (max-width:440px){
  .shell { padding:7px; }
  .topbar { margin-bottom:8px; }
  .tabs { gap:4px; }
  .tab { padding:7px 9px; }
  .plan-long { display:none; }
  .calendar .activity-card .sub { display:none; }
  .calendar .time { width:38px; min-width:38px; }
  .calendar th:not(.time) { width:calc((100% - 38px)/3); }
}

/* Parallel-plan participation */
.activity-top { display:flex; align-items:flex-start; justify-content:space-between; gap:6px; }
.activity-top > div:first-child { min-width:0; }
.join-toggle { flex:0 0 auto; width:28px; height:28px; border:1px solid var(--line); background:white; border-radius:999px; display:grid; place-items:center; padding:0; font-weight:800; color:var(--muted); }
.join-toggle.active { background:var(--accent); color:white; border-color:var(--accent); }
.activity-join-row { display:flex; align-items:center; gap:4px; flex-wrap:wrap; margin-top:6px; min-height:20px; }
.activity-people { display:flex; align-items:center; gap:3px; flex-wrap:wrap; }
.person-dot { width:22px; height:22px; border-radius:999px; display:grid; place-items:center; border:1px solid var(--line); background:var(--accent-soft); color:var(--accent); font-size:9px; font-weight:800; line-height:1; }
.no-one { font-size:10px; }

/* Touch drag + tap-to-place fallback */
.touch-ghost { position:fixed !important; inset:0 auto auto 0; z-index:9999; pointer-events:none; opacity:.88; margin:0 !important; box-shadow:0 12px 30px rgba(30,42,42,.24); transform-origin:top left; }
body.touch-dragging { user-select:none; -webkit-user-select:none; }
.slot.touch-over { background:var(--accent-soft); outline:2px solid var(--accent); outline-offset:-2px; }
.tap-place-active .slot.tap-target { outline:1px dashed rgba(47,111,98,.45); outline-offset:-2px; }
.tap-place-active .activity-card.tap-target { outline:1px dashed rgba(167,109,42,.55); }
.tap-place-bar { position:fixed; left:50%; bottom:12px; transform:translateX(-50%); z-index:10000; width:min(92vw,560px); display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border-radius:12px; background:rgba(30,42,42,.95); color:white; box-shadow:0 10px 30px rgba(0,0,0,.22); font-size:12px; }
.tap-place-bar .tap-cancel { border:0; border-radius:8px; background:white; color:var(--ink); padding:6px 9px; }

@media (pointer:coarse){
  .drag-card[draggable="true"] { cursor:default; -webkit-touch-callout:none; }
  .join-toggle { width:30px; height:30px; }
}

@media (max-width:650px){
  .calendar .activity-join-row { margin-top:4px; }
  .calendar .person-dot { width:18px; height:18px; font-size:8px; }
  .calendar .join-toggle { width:23px; height:23px; font-size:11px; }
  .calendar .no-one { display:none; }
}


/* v6: shopping status + deletion */
.drag-card { position:relative; padding-right:34px; }
.card-corner { position:absolute; top:5px; right:5px; z-index:3; }
.icon-btn { width:25px; height:25px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.92); color:var(--muted); padding:0; display:grid; place-items:center; font-size:16px; line-height:1; cursor:pointer; }
.icon-btn:hover { border-color:var(--bad); color:var(--bad); }
.activity-actions { display:flex; gap:4px; flex:0 0 auto; align-items:center; }
.activity-actions .icon-btn { position:static; }
.shopping-head-actions { display:flex; gap:6px; align-items:center; }
.shopping-status-row { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.shop-segment { display:inline-flex; gap:0; border:1px solid var(--line); border-radius:9px; overflow:hidden; background:white; }
.shop-status { border:0; border-right:1px solid var(--line); background:white; color:var(--muted); padding:7px 10px; font-size:12px; }
.shop-status:last-child { border-right:0; }
.shop-status.active { background:var(--accent-soft); color:var(--accent); font-weight:700; }
.shop-status.active.bought { background:#e3eee3; color:var(--good); }
.shop-claim-summary { display:flex; gap:5px; flex-wrap:wrap; align-items:center; }
.shop-claim { display:inline-flex; align-items:center; padding:4px 7px; border-radius:999px; background:#f2e7d6; color:var(--warn); font-size:11px; }
.shop-claim.bought { background:#e3eee3; color:var(--good); }

@media (max-width:650px){
  .shopping-status-row { align-items:stretch; flex-direction:column; gap:6px; }
  .shop-segment { width:100%; }
  .shop-status { flex:1; padding:9px 6px; }
  .calendar .drag-card { padding-right:27px; }
  .calendar .icon-btn { width:21px; height:21px; font-size:13px; }
  .calendar .activity-actions { gap:2px; }
}

/* v7: Mac Calendar-style direct activity creation */
.calendar { --slot-h:48px; }
.calendar tbody tr { height:var(--slot-h); }
.calendar td { overflow:visible; }
.slot { position:relative; height:var(--slot-h); min-height:var(--slot-h); box-sizing:border-box; }
.calendar-event { position:absolute; z-index:5; top:2px; left:2px; right:2px; height:calc(var(--span-slots) * var(--slot-h) - 4px); margin:0; overflow:hidden; box-sizing:border-box; }
.calendar-event:hover { z-index:7; }
.calendar-hint { margin:0 0 8px; padding:8px 10px; border:1px dashed var(--line); border-radius:9px; color:var(--muted); font-size:12px; background:rgba(255,255,255,.45); }
.slot.create-selected { background:var(--accent-soft); box-shadow:inset 2px 0 var(--accent), inset -2px 0 var(--accent); }
.slot.create-first::after { content:attr(data-create-label); position:absolute; left:5px; top:5px; z-index:12; max-width:calc(100% - 10px); padding:3px 5px; border-radius:6px; background:var(--accent); color:white; font-size:10px; font-weight:750; pointer-events:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.calendar-creating { user-select:none; -webkit-user-select:none; }
.edit-btn { font-size:13px; }

.modal-backdrop { position:fixed; inset:0; z-index:20000; display:grid; place-items:center; padding:16px; background:rgba(24,31,30,.42); backdrop-filter:blur(3px); }
.activity-modal { width:min(560px,100%); max-height:calc(100vh - 32px); overflow:auto; padding:16px; }
.modal-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:12px; }
.modal-head h2 { margin:0 0 2px; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.activity-end-preview { margin:-3px 0 12px; padding:8px 10px; border-radius:8px; background:#f6f3ed; color:var(--muted); font-size:12px; }
.activity-self-join { display:flex; align-items:flex-start; gap:8px; padding:10px; border:1px solid var(--line); border-radius:9px; background:white; }
.activity-self-join input { width:auto; margin-top:2px; }

@media (max-width:650px){
  .calendar { --slot-h:44px; }
  .calendar td { overflow:visible; }
  .calendar-event { padding:5px 27px 5px 5px; }
  .calendar-hint { font-size:11px; }
  .modal-backdrop { place-items:end center; padding:8px; }
  .activity-modal { width:100%; max-height:calc(100vh - 16px); border-radius:16px 16px 10px 10px; padding:14px; }
  .modal-actions .btn { flex:1; min-height:44px; }
}

/* v8: mythic avatars — always secondary to the real name */
.identity-pill { display:inline-flex; align-items:center; gap:5px; max-width:min(72vw,320px); }
.identity-avatar { font-size:16px; line-height:1; }
.identity-nick { color:var(--muted); font-weight:600; }
.person-picker-avatar { margin-top:5px; display:flex; align-items:center; gap:5px; color:var(--accent); font-size:12px; font-weight:700; }

.person-chip { display:inline-flex; align-items:center; gap:4px; min-width:0; max-width:100%; padding:2px 6px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.78); color:var(--ink); font-size:11px; line-height:1.25; vertical-align:middle; }
.person-avatar-icon { flex:0 0 auto; font-size:12px; line-height:1; }
.person-real-name { min-width:0; overflow-wrap:anywhere; font-weight:750; }
.person-avatar-name { color:var(--muted); font-weight:600; }
.person-title { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.idea-authors { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.idea-authors > span:last-child { color:var(--muted); }
.requested-by { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.requested-by .person-chip { padding:1px 5px; font-size:10px; }
.shop-claim { gap:5px; }
.shop-claim .person-chip { border:0; background:transparent; padding:0; font-size:inherit; }

.activity-people { gap:4px; }
.activity-person { padding:2px 5px; font-size:10px; }
.activity-person .person-avatar-icon { font-size:11px; }

.avatar-modal { width:min(760px,100%); max-height:calc(100vh - 32px); overflow:auto; padding:16px; }
.avatar-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-bottom:10px; }
.avatar-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.avatar-option { min-width:0; display:grid; grid-template-columns:42px minmax(0,1fr); gap:10px; align-items:center; text-align:left; padding:10px; border:1px solid var(--line); border-radius:11px; background:white; color:var(--ink); cursor:pointer; }
.avatar-option:hover { border-color:var(--accent); }
.avatar-option.selected { border-color:var(--accent); background:var(--accent-soft); box-shadow:inset 0 0 0 1px var(--accent); }
.avatar-option-icon { width:42px; height:42px; border-radius:999px; display:grid; place-items:center; background:#f6f3ed; font-size:24px; }
.avatar-option-copy { display:flex; min-width:0; flex-direction:column; gap:2px; }
.avatar-option-copy strong { font-size:13px; }
.avatar-option-copy small { color:var(--muted); line-height:1.25; overflow-wrap:anywhere; }
.avatar-footer { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.avatar-footer-right { display:flex; gap:8px; justify-content:flex-end; }

@media (max-width:650px){
  .identity-nick { display:none; }
  .person-chip { font-size:10px; padding:2px 4px; }
  .activity-person { max-width:100%; }
  .activity-person .person-real-name { white-space:normal; }
  .avatar-modal { width:100%; max-height:calc(100vh - 16px); padding:14px; border-radius:16px 16px 10px 10px; }
  .avatar-toolbar { grid-template-columns:1fr; }
  .avatar-grid { grid-template-columns:1fr; }
  .avatar-option { min-height:58px; }
  .avatar-footer { align-items:stretch; flex-direction:column; }
  .avatar-footer-right { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .avatar-footer > .btn, .avatar-footer-right .btn { min-height:44px; }
}

/* final: People page + exclusive mythic avatars */
.people-page { padding-top:2px; }
.people-head { align-items:flex-start; gap:12px; }
.people-head h2 { margin:0 0 3px; }
.people-head p { margin:0; max-width:620px; }
.people-profile-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.person-profile-card { min-width:0; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--card); display:flex; flex-direction:column; gap:8px; }
.person-profile-card.is-me { border-color:var(--accent); }
.person-profile-top { display:flex; align-items:center; gap:10px; min-width:0; }
.person-profile-avatar { width:52px; height:52px; flex:0 0 52px; display:grid; place-items:center; border-radius:50%; background:#f6f3ed; font-size:28px; border:1px solid var(--line); }
.person-profile-avatar.empty-avatar { font-size:18px; font-weight:800; color:var(--muted); }
.person-profile-copy { min-width:0; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.person-profile-copy h3 { margin:0; font-size:17px; overflow-wrap:anywhere; }
.you-label { padding:2px 6px; border-radius:999px; background:var(--accent-soft); color:var(--accent); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.persona-name { font-size:15px; font-weight:800; }
.persona-vibe { margin:0; color:var(--muted); font-size:12px; line-height:1.35; min-height:34px; }
.person-profile-card .btn { margin-top:auto; align-self:flex-start; }
.avatar-option.taken { opacity:.48; cursor:not-allowed; filter:saturate(.65); }
.avatar-option.taken:hover { border-color:var(--line); }
.avatar-taken-label { margin-top:3px; color:var(--bad); font-size:10px; font-weight:800; }

@media (max-width:900px){ .people-profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px){
  .people-head { flex-direction:column; }
  .people-head > .btn { width:100%; min-height:44px; }
  .people-profile-grid { grid-template-columns:1fr; }
  .person-profile-card { display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-areas:"top top" "persona persona" "vibe vibe" "button button"; }
  .person-profile-top { grid-area:top; }
  .persona-name { grid-area:persona; }
  .persona-vibe { grid-area:vibe; min-height:0; }
  .person-profile-card .btn { grid-area:button; width:100%; min-height:44px; }
}

/* v10: edit ideas after creation */
.idea-card { padding-right:64px; }
.idea-card-actions { display:flex; gap:4px; align-items:center; }
.idea-card-actions .edit-btn:hover { border-color:var(--accent); color:var(--accent); }
@media (max-width:650px){
  .idea-card { padding-right:58px; }
}


/* v11: sortable, day-relevant Ideas page */
.idea-pool-section { min-width:0; }
.idea-toolbar { margin-bottom:10px; padding:10px; display:flex; gap:12px; align-items:flex-end; justify-content:space-between; }
.idea-filter-block { min-width:0; flex:1 1 auto; }
.idea-toolbar-label { display:block; margin-bottom:6px; font-weight:700; }
.idea-day-filter { display:flex; gap:6px; flex-wrap:wrap; }
.idea-day-chip { border:1px solid var(--line); background:var(--card); color:var(--text); border-radius:10px; min-height:34px; padding:6px 9px; font:inherit; font-size:12px; font-weight:800; cursor:pointer; display:flex; align-items:center; gap:5px; }
.idea-day-chip span { max-width:110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-weight:600; }
.idea-day-chip.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.idea-sort-control { flex:0 0 180px; }
.idea-sort-control select { width:100%; }
.idea-group-head { margin:12px 2px 7px; padding:8px 2px 5px; border-bottom:1px solid var(--line); }
.idea-group-head:first-child { margin-top:0; }
.idea-group-head div { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.idea-group-head strong { font-size:13px; }
.idea-group-head span { color:var(--muted); font-size:11px; }
.idea-group-head.other { margin-top:18px; }
.idea-sorted-list .idea-card { margin-bottom:0; }

@media (max-width:700px){
  .idea-toolbar { align-items:stretch; flex-direction:column; }
  .idea-sort-control { flex:1 1 auto; width:100%; }
  .idea-day-filter { flex-wrap:nowrap; overflow-x:auto; padding-bottom:2px; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
  .idea-day-chip { flex:0 0 auto; min-height:40px; }
  .idea-day-chip span { max-width:84px; }
}


/* v12: proposed ideas surfaced in the planner */
.day-proposals { margin:0 0 8px; padding:10px; box-shadow:none; border-style:dashed; background:rgba(255,255,255,.5); }
.day-proposals-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:8px; }
.day-proposals-head > div { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.day-proposal-list { display:flex; gap:7px; flex-wrap:wrap; }
.day-proposal-card { min-width:210px; flex:1 1 240px; display:flex; align-items:center; justify-content:space-between; gap:9px; padding:8px 9px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.72); }
.day-proposal-copy { min-width:0; }
.day-proposal-copy .title { overflow-wrap:anywhere; }
.proposal-confirm-btn { flex:0 0 auto; position:relative; z-index:4; }
.proposal-ghost { position:absolute; z-index:2; top:3px; left:calc(var(--proposal-left,0%) + 3px); width:calc(var(--proposal-width,300%) - 6px); height:calc(var(--span-slots) * var(--slot-h) - 6px); min-height:36px; box-sizing:border-box; display:flex; align-items:flex-start; justify-content:space-between; gap:8px; padding:7px 8px; border:1.5px dashed rgba(47,111,98,.66); border-radius:9px; background:rgba(214,235,228,.54); color:var(--ink); overflow:hidden; pointer-events:none; backdrop-filter:blur(.5px); }
.proposal-ghost-copy { min-width:0; display:flex; align-items:baseline; gap:6px; flex-wrap:wrap; line-height:1.2; }
.proposal-ghost-copy strong { font-size:12px; overflow-wrap:anywhere; }
.proposal-ghost-copy > span:last-child { font-size:10px; color:var(--muted); white-space:nowrap; }
.proposal-kicker { font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.055em; color:var(--accent); }
.proposal-ghost .proposal-confirm-btn { pointer-events:auto; background:rgba(255,255,255,.9); }
.timing-required-note { color:var(--accent); font-weight:700; margin-top:4px; }
.calendar-event { z-index:5; }

@media (max-width:650px){
  .day-proposal-list { display:grid; grid-template-columns:1fr; }
  .day-proposal-card { min-width:0; flex:none; }
  .day-proposal-card .btn { min-height:38px; }
  .proposal-ghost { padding:5px 6px; gap:4px; }
  .calendar td.proposal-origin-cell { overflow:visible; }
  .proposal-ghost-copy { gap:4px; }
  .proposal-ghost-copy strong { font-size:10px; }
  .proposal-ghost-copy > span:last-child { font-size:9px; }
  .proposal-ghost .btn.small { min-height:30px; padding:3px 6px; font-size:9px; }
}

.group-need-chip{font-weight:700;}


/* v15: overlapping proposed ideas share the planner width instead of stacking */
.calendar td.proposal-origin-cell { overflow:visible; }
.proposal-ghost { transition:left .12s ease,width .12s ease; }


/* v16: put scheduled ideas/needs back into their stacks */
.put-back-btn:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.linked-need-tag { margin-top:5px; display:flex; align-items:center; justify-content:space-between; gap:6px; max-width:100%; }
.linked-need-tag > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.linked-need-tag .put-back-btn { width:19px; height:19px; min-width:19px; font-size:12px; background:rgba(255,255,255,.72); }
@media (max-width:650px){
  .calendar .need-card .card-corner { display:flex; gap:2px; }
  .calendar .need-card { padding-right:72px; }
}
