/* constantine.name micro-blog — design ported from temenos.place: Literata on
   warm cream, muted-purple accent, system sans for UI chrome. */

@font-face {
	font-family: 'Literata';
	font-style: normal;
	font-weight: 200 900;
	font-display: swap;
	src: url('/_microblog/static/fonts/literata-400.woff2') format('woff2-variations');
}
@font-face {
	font-family: 'Literata';
	font-style: italic;
	font-weight: 200 900;
	font-display: swap;
	src: url('/_microblog/static/fonts/literata-italic-400.woff2') format('woff2-variations');
}

:root {
	--bg:        #fcf8f1;
	--ink:       #2a2a2a;
	--ink-soft:  #6a6a6a;
	--accent:    #524863;
	--accent-2:  #a8556f;
	--rule:      #e7e1d5;
	--reply-bg:  #ffffff;
	--width:     43rem;   /* wide enough for a 4-up row of 150px photo thumbs */
	--font-read: 'Literata', Georgia, 'Iowan Old Style', serif;
	--font-ui:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-read);
	font-size: 18px;
	line-height: 1.6;
}

body {
	max-width: var(--width);
	margin: 0 auto;
	padding: 2.5rem 1.25rem 4rem;
}
body.admin { max-width: 62rem; }

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }

p { margin: 0 0 1rem; }
blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--ink-soft); }
code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: .9em; background: #eee5d6; padding: .1em .3em; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

/* UI chrome uses the sans stack. */
.site-nav, .site-footer, footer, nav, label, input, textarea, button, table, .reply-when,
.dateline, .hint, .timeline, .changed-banner, .flash, .errors, .empty, .admin-bar {
	font-family: var(--font-ui);
}

.site-nav { margin-bottom: 1.75rem; font-size: .9rem; }
.site-nav.admin-tabs { margin-top: .25rem; }
/* Both navs: mid-dot separated, uniform spacing, current page bold + unlinked */
.site-nav a { margin: 0; }
.site-nav .sep { margin: 0 .6rem; }
.site-nav .current { font-weight: 700; text-decoration: none; color: var(--ink); }

/* Top header: brand at left, ☰ menu at right, one fixed row on every page. */
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.75rem; min-height: 2.2rem; }
.site-header .brand { color: var(--ink-soft); text-decoration: none; font-family: var(--font-ui); font-size: .95rem; font-weight: 600; }
.site-header .brand:hover { color: var(--accent-2); }

/* ☰ menu (signed-in main nav): native <details> disclosure. app.js adds Esc/click-away
   dismiss. The admin sub-tabs (.admin-tabs) keep their own row below the <h1>. */
