/* The shared palette preserves the warm paper, brass and evergreen character
   in both modes, while system fonts avoid third-party requests for private plans. */
:root{color-scheme:light;--bg:#f5f2e9;--surface:#fffdf8;--surface2:#eeece2;--ink:#203b34;--muted:#6d7569;--line:#dedbce;--gold:#a38145;--accent:#1b5145;--accent-soft:#e7eee6;--danger:#a24339;--danger-soft:#faebe7;--shadow:0 12px 40px #23362a09;--radius:16px;font-family:Inter,"Segoe UI",system-ui,sans-serif;font-size:15px}
:root[data-theme=dark]{color-scheme:dark;--bg:#13201c;--surface:#1b2a24;--surface2:#23362d;--ink:#f0eee2;--muted:#b2b9aa;--line:#36473a;--gold:#d5b878;--accent:#d1e7d7;--accent-soft:#2b4435;--danger:#f3a99b;--danger-soft:#422b28;--shadow:0 12px 40px #0002}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:100px}body{margin:0;background:var(--bg);color:var(--ink);line-height:1.6}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}a{color:var(--accent);text-underline-offset:3px}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--gold);outline-offset:3px}button{border:0}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.2}h1,h2,.brand{font-family:Georgia,"Times New Roman",serif;font-weight:400}h1{font-size:clamp(2.3rem,5vw,4.1rem);letter-spacing:-.04em;margin-bottom:16px}h2{font-size:1.55rem;margin-bottom:8px}h3{font-size:1.03rem;font-weight:600}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}[hidden]{display:none!important}.site-header{height:85px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:0 max(24px,calc((100vw - 1280px)/2));gap:20px}.brand{font-size:1.9rem;text-decoration:none;color:var(--ink);white-space:nowrap;display:flex;align-items:center;gap:10px}.brand-mark{color:var(--gold);font-size:2.5rem;line-height:1}.brand-dot{color:var(--gold);margin-left:-10px}.header-right{display:flex;align-items:center;gap:24px}.header-tagline{color:var(--muted);font-size:.8rem}.icon-button{background:transparent;color:var(--ink);border:1px solid var(--line);border-radius:50%;height:42px;width:42px;display:inline-flex;align-items:center;justify-content:center;font-size:1.3rem;flex-shrink:0}.icon-button:hover{background:var(--surface2)}.site-footer{max-width:1280px;margin:70px auto 0;border-top:1px solid var(--line);padding:23px 24px 28px;color:var(--muted);display:flex;justify-content:space-between;font-size:.8rem}.footer-ornament{color:var(--gold);letter-spacing:4px}.eyebrow{font-size:.7rem;letter-spacing:.19em;text-transform:uppercase;font-weight:650;color:var(--gold);margin-bottom:15px}.muted{color:var(--muted)}.small{font-size:.8rem}.button{min-height:44px;padding:10px 18px;border-radius:8px;background:var(--accent);color:var(--surface);font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;line-height:1.4}.button:hover{filter:brightness(1.1)}.button.secondary{background:transparent;color:var(--ink);border:1px solid var(--line)}.button.soft{background:var(--accent-soft);color:var(--accent)}.button.danger{background:var(--danger);color:var(--surface)}.button.small-button{font-size:.8rem;padding:7px 11px;min-height:38px}.text-button{background:transparent;color:var(--accent);padding:10px 0;font-weight:600;display:inline-flex;gap:6px;align-items:center}.notice{background:var(--surface2);padding:12px 16px;border-radius:8px;color:var(--muted);font-size:.85rem}.error{background:var(--danger-soft);color:var(--danger);padding:10px 14px;border-radius:8px;margin:12px 0;font-size:.85rem}.loading{text-align:center;padding:100px 20px;color:var(--muted)}.ornament{color:var(--gold);font-size:3rem}.field{display:flex;flex-direction:column;gap:6px;margin-bottom:18px}.field label,.field-label{font-size:.85rem;font-weight:600}.field small{color:var(--muted);font-size:.76rem}input,textarea,select{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:11px 12px;min-width:0;max-width:100%;width:100%}textarea{resize:vertical;min-height:85px;line-height:1.5}input[type=checkbox],input[type=radio]{width:18px;height:18px;accent-color:var(--accent);flex-shrink:0;margin:0}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:22px}.inline-form{display:flex;align-items:flex-end;gap:10px}.inline-form textarea{min-height:46px;flex:1}.inline-form .button{flex-shrink:0}.form-note{font-size:.73rem;color:var(--muted);margin-top:7px}.check-label{display:flex;align-items:center;gap:10px;padding:10px 0;cursor:pointer}.empty{text-align:center;color:var(--muted);padding:28px 16px}.empty svg{width:32px;height:32px;color:var(--gold);margin-bottom:8px}.empty p{font-size:.85rem;margin-bottom:0}.empty h3{color:var(--ink);margin-bottom:8px}.landing{max-width:1160px;margin:60px auto 0;padding:0 24px}.hero{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:70px;position:relative;padding:40px 0 50px}.hero-copy{position:relative;z-index:1}.hero h1 em{font-weight:400;color:var(--gold)}.hero-description{color:var(--muted);font-size:1.05rem;max-width:440px}.hero-ornament{font-size:.9rem;color:var(--gold);letter-spacing:8px;margin:28px 0}.create-card{background:var(--surface);border:1px solid var(--line);padding:32px;border-radius:var(--radius);box-shadow:var(--shadow);position:relative}.create-card:before,.create-card:after{content:"";position:absolute;width:28px;height:28px;pointer-events:none;border-color:var(--gold);border-style:solid;opacity:.7}.create-card:before{left:8px;top:8px;border-width:1px 0 0 1px}.create-card:after{right:8px;bottom:8px;border-width:0 1px 1px 0}.create-card h2{font-size:1.9rem}.create-card .button{width:100%}.create-card p{margin-bottom:24px}.features{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;padding-top:30px;border-top:1px solid var(--line)}.feature{padding:15px 15px 15px 0;display:flex;gap:15px}.feature>svg{color:var(--gold);margin-top:3px}.feature h3{margin-bottom:8px}.feature p{color:var(--muted);font-size:.85rem;margin-bottom:0}.plan-shell{max-width:1280px;margin:auto;padding:36px 24px}.plan-header{padding:14px 0 30px;border-bottom:1px solid var(--line);position:relative}.plan-header .eyebrow{margin-bottom:10px}.plan-header h1{font-size:clamp(2rem,4vw,3.2rem);overflow-wrap:anywhere;max-width:950px}.plan-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.plan-meta{display:flex;align-items:center;gap:18px;flex-wrap:wrap;color:var(--muted);font-size:.8rem}.plan-meta>span{display:inline-flex;align-items:center;gap:5px}.live-dot{width:7px;height:7px;border-radius:50%;background:#5b9670}.live-dot.offline{background:var(--gold)}.plan-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:24px;flex-wrap:wrap}.identity-button{border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);padding:8px 13px;min-height:44px;display:flex;align-items:center;gap:9px;text-align:left}.avatar{border-radius:50%;width:29px;height:29px;background:var(--accent-soft);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700;flex-shrink:0}.toolbar-actions{display:flex;gap:8px}.plan-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:40px;padding-top:30px}.sidebar{position:sticky;top:24px;align-self:start}.sidebar-heading{font-size:.68rem;color:var(--muted);text-transform:uppercase;letter-spacing:.14em;margin-bottom:15px}.module-nav{display:flex;flex-direction:column;gap:5px;margin-bottom:18px}.module-nav a{padding:10px 12px;border-radius:8px;color:var(--muted);display:flex;align-items:center;gap:10px;text-decoration:none;font-size:.85rem;overflow-wrap:anywhere}.module-nav a:hover{background:var(--accent-soft);color:var(--ink)}.sidebar .button{width:100%;font-size:.8rem}.sidebar-note{margin-top:22px;padding-top:20px;border-top:1px solid var(--line);font-size:.75rem;color:var(--muted)}.workspace{min-width:0;display:flex;flex-direction:column;gap:24px}.module-card{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);scroll-margin-top:22px;min-width:0}.module-header{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:22px 24px 18px;border-bottom:1px solid var(--line)}.module-title{display:flex;align-items:center;gap:13px;min-width:0}.module-symbol{width:40px;height:40px;border:1px solid var(--line);border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--gold);flex-shrink:0}.module-header h2{margin-bottom:4px;overflow-wrap:anywhere}.module-header p{margin:0;font-size:.73rem;color:var(--muted)}.module-body{padding:22px 24px}.module-footer{padding:16px 24px;border-top:1px solid var(--line)}.menu{position:relative;flex-shrink:0}.menu summary{list-style:none;cursor:pointer;width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:1.45rem;color:var(--muted)}.menu summary::-webkit-details-marker{display:none}.menu summary:hover,.menu[open] summary{background:var(--surface2)}.menu-panel{position:absolute;right:0;top:42px;min-width:190px;max-width:260px;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:5px;box-shadow:0 10px 35px #0002;z-index:10}.menu-panel button{display:block;width:100%;background:transparent;padding:11px 12px;border-radius:6px;color:var(--ink);text-align:left;font-size:.83rem}.menu-panel button:hover{background:var(--surface2)}.menu-panel .danger-text{color:var(--danger)}.attendance-summary{display:flex;gap:15px;flex-wrap:wrap;font-size:.77rem;margin-bottom:18px;color:var(--muted)}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px;background:var(--muted)}.status-dot.yes{background:#5b9670}.status-dot.maybe{background:var(--gold)}.status-dot.no{background:var(--danger)}.person-row{display:flex;align-items:center;gap:11px;padding:12px 0;border-bottom:1px solid var(--line)}.person-row:last-child{border-bottom:0}.person-name{flex:1;min-width:0;font-weight:600;font-size:.9rem;overflow-wrap:anywhere}.self-label{font-size:.65rem;color:var(--muted);font-weight:400;margin-left:5px}.status-select{width:132px;font-size:.76rem;padding:8px 9px;min-height:40px;background:var(--surface2);border-color:transparent}.person-row .menu summary,.item-top .menu summary{height:34px;width:34px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.section-heading h3{margin:0}.section-gap{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}.item{padding:16px;border:1px solid var(--line);border-radius:10px;margin-bottom:12px}.item:last-child{margin-bottom:0}.item-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.author{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.75rem;min-width:0;flex-wrap:wrap}.author .avatar{width:24px;height:24px;font-size:.65rem}.item-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 14px;line-height:1.6;font-size:.9rem}.item-text a{overflow-wrap:anywhere}.vote-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.vote-button{border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--muted);padding:7px 11px;font-size:.78rem;min-height:40px}.vote-button.selected{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.vote-button.selected.no{background:var(--danger-soft);color:var(--danger);border-color:var(--danger)}.vote-names{font-size:.72rem;color:var(--muted);margin-top:9px}.slot-title{font-size:1rem;margin:0 0 7px;font-weight:600;overflow-wrap:anywhere}.time-range{font-size:.82rem;color:var(--muted);margin-bottom:12px}.final-slot{border-color:var(--gold);background:var(--accent-soft)}.final-badge{font-size:.7rem;color:var(--accent);display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:5px;background:var(--surface);margin-bottom:10px}.availability-row{display:flex;gap:8px;justify-content:space-between;border-bottom:1px solid var(--line);padding:11px 0;align-items:center}.availability-row:last-child{border-bottom:0}.availability-row .time-range{margin:3px 0 0;font-size:.76rem}.chat-stream{max-height:480px;overflow-y:auto;overscroll-behavior:contain;padding-right:3px}.message{padding:13px 0;border-bottom:1px solid var(--line)}.message:last-child{border-bottom:0}.message .item-text{margin:6px 0 2px}.message.self{border-left:2px solid var(--gold);padding-left:12px}.poll{border:1px solid var(--line);border-radius:10px;padding:16px;margin-bottom:16px;background:var(--surface2)}.poll h3{margin-bottom:7px;overflow-wrap:anywhere}.poll-option{border:1px solid var(--line);padding:10px 12px;border-radius:7px;margin:7px 0;background:var(--surface);display:flex;gap:9px;align-items:center;font-size:.82rem;cursor:pointer}.poll-option-text{flex:1;overflow-wrap:anywhere}.poll-count{font-weight:600;color:var(--accent)}.poll-option-names{font-size:.68rem;color:var(--muted);margin:0 0 8px 29px}.room-summary{display:flex;gap:20px;flex-wrap:wrap;padding-bottom:20px;border-bottom:1px solid var(--line);margin-bottom:20px}.room-stat strong{display:block;font-family:Georgia,serif;color:var(--gold);font-size:1.9rem;line-height:1.2;font-weight:400}.room-stat span{font-size:.72rem;color:var(--muted)}.room-group{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 15px;background:var(--surface2);border:1px solid var(--line);border-radius:10px;margin-bottom:10px}.room-people{display:flex;flex-wrap:wrap;gap:7px}.person-chip{display:inline-flex;gap:6px;align-items:center;padding:5px 9px;background:var(--surface);border-radius:20px;font-size:.78rem;border:1px solid var(--line)}.unassigned{padding-top:18px;font-size:.78rem;color:var(--muted)}.unassigned .room-people{margin-top:10px}.add-module-card{display:flex;align-items:center;justify-content:center;gap:8px;border:1px dashed var(--gold);border-radius:var(--radius);min-height:90px;color:var(--accent);background:transparent;width:100%;font-weight:600}.add-module-card:hover{background:var(--accent-soft)}dialog{border:1px solid var(--line);border-radius:var(--radius);padding:28px;background:var(--surface);color:var(--ink);width:min(490px,calc(100% - 28px));max-height:90dvh;overflow-y:auto;box-shadow:0 20px 100px #0004}dialog::backdrop{background:#102b2380;backdrop-filter:blur(3px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:12px}.dialog-top h2{font-size:1.8rem;margin:0}.dialog-description{font-size:.85rem;color:var(--muted);margin-bottom:22px;white-space:pre-line}.dialog-close{width:36px;height:36px;font-size:1.3rem}.identity-options{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px;max-height:140px;overflow-y:auto}.identity-option{background:var(--accent-soft);color:var(--accent);border-radius:20px;padding:7px 12px;font-size:.8rem;min-height:38px}.member-list{max-height:280px;overflow-y:auto;margin:15px 0}.member-list .check-label{border-bottom:1px solid var(--line)}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);border:1px solid var(--line);background:var(--ink);color:var(--bg);padding:13px 22px;border-radius:10px;box-shadow:0 8px 30px #0002;z-index:100;max-width:calc(100% - 30px);font-size:.85rem;text-align:center}.toast.error-toast{background:var(--danger);color:var(--surface)}
/* Mobile retains touch-sized controls and horizontally scrollable navigation;
   monthly days remain within the viewport without horizontal scrolling. */
@media(max-width:850px){.hero{gap:30px}.plan-layout{grid-template-columns:170px minmax(0,1fr);gap:22px}.module-body{padding:18px}.module-header{padding:18px}.module-footer{padding:16px 18px}.module-header h2{font-size:1.4rem}.sidebar .button{padding:10px}.header-tagline{display:none}}
@media(max-width:650px){.site-header{height:70px;padding:0 20px}.brand{font-size:1.7rem}.brand-mark{font-size:2rem}.landing{margin:20px auto 0;padding:0 20px}.hero{grid-template-columns:1fr;gap:16px;padding:22px 0 35px}.hero h1{font-size:2.9rem;max-width:450px}.hero-ornament{margin:15px 0}.hero-description{font-size:.95rem}.create-card{padding:25px}.features{grid-template-columns:1fr;gap:0}.feature{padding:17px 0}.site-footer{margin-top:40px;font-size:.7rem;gap:12px;padding:20px}.plan-shell{padding:25px 16px}.plan-header{padding:0 4px 22px}.plan-header h1{font-size:2.2rem}.plan-meta{gap:10px;font-size:.73rem}.plan-meta svg{width:16px;height:16px}.plan-toolbar{margin-top:19px;gap:12px}.toolbar-actions .button{font-size:.78rem;padding:10px 12px}.identity-button{font-size:.8rem}.plan-layout{display:block;padding-top:0}.sidebar{position:sticky;top:0;z-index:15;background:var(--bg);margin:0 -16px 20px;padding:10px 16px;border-bottom:1px solid var(--line)}.sidebar-heading,.sidebar>.button,.sidebar-note{display:none}.module-nav{flex-direction:row;overflow-x:auto;gap:6px;margin:0;scrollbar-width:thin}.module-nav a{white-space:nowrap;padding:9px 12px;font-size:.76rem;border:1px solid var(--line);background:var(--surface)}.module-nav svg{width:16px;height:16px}.module-card{scroll-margin-top:75px}.workspace{gap:18px}.module-header{padding:17px 16px}.module-header h2{font-size:1.4rem}.module-symbol{width:34px;height:34px}.module-body{padding:18px 16px}.module-footer{padding:15px 16px}.status-select{width:116px;font-size:.7rem}.person-row{gap:8px}.person-name{font-size:.83rem}.person-row .avatar{width:25px;height:25px}.person-row .menu summary{width:28px}.two-fields{grid-template-columns:1fr}.inline-form{gap:7px}.inline-form .button{padding:11px;min-width:44px}.send-label{display:none}.item{padding:13px}.room-summary{gap:18px}.room-stat strong{font-size:1.7rem}dialog{padding:22px}.site-footer .footer-ornament{white-space:nowrap}.form-actions .button{flex:1}.module-footer .button{width:100%}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}


@media(max-width:650px){.module-footer .inline-form .button{width:auto}}

/* A fixed seven-column month fits the mobile viewport. Names are shortened
   visually only; each day has an accessible label with every available name. */
.month-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.month-toolbar .icon-button{width:40px;height:40px}
.month-label{font-weight:600;text-transform:capitalize;font-size:1rem}
.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--line)}
.month-weekday{background:var(--surface2);padding:9px 2px;text-align:center;font-size:.73rem;color:var(--muted)}
.month-day{display:flex;flex-direction:column;align-items:stretch;min-width:0;min-height:116px;background:var(--surface);color:var(--ink);padding:8px;text-align:left;position:relative}
.month-day:hover{background:var(--accent-soft)}
.month-day.other-month{background:var(--surface2);color:var(--muted)}
.month-day.today{box-shadow:inset 0 0 0 2px var(--gold)}
.month-day.own-day{background:var(--accent-soft)}
.month-day.chosen-day{box-shadow:inset 0 0 0 2px var(--gold)}
.month-day:focus-visible{outline-offset:-3px;z-index:1}
.month-day-number{font-weight:600;font-size:.85rem;display:flex;justify-content:space-between;gap:2px}
.day-chosen{color:var(--gold)}
.day-count{font-size:.68rem;color:var(--accent);margin-top:5px;white-space:nowrap}
.day-people{display:flex;flex-direction:column;font-size:.66rem;line-height:1.4;color:var(--muted);margin-top:3px}
.day-people>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.day-people .day-self{font-weight:600;color:var(--accent)}
.day-empty{color:var(--line);margin-top:15px}
.month-helper{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 18px}
.month-helper p{font-size:.73rem;color:var(--muted);margin:0}
.month-helper .button{flex-shrink:0}
@media(max-width:650px){.month-day{min-height:89px;padding:5px 3px}.month-day-number{font-size:.74rem}.day-count{font-size:.59rem}.day-people{font-size:.58rem}.month-helper{align-items:flex-start;flex-direction:column}.month-label{font-size:.9rem}}