.nav-menu { position: relative; }
.nav-menu > summary {
	list-style: none;               /* hide the default disclosure triangle */
	display: inline-block;          /* so text-align: right pushes it to the corner */
	cursor: pointer;
	font-size: 1.9rem;
	line-height: 1;
	padding: .1rem .15rem;
	color: var(--accent);
	user-select: none;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover,
.nav-menu[open] > summary { color: var(--accent-2); }
.nav-menu > .site-nav {
	position: absolute;
	right: 0;                        /* dropdown opens right-aligned under the ☰ */
	top: calc(100% + .4rem);
	z-index: 20;
	margin: 0;                       /* override the base .site-nav bottom margin */
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	gap: .5rem;
	padding: .7rem 1rem;
	background: var(--reply-bg);
	border: 1px solid var(--rule);
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
	white-space: nowrap;
}
.nav-viewas { display: inline; margin: 0; }
.nav-viewas .linklike { background: transparent; border: 0; padding: 0; margin: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.nav-viewas .linklike:hover { color: var(--accent-2); }

footer, .site-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .85rem; }

label { display: block; margin: .75rem 0; }
input, textarea { font-size: 1rem; padding: .45rem .55rem; border: 1px solid var(--rule); border-radius: 4px; background: #fff; color: inherit; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { width: 100%; max-width: 100%; }

button {
	font-size: 1rem; padding: .5rem 1.1rem; margin-top: .5rem; cursor: pointer;
	background: var(--accent); color: #fff; border: 0; border-radius: 5px;
}
button:hover { background: var(--accent-2); }
.admin-bar .button { display: inline-block; background: var(--accent); color: #fff; padding: .4rem .8rem; border-radius: 5px; text-decoration: none; }
.admin-bar .button:hover { background: var(--accent-2); }
a.button { display: inline-block; background: var(--accent); color: #fff; padding: .5rem 1.1rem; border-radius: 5px; text-decoration: none; }
a.button:hover { background: var(--accent-2); color: #fff; }
.google-signin { margin-top: 1rem; }
.passkey-signin { margin-top: .5rem; }
.passkey-list { list-style: none; padding: 0; }
.passkey-list li { padding: .4rem 0; border-bottom: 1px solid var(--rule); }

.flash { background: #faf0e6; border: 1px solid var(--rule); padding: .55rem .85rem; border-radius: 6px; word-break: break-word; }
.flash p { margin: 0 0 .5rem; }
.copy-row { display: flex; align-items: center; gap: .5rem; margin: .3rem 0 0; }
.copy-row code { word-break: break-all; background: #fff; border: 1px solid var(--rule); padding: .25rem .45rem; border-radius: 4px; }
.copy-btn { flex: 0 0 auto; background: transparent; border: 0; padding: .25rem; margin: 0; cursor: pointer; color: var(--accent); line-height: 0; }
.copy-btn:hover, .copy-btn.copied { color: var(--accent-2); background: transparent; }
.copied-note { color: var(--accent); font-size: .85rem; margin-left: .35rem; opacity: 0; transition: opacity .15s; }
.copied-note.show { opacity: 1; }
.email-help { background: #faf0e6; border: 1px solid var(--rule); padding: .25rem 1rem; border-radius: 6px; margin-top: 1.25rem; font-size: .95rem; }
.click-note { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .9rem; font-family: var(--font-ui); }
.errors { color: #9b2c3f; }
.empty { color: var(--ink-soft); }
.hint { color: var(--ink-soft); font-size: .85rem; }
.draft-flag { background: #f4e9e9; padding: .35rem .7rem; border-radius: 4px; display: inline-block; }

/* Reading a post */
.dateline { color: var(--ink-soft); font-size: .85rem; margin-bottom: 1rem; }
.post-body { font-size: 1.08rem; }
.post-body img { max-width: 100%; height: auto; }

.photo-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; align-items: flex-start; }
.photo-fig { margin: 0; width: 150px; }
.photo-grid .photo { line-height: 0; }
.photo-grid .photo img { width: 150px; height: 150px; object-fit: cover; border-radius: 5px; display: block; }
.photo-fig figcaption { font-size: .78rem; color: var(--ink-soft); line-height: 1.3; margin-top: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Unified media grid (photos + videos as one ordered collection). */
.media-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; align-items: flex-start; }
.media-fig { margin: 0; width: 150px; }
.media-grid .media { position: relative; display: block; line-height: 0; }
.media-grid .media img { width: 150px; height: 150px; object-fit: cover; border-radius: 5px; display: block; }
.media-grid .video-thumb { width: 150px; height: 150px; background: #1c1a22; border-radius: 5px; }
.media-grid .media .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #fff; font-size: 2rem; text-shadow: 0 1px 6px rgba(0,0,0,.7); pointer-events: none; }
.media-fig figcaption { font-size: .78rem; color: var(--ink-soft); line-height: 1.3; margin-top: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-note { width: 150px; height: 150px; box-sizing: border-box; border-radius: 5px; background: #1c1a22; color: #e9e2d4; font-size: .72rem; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 .4rem; }
.photo-edit { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; font-size: .8rem; margin: .3rem; }
.photo-edit img { width: 110px; height: 110px; object-fit: cover; border-radius: 5px; }

/* Admin "share this photo" */
.share-photo-btn { margin: .25rem 0 0; padding: .2rem .5rem; font-size: .75rem; background: transparent; border: 1px solid var(--rule); border-radius: 5px; color: var(--accent); cursor: pointer; }
.share-photo-btn:hover { border-color: var(--accent); color: var(--accent-2); }
.share-photo-btn[disabled] { opacity: .5; cursor: default; }
.share-reveal { width: 150px; margin-top: .3rem; display: flex; flex-direction: column; gap: .3rem; }
.share-reveal .share-url { width: 100%; font-size: .72rem; padding: .2rem .3rem; box-sizing: border-box; }
.share-reveal .copy-btn { align-self: flex-start; font-size: .75rem; text-decoration: underline; }
.share-note { font-size: .7rem; color: var(--ink-soft); margin: 0; line-height: 1.3; }

.share-reveal .share-add { align-self: flex-start; font-size: .75rem; background: transparent; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
.share-reveal .share-add:hover { color: var(--accent-2); }

/* Floating "email photos" basket bar (admin) */
.share-bar { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; background: var(--accent); color: #fff; border-radius: 8px; padding: .6rem .8rem; box-shadow: 0 2px 10px rgba(0,0,0,.25); display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.share-bar .button { background: #fff; color: var(--accent); padding: .3rem .7rem; font-size: .8rem; }
.share-bar .button:hover { background: #fff; color: var(--accent-2); }
.share-bar-clear { background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 5px; padding: .3rem .6rem; font-size: .8rem; cursor: pointer; }

/* Compose-photo-email page */
.share-email-form .share-basket { margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; }
.basket-item { display: flex; align-items: center; gap: .6rem; }
.basket-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 5px; flex: 0 0 auto; }
.basket-item .basket-cap { flex: 1 1 auto; color: var(--ink-soft); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basket-remove { flex: 0 0 auto; background: transparent; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: .8rem; }
.share-email-status { margin-left: .5rem; color: var(--ink-soft); font-size: .9rem; }

/* Public single-photo share page (no nav/banner) */
body.share-view { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.share-photo { margin: 0; text-align: center; }
.share-photo img { max-width: 100%; height: auto; border-radius: 6px; }
.share-photo figcaption { margin-top: .75rem; color: var(--ink-soft); font-size: .95rem; }
.share-gone { color: var(--ink-soft); }

/* Live uploader (compose/edit) */
.uploader { margin: 1rem 0 1.5rem; }
.dropzone { border: 2px dashed var(--rule); border-radius: 8px; padding: 1.4rem; text-align: center; color: var(--ink-soft); }
.dropzone.over { border-color: var(--accent); background: #fff; color: var(--ink); }
.dropzone .pick { background: transparent; color: var(--accent); border: 0; margin: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.dropzone .pick:hover { color: var(--accent-2); background: transparent; }
.uploader .media { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.photo-item { display: flex; flex-direction: column; width: 110px; }
.photo-item .thumb { position: relative; width: 110px; height: 110px; border-radius: 5px; overflow: hidden; background: #eee5d6; display: flex; align-items: center; justify-content: center; }
.photo-item .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item .remove { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: rgba(20,18,25,.6); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.photo-item .remove:hover { background: var(--accent-2); }
.photo-item .progress { width: 80%; height: 6px; background: #fff; border-radius: 3px; overflow: hidden; }
.photo-item .progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.photo-item.converting .progress { display: none; }
.photo-item.converting .thumb::after { content: 'HEIC…'; color: var(--ink-soft); font-size: .8rem; }
.photo-item .caption-input { width: 110px; box-sizing: border-box; margin-top: 4px; padding: 2px 5px; font: inherit; font-size: .72rem; line-height: 1.3; border: 1px solid var(--rule); border-radius: 4px; background: #fff; color: var(--ink); }
.uploader.can-reorder .media-item[draggable] .thumb { cursor: grab; }
.uploader.can-reorder .media-item.dragging { opacity: .4; }
.uploader.can-reorder .media::after { content: 'Drag any thumbnail to reorder.'; flex-basis: 100%; color: var(--ink-soft); font-size: .8rem; }
.uploader.can-reorder .media:empty::after { content: none; }

/* Videos: edit-form tiles mirror photo tiles (in the same grid). */
.video-item { display: flex; flex-direction: column; width: 110px; }
.video-item .thumb { position: relative; width: 110px; height: 110px; border-radius: 5px; overflow: hidden; background: #1c1a22; display: flex; align-items: center; justify-content: center; }
.video-item .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-item .remove { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: rgba(20,18,25,.6); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.video-item .vbadge { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #fff; font-size: 1.6rem; text-shadow: 0 1px 4px rgba(0,0,0,.6); pointer-events: none; }
.video-item .vproc { color: #e9e2d4; font-size: .72rem; text-align: center; padding: 0 .3rem; }
.video-item .upstat { margin-top: 3px; font-size: .62rem; line-height: 1.3; color: var(--ink-soft); text-align: center; font-variant-numeric: tabular-nums; }
.video-item .progress { width: 80%; height: 6px; background: #fff; border-radius: 3px; overflow: hidden; }
.video-item .progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.video-item .caption-input { width: 110px; box-sizing: border-box; margin-top: 4px; padding: 2px 5px; font: inherit; font-size: .72rem; line-height: 1.3; border: 1px solid var(--rule); border-radius: 4px; background: #fff; color: var(--ink); }
.uploader.can-reorder .video-item[draggable] .thumb { cursor: grab; }
.uploader.can-reorder .video-item.dragging { opacity: .4; }
.uploader.can-reorder .videos:not(:empty)::after { content: 'Drag videos to reorder.'; flex-basis: 100%; color: var(--ink-soft); font-size: .8rem; }
.video-grid { margin: 1.5rem 0; display: flex; flex-direction: column; gap: 1rem; }
.video-fig { margin: 0; max-width: 640px; }
.video-fig figcaption { font-size: .85rem; color: var(--ink-soft); line-height: 1.3; margin-top: .3rem; }
.post-video { width: 100%; max-width: 640px; border-radius: 6px; background: #000; display: block; }
.video-note { color: var(--ink-soft); font-style: italic; }

.sys-stats { margin: .25rem 0 .75rem; padding-left: 1.2rem; }
.sys-stats li { margin: .15rem 0; }
.warn { color: var(--accent-2); }
.usage-block { margin: 1rem 0 1.25rem; }
.usage-block h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.usage-block .sys-stats { list-style: none; padding-left: 0; }
.usage-block .sys-stats li { margin: .3rem 0; font-size: .92rem; }
.usage-block .ulab { display: inline-block; min-width: 8.5rem; font-family: var(--font-ui); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.usage-block .usub { color: var(--ink-soft); font-size: .88rem; }
.selftest-panel { border: 1px solid var(--rule); border-radius: 8px; padding: .8rem 1rem; margin: .5rem 0 1rem; background: var(--surface, #fff); }
.st-head { margin: 0 0 .5rem; font-family: var(--font-ui); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.st-head-ok { color: #2c6f52; }
.st-head-fail { color: #b23b3b; }
.selftest { list-style: none; padding: 0; margin: 0; }
.selftest li { margin: .3rem 0; font-size: .92rem; }
.st-pass { color: #2c6f52; font-weight: 700; }
.st-fail { color: #b23b3b; font-weight: 700; }
.st-skip { color: var(--ink-soft); font-weight: 700; }
.st-detail { color: var(--ink-soft); font-size: .85rem; }
.upload-error { margin-top: .5rem; }

.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 1rem; font-size: .9rem; }
.post-nav .newer { margin-left: auto; }
.timeline-link { font-size: .85rem; }

/* Site announcement banner */
.site-banner { background: #eef6ff; border: 1px solid #cfe2ff; border-radius: 6px; padding: .6rem .9rem; margin-bottom: 1.25rem; display: flex; align-items: flex-start; gap: .75rem; font-family: var(--font-ui); }
.site-banner .banner-body { flex: 1; }
.site-banner .banner-body > :first-child { margin-top: 0; }
.site-banner .banner-body > :last-child { margin-bottom: 0; }
.site-banner .banner-controls { flex: 0 0 auto; display: flex; gap: .25rem; }
.site-banner .banner-controls button { margin: 0; padding: .05rem .5rem; background: transparent; color: var(--accent); border: 1px solid var(--rule); border-radius: 4px; font-size: 1.05rem; line-height: 1.35; cursor: pointer; }
.site-banner .banner-controls button:hover { color: var(--accent-2); background: #fff; }
.site-banner .banner-max { display: none; margin: 0; padding: .1rem .4rem; background: transparent; color: var(--accent); border: 0; font: inherit; cursor: pointer; }
.site-banner .banner-max:hover { color: var(--accent-2); background: transparent; }
.site-banner.minimized { padding: .2rem .5rem; }
.site-banner.minimized .banner-body, .site-banner.minimized .banner-controls { display: none; }
.site-banner.minimized .banner-max { display: inline-block; }

.changed-banner { background: #eef6ff; border: 1px solid #cfe2ff; padding: .6rem .9rem; border-radius: 6px; margin-bottom: 1.25rem; }
.changed-banner p { margin: 0 0 .3rem; font-weight: 600; }
.changed-banner ul { margin: 0; padding-left: 1.2rem; }

.timeline ul { list-style: none; padding: 0; }
.timeline li { display: flex; gap: .75rem; align-items: baseline; padding: .45rem 0; }
.timeline .tl-date { flex: 0 0 8.5rem; white-space: nowrap; }
.timeline .dot { margin-right: .45rem; }
.timeline .dot.unseen { color: var(--accent); }
.timeline .dot.seen { color: #cbb; }
.timeline .excerpt { flex: 1; color: var(--ink-soft); font-size: .9rem; }
.timeline .tl-thumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .4rem; }
.timeline .tl-thumb { line-height: 0; }
.timeline .tl-thumb img { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; display: block; }
.timeline .tl-more { align-self: center; font-size: .8rem; color: var(--ink-soft); text-decoration: none; }
.timeline .tl-more:hover { color: var(--accent-2); }
/* On phones the fixed date column squeezes the excerpt — stack it: date on its
   own line, then the text + thumbs full-width below. */
@media (max-width: 32rem) {
	.timeline li { flex-direction: column; gap: .2rem; align-items: stretch; }
	.timeline .tl-date { flex: none; }
}

.caught-up { font-size: 1.1rem; }

.timeline.drafts { margin-bottom: 1.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.timeline.drafts h2 { margin-top: 0; }
.timeline.drafts .excerpt em { color: var(--ink-soft); }
.timeline.drafts form.inline button { padding: .15rem .5rem; font-size: .8rem; }

/* Replies */
.replies { margin-top: 2.5rem; }
.replies ul { list-style: none; padding: 0; }
.replies li { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.reply-who { font-weight: 600; }
.reply-when { color: var(--ink-soft); font-size: .8rem; margin-left: .4rem; }
.reply-body { margin: .25rem 0; font-family: var(--font-read); }
.reply-form { margin-top: 1.25rem; }
.charcount { margin: .15rem 0 .4rem; font-size: .78rem; color: var(--ink-soft); }
.charcount.near { color: #b23b3b; }
.reply-error { display: none; margin: .1rem 0 .5rem; font-size: .85rem; color: #b23b3b; }
.reply-error.show { display: block; }

/* Admin tables */
table { border-collapse: collapse; width: 100%; margin: .5rem 0 1.5rem; font-size: .92rem; }
th, td { border-bottom: 1px solid var(--rule); padding: .45rem .5rem; text-align: left; }
nav a.on { font-weight: 700; }
.sep { color: var(--ink-soft); }
form.inline { display: inline; margin: 0; }
form.inline button { margin-top: 0; padding: .3rem .6rem; font-size: .85rem; }
.admin-bar { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); display: flex; gap: .5rem; align-items: center; }
.user-actions { white-space: normal; }
.user-actions button { margin-top: 0; padding: .25rem .55rem; font-size: .82rem; }
.pstatus { font-size: .82rem; }
.pstatus-invited { color: var(--accent-2); font-weight: 600; }   /* not yet arrived — stands out */
.pstatus-active { color: var(--ink-soft); }
.pstatus-unverified { color: var(--ink-soft); font-style: italic; }
tr.resolved { opacity: .5; }
.error-detail { margin: 1rem 0; }
.error-trace { white-space: pre-wrap; word-break: break-word; font-size: .72rem; line-height: 1.4; background: #f4e9e9; padding: .6rem .7rem; border-radius: 5px; overflow-x: auto; }

/* Per-row actions collapse behind a ⋯ disclosure — native <details>, no JS. */
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 5px; color: var(--accent); font-size: 1.35rem; line-height: 1; user-select: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary::marker { content: ''; }
.row-menu > summary:hover, .row-menu[open] > summary { background: #fff; color: var(--accent-2); }
.row-menu-items { position: absolute; right: 0; z-index: 30; margin-top: .25rem; min-width: 12rem; background: #fff; border: 1px solid var(--rule); border-radius: 7px; box-shadow: 0 6px 18px rgba(20,18,25,.14); padding: .35rem; display: flex; flex-direction: column; gap: .2rem; }
.row-menu-items form { display: block; margin: 0; }
.row-menu-items button { display: block; width: 100%; text-align: left; margin: 0; background: transparent; color: var(--ink); border: 0; border-radius: 4px; padding: .4rem .55rem; font-size: .9rem; }
.row-menu-items button:hover { background: var(--accent); color: #fff; }

/* Confirmation modal (sharp actions) */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,18,25,.55); display: flex; align-items: center; justify-content: center; z-index: 1100; padding: 1rem; }
.modal { font-family: var(--font-ui); background: var(--bg); color: var(--ink); max-width: 24rem; width: 100%; border: 1px solid var(--rule); border-radius: 10px; padding: 1.5rem; box-shadow: 0 12px 44px rgba(20,18,25,.3); }
.modal-msg { margin: 0 0 1rem; font-size: 1rem; line-height: 1.5; }
.modal-input { display: block; width: 100%; margin: 0 0 1.25rem; font-size: 1rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; }
.modal-actions button { margin-top: 0; }
.modal-cancel { background: transparent; color: var(--accent); border: 1px solid var(--rule); }
.modal-cancel:hover { background: #fff; color: var(--accent-2); }
.modal-confirm { background: var(--accent-2); }
.modal-confirm:hover { background: #8e4760; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20,18,25,.85); display: flex; align-items: center; justify-content: center; z-index: 1000; cursor: zoom-out; }
.lightbox .lb-stage { display: flex; align-items: center; justify-content: center; }
.lightbox .lb-media { max-width: 92vw; max-height: 92vh; box-shadow: 0 2px 30px rgba(0,0,0,.5); border-radius: 4px; background: #000; }
.lightbox .lb-caption { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(1.2rem, env(safe-area-inset-bottom)); max-width: 80vw; padding: .35rem .7rem; border-radius: 6px; background: rgba(20,18,25,.6); color: #fff; font-size: .9rem; line-height: 1.35; text-align: center; cursor: auto; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 4.5rem; border: 0; border-radius: 8px; background: rgba(255,255,255,.15); color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-nav:hover { background: rgba(255,255,255,.32); }
.lightbox .lb-nav.prev { left: max(1rem, env(safe-area-inset-left)); }
.lightbox .lb-nav.next { right: max(1rem, env(safe-area-inset-right)); }
.lightbox .lb-close { position: absolute; top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-close:hover { background: rgba(255,255,255,.32); }