/* Immediate vote toggles preserve radio/checkbox cues without a submit step. */
.poll-option{width:100%;text-align:left;color:var(--ink)}
.poll-option.selected{border-color:var(--accent);background:var(--accent-soft)}
.poll-marker{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:1px solid var(--muted);border-radius:50%;flex-shrink:0;font-size:.75rem}
.poll-marker.multiple{border-radius:4px}
.poll-option.selected .poll-marker{background:var(--accent);color:var(--surface);border-color:var(--accent)}
.poll-option:disabled{cursor:default;opacity:1}

/* Cached cards keep listing photographs next to the vote controls. All images
   are plan-local, so opening a plan needs no third-party image requests. */
.link-preview{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface2);margin:12px 0}
.preview-image{width:100%;padding:0;background:var(--surface2);display:block}
.preview-image img{width:100%;max-height:280px;object-fit:cover;display:block}
.preview-info{display:flex;flex-direction:column;gap:5px;padding:14px;text-decoration:none;color:var(--ink)}
.preview-info:hover{background:var(--accent-soft)}
.preview-site{font-size:.7rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.preview-info strong{font-size:.95rem;overflow-wrap:anywhere}
.preview-description{font-size:.82rem;color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.preview-status{font-size:.76rem;color:var(--muted)}
.preview-open{font-size:.74rem;color:var(--accent);margin-top:4px}
.media-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.media-gallery.single{grid-template-columns:1fr}
.media-view{padding:0;border-radius:8px;overflow:hidden;background:var(--surface2);min-width:0}
.media-view img{width:100%;height:180px;object-fit:cover;display:block}
.media-gallery.single img{height:auto;max-height:340px;object-fit:contain}
.attachment-tools{display:flex;align-items:center;gap:12px;margin-top:12px;flex-wrap:wrap}
.attachment-tools .form-note{margin:0}
.draft-images{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.draft-images:empty{margin:0}
.draft-image{position:relative;width:90px;height:90px;border:1px solid var(--line);border-radius:8px}
.draft-image>img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.draft-image .menu{position:absolute;right:2px;top:2px;background:var(--surface);border-radius:5px}
.draft-image .menu summary{height:28px;width:28px}
.enlarged-image{width:100%;height:auto;max-height:70dvh;object-fit:contain;display:block}
@media(max-width:650px){.preview-image img{max-height:220px}.media-view img{height:130px}.draft-image{width:76px;height:76px}.attachment-tools .button{width:auto}}
