@import url("/gallery.css");
@import url("/guestbook.css");
/* The webmaster uses the public site's palette, fonts and beveled menu chrome. */
.admin-desktop { min-height: 100dvh; padding: 2rem clamp(1rem, 4vw, 4rem) 3rem; background: var(--dust-grey) url('/4kt.png') center / cover fixed; color: var(--pine-teal); line-height: 1.5; }
.admin-desktop a { color: var(--pine-teal); }
.desktop-header { max-width: 88rem; margin: 0 auto 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-desktop .desktop-brand { font-family: DynaPuff, sans-serif; font-size: 1.35rem; text-decoration: none; color: #f4f3ed; background: #344e41ed; padding: .3rem .65rem; border: 1px solid var(--dry-sage); border-radius: .2rem; text-shadow: 0 1px var(--pine-teal); }
.desktop-brand span { font-family: 'Rough Serif', serif; font-size: 1rem; }
.desktop-note { font-size: .9rem; color: #f4f3ed; background: #344e41ed; padding: .3rem .65rem; border-radius: .2rem; }
.admin-window { background: var(--dust-grey); border: 1px solid var(--pine-teal); border-radius: .3rem; box-shadow: 0 0 0 1px var(--dry-sage), 0 0 0 3px var(--hunter-green), 6px 8px 0 #344e4133; overflow: hidden; }
.dashboard-window { max-width: 88rem; margin: auto; }
.window-title { display: flex; align-items: center; gap: .6rem; padding: .5rem .85rem; background: linear-gradient(var(--fern), var(--hunter-green)); border-top: 1px solid var(--dry-sage); color: #fff; font: .85rem DynaPuff, sans-serif; text-shadow: 0 1px var(--pine-teal); }
.window-title img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.window-title > span:last-child { margin-left: auto; }
.session-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .65rem 1rem; font-size: .9rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.admin-desktop button, .admin-window button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.3rem; padding: .35rem .85rem; border: 1px solid var(--hunter-green); border-radius: .2rem; box-shadow: inset 1px 1px 0 #fff9, 1px 1px 0 #344e4144; background: linear-gradient(#f5f3eb, var(--dust-grey)); color: var(--pine-teal); cursor: pointer; font-size: .95rem; line-height: 1.4; text-decoration: none; }
.admin-desktop button:hover, .button:hover { background: #eef0e5; }
.admin-desktop .primary { background: linear-gradient(var(--fern), var(--hunter-green)); color: #fff; }
.admin-desktop .primary:hover { background: var(--pine-teal); }
.admin-window .danger { color: #8a3127; border-color: #a2655b; }
.admin-desktop button:disabled { cursor: wait; opacity: .6; }
.admin-desktop :focus-visible, .admin-window :focus-visible { outline: 3px solid #7b5925; outline-offset: 3px; }
.dashboard-menu ul { display: flex; flex-wrap: nowrap; gap: 0; }
.dashboard-menu li { flex: 1 1 auto; min-width: 0; }
.dashboard-menu a { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: .35rem; padding: .5rem .35rem; color: #fff; border-right: 1px solid #344e4180; font-size: .75rem; white-space: nowrap; }
.dashboard-menu img { width: 22px; height: 22px; object-fit: contain; image-rendering: pixelated; }
.dashboard-body { padding: clamp(1rem, 2.7vw, 2.5rem); min-height: 35rem; background: radial-gradient(#344e4112 .7px, transparent .7px) 0 0 / 8px 8px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: .2rem 0 .3rem; }
.eyebrow { font: .7rem DynaPuff, sans-serif; letter-spacing: .12em; }
.muted { color: #52624f; font-size: .95rem; }
.panel { border: 1px solid var(--fern); border-radius: .25rem; background: #f4f3ed; box-shadow: inset 0 1px #fff; min-width: 0; }
.panel-heading { padding: .7rem 1rem; border-bottom: 1px solid var(--fern); background: linear-gradient(var(--dry-sage), var(--dust-grey)); font: .9rem DynaPuff, sans-serif; }
.panel-content { padding: 1.2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { padding: 1.1rem; display: flex; align-items: center; gap: 1rem; }
.stat img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.stat strong { display: block; font: 1.9rem DynaPuff, sans-serif; }
.desk-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr); gap: 1.5rem; align-items: start; }
.shortcut { display: flex; gap: .9rem; padding: 1rem; text-decoration: none; border-bottom: 1px solid #a3b18a80; align-items: center; }
.shortcut:last-child { border: 0; }
.shortcut:hover { background: #e7ebdf; }
.shortcut img { height: 34px; width: 34px; object-fit: contain; image-rendering: pixelated; }
.shortcut strong, .shortcut small { display: block; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; padding: 1rem; border-bottom: 1px solid var(--dry-sage); }
.toolbar label { display: grid; gap: .25rem; font-size: .85rem; }
.toolbar label:first-child { flex: 1; }
.admin-desktop input:not([type=checkbox]):not([type=radio]), .admin-desktop textarea, .admin-desktop select { width: 100%; min-height: 2.5rem; background: #fffef9; color: var(--pine-teal); border: 1px solid var(--fern); border-radius: .15rem; padding: .55rem .65rem; box-shadow: inset 1px 2px 0 #344e4110; font-size: 1rem; }
.admin-desktop textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }
.admin-desktop input[type=checkbox] { accent-color: var(--hunter-green); width: 1.1rem; height: 1.1rem; }
.admin-form { display: grid; gap: .5rem; }
.admin-form label { font-weight: bold; margin-top: .6rem; }
.admin-form .actions { margin-top: .8rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .5rem; }
.check-label { display: flex; align-items: center; gap: .5rem; }
.admin-desktop textarea.code, .code { font: .85rem/1.65 ui-monospace, SFMono-Regular, monospace; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; font-size: .95rem; text-align: left; }
.admin-table th { background: linear-gradient(var(--dry-sage), var(--dust-grey)); padding: .65rem 1rem; border-bottom: 1px solid var(--fern); font: .8rem DynaPuff, sans-serif; white-space: nowrap; }
.admin-table td { padding: .85rem 1rem; border-bottom: 1px solid #a3b18a80; vertical-align: middle; overflow-wrap: anywhere; max-width: 28rem; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:nth-child(even) { background: #a3b18a12; }
.admin-table tbody tr:hover { background: #a3b18a25; }
.admin-table td:first-child { min-width: 12rem; }
.admin-table time { white-space: nowrap; font-size: .85rem; }
.badge { display: inline-block; border: 1px solid #91a887; background: #e0e8d8; border-radius: .2rem; padding: .1rem .5rem; font-size: .8rem; white-space: nowrap; }
.badge.draft { background: #eae5d4; border-color: #b9af90; color: #6c603b; }
.empty { padding: 2.5rem 1rem; text-align: center; color: #52624f; }
.notice { border: 1px solid var(--fern); border-left-width: 4px; background: #edf2e5; padding: .8rem 1rem; margin-bottom: 1rem; white-space: pre-wrap; }
.notice.error { color: #7e3027; border-color: #a2655b; background: #f8e9e3; }
.window-footer { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .85rem; border-top: 1px solid var(--fern); font-size: .75rem; background: linear-gradient(var(--dust-grey), #c4cbbb); }
.editor-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.blog-preview { min-height: 20rem; overflow-wrap: anywhere; }
.blog-preview h1, .blog-preview h2, .blog-preview h3, .blog-preview p, .blog-preview ul, .blog-preview ol, .blog-preview pre, .blog-preview table, .blog-preview blockquote { margin: 0 0 1rem; }
.blog-preview ul { list-style: disc inside; }
.blog-preview ol { list-style: decimal inside; }
.blog-preview img { max-width: 100%; height: auto; }
.blog-preview pre { overflow: auto; padding: .8rem; background: #e1e5d9; }
.blog-preview code { font-family: monospace; }
.blog-preview strong { font-family: "DynaPuff", sans-serif; font-weight: 700; color: #7b5925; }
.blog-preview blockquote { border-left: 4px solid var(--fern); border-radius: .2rem; background: #edf2e5; color: var(--pine-teal); padding: .75rem 1rem; }
.preview-frame { display: block; width: 100%; min-height: 25rem; border: 0; background: #fffef9; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; padding: 1rem; }
.gallery-card { min-width: 0; border: 1px solid var(--dry-sage); background: #fffef9; }
.gallery-card > img { display: block; width: 100%; height: 10rem; object-fit: contain; background: #e5e8dc; }
.gallery-card > div { padding: .8rem; overflow-wrap: anywhere; }
.gallery-card .actions { margin-top: .7rem; }
.image-detail { width: 100%; max-height: 26rem; object-fit: contain; background: #e5e8dc; }
.status-value { white-space: pre-wrap; max-height: 5rem; overflow: auto; font: .8rem/1.5 ui-monospace, monospace; }
.welcome-sample { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.5rem; text-align: center; padding: 2rem; }
.login-desktop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; }
.login-window { width: min(100%, 29rem); }
.login-window .admin-menu { padding: .15rem .85rem; text-align: left; }
.login-content { padding: 2rem clamp(1.25rem, 5vw, 3rem) 2.5rem; text-align: center; background: radial-gradient(#344e4112 .7px, transparent .7px) 0 0 / 8px 8px; }
.login-icon { width: 76px; height: 76px; object-fit: contain; image-rendering: pixelated; margin-bottom: .9rem; }
.login-content h1 { font-size: 1.9rem; margin: .5rem 0; }
.login-content .eyebrow { font-size: .6rem; }
.login-form { margin-top: 1.4rem; text-align: left; }
.login-form button { margin-top: 1rem; }
.login-content .notice { margin-top: 1rem; text-align: left; }
.confirm-dialog { padding: 0; color: var(--pine-teal); max-width: min(28rem, calc(100vw - 2rem)); line-height: 1.5; }
.confirm-dialog::backdrop { background: #162c23aa; }
.dialog-content { padding: 1.5rem; }
.dialog-content .actions { justify-content: end; margin-top: 1.5rem; }
[hidden] { display: none !important; }
@media (max-width: 48rem) {
  .admin-desktop { padding: 1rem .65rem 2rem; }
  .desktop-header > .desktop-note { display: none; }
  .admin-desktop .desktop-brand { font-size: 1.1rem; }
  .dashboard-menu a { flex-direction: column; gap: .2rem; font-size: clamp(.5rem, 1.7vw, .7rem); padding: .4rem .15rem; }
  .dashboard-menu img { width: 20px; height: 20px; }
  .desk-grid, .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { gap: .5rem; }
  .stat { flex-direction: column; align-items: start; gap: .5rem; padding: .7rem; font-size: .8rem; }
  .stat img { width: 32px; height: 32px; }
  .stat strong { font-size: 1.5rem; }
  .session-bar { font-size: .8rem; }
  .window-footer { font-size: .65rem; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
}

.gallery-manager { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr); gap: 1.5rem; padding: 1.5rem; align-items: start; }
.gallery-manager > form { padding: 1.2rem; border: 1px solid var(--dry-sage); background: #e8ebdf; border-radius: .25rem; }
.gallery-manager h2 { font-size: 1.2rem; }
.upload-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); gap: .5rem; margin-top: .5rem; }
.upload-previews img { width: 100%; height: 4.5rem; object-fit: cover; border: 1px solid var(--dry-sage); border-radius: .2rem; }
.upload-previews figcaption { font-size: .7rem; overflow-wrap: anywhere; }
.value-editor { margin: 1rem 0; }
.value-node { min-width: 0; padding: .8rem; background: #fffef9; border: 1px solid var(--dry-sage); border-radius: .25rem; }
.value-node .value-node { background: #f2f4ec; }
.value-node > .value-field { max-width: 19rem; }
.value-body { margin-top: .75rem; }
.value-body > button { margin-top: .6rem; }
.value-children { display: grid; gap: 1rem; }
.value-pair { border-left: 3px solid var(--dry-sage); padding-left: .8rem; min-width: 0; }
.value-pair-header { display: flex; align-items: end; gap: .75rem; margin-bottom: .5rem; }
.value-pair-header > label { flex: 1; }
.admin-form .value-field { display: grid; gap: .35rem; margin: 0; font-size: .85rem; }
.admin-form .value-field textarea { min-height: 4rem; }
.vim-textbox { min-width: 0; font: inherit; }
.vim-textbox.code { font: .9rem/1.6 ui-monospace, SFMono-Regular, monospace; }
.vim-textbox .cm-scroller { max-height: 65vh; }
.vim-textbox[aria-disabled=true] { opacity: .65; }
.emoji-field-no-button .vim-textbox .cm-content { padding-right: .65rem; }
.vim-hint { display: block; margin-top: .3rem; color: var(--fern); font-size: .75rem; }
.admin-desktop .cm-vim-panel input { width: auto; min-height: 0; padding: .1rem .25rem; font: inherit; }
.value-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .5rem; }
.value-item > button { margin-top: .75rem; }
@media (max-width: 48rem) {
  .gallery-manager { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
  .value-pair-header { flex-wrap: wrap; }
  .value-pair { padding-left: .4rem; }
  .value-node { padding: .5rem; }
  .value-item { grid-template-columns: minmax(0, 1fr); }
}

/* Keep named values in readable key / type / value rows on a wide screen. */
@media (min-width: 64rem) {
  .value-pair { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr); gap: .8rem; align-items: start; }
  .value-pair-header { display: grid; gap: .4rem; }
  .value-pair-header > button { justify-self: start; min-height: 1.8rem; font-size: .8rem; }
  .value-node:not([data-type="object"]):not([data-type="array"]) { display: grid; grid-template-columns: minmax(7rem, .8fr) minmax(0, 2fr); gap: .8rem; }
  .value-node:not([data-type="object"]):not([data-type="array"]) > .value-body { margin-top: 0; }
}

.icon-picker { min-width: 0; border: 1px solid var(--dry-sage); padding: .75rem; }
.icon-picker legend, .link-editor legend { padding: 0 .4rem; font-weight: bold; }
.icon-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .4rem; max-height: 19rem; overflow-y: auto; padding: .3rem; }
.icon-option { display: flex; position: relative; justify-content: center; align-items: center; min-height: 62px; border: 2px solid transparent; background: #f4f3ed; cursor: pointer; border-radius: .2rem; }
.icon-option:has(input:checked) { border-color: var(--hunter-green); background: #dce8d3; box-shadow: inset 0 0 0 1px var(--hunter-green); }
.icon-option:focus-within { outline: 2px solid var(--hunter-green); outline-offset: 2px; }
.icon-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.icon-option img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.icon-option span { font-size: .85rem; text-align: center; }
#section-links { display: grid; gap: 1rem; }
.link-editor { display: grid; gap: .6rem; min-width: 0; border: 1px solid var(--dry-sage); border-radius: .3rem; padding: 1rem; background: #fafaf5; }
.link-controls { justify-content: flex-end; }
.ring-settings { display: grid; }
.ring-settings summary { cursor: pointer; margin-bottom: .5rem; }
.ring-settings label { display: block; margin: .5rem 0; }
.ring-settings input { width: 100%; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; }
.admin-form .checkbox-label input { width: auto; }

.admin-form .icon-option { margin: 0; }


.dashboard-menu ul { flex-wrap: wrap; }

.admin-albums { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }

.log-archive { display: grid; gap: 1rem; padding: 1rem; }
.log-card { padding: 1rem; border: 1px solid var(--dry-sage); background: #fffef9; overflow-wrap: anywhere; }
.log-card h3 { font-size: 1.15rem; font-weight: bold; margin: .6rem 0; }
.log-body { white-space: pre-wrap; line-height: 1.6; margin-bottom: .8rem; }
.log-card .actions { margin-top: .8rem; }

/* Neighborhood and webring cards with a shared draft editor. */
#section-links.neighbor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.neighbor-card { align-content: start; }
.neighbor-card > .badge { justify-self: start; }
.neighbor-card .link-controls { margin-top: 0; gap: .4rem; }
.neighbor-card .link-controls button { padding: .3rem .5rem; font-size: .8rem; }
.neighbor-address { overflow-wrap: anywhere; font-size: .8rem; }
.neighbor-preview { display: flex; flex-direction: column; gap: .75rem; align-items: center; justify-content: center; min-height: 7rem; padding: 1rem; border: 1px dotted var(--dry-sage); background: var(--dust-grey); overflow-wrap: anywhere; }
.neighbor-preview a { max-width: 100%; }
.neighbor-dialog { padding: 0; width: min(48rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; color: var(--pine-teal); line-height: 1.5; }
.neighbor-dialog::backdrop { background: #162c23aa; }
.neighbor-dialog-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 1rem; align-items: start; }
.neighbor-live-preview { display: grid; gap: .75rem; min-width: 0; position: sticky; top: 1rem; }
.neighbor-live-preview h3 { font-weight: bold; }
.neighbor-description { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
@media (max-width: 40rem) {
  .neighbor-dialog-layout { grid-template-columns: minmax(0, 1fr); }
  .neighbor-live-preview { position: static; grid-row: 1; }
  .neighbor-dialog .dialog-content { padding: 1rem; }
}

/* Grammar suggestions are opt-in on authoring fields. */
.grammar-error {
  text-decoration: underline wavy #b34229;
  text-underline-offset: .2em;
  text-decoration-thickness: 1.5px;
  cursor: help;
}
.grammar-feedback { display: block; margin-top: .45rem; font: .8rem/1.5 system-ui, sans-serif; }
.grammar-status { color: #52604b; }
.grammar-list { margin-top: .3rem; }
.grammar-list summary { cursor: pointer; }
.grammar-list ul { margin: .5rem 0; padding-left: 1.3rem; max-height: 18rem; overflow: auto; }
.grammar-list li { margin-bottom: .7rem; overflow-wrap: anywhere; }
.grammar-options { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.grammar-options button { white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; max-width: 100%; }
.grammar-popup {
  position: fixed;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  width: min(320px, calc(100vw - 16px));
  max-height: min(210px, calc(100vh - 16px));
  overflow: auto;
  box-sizing: border-box;
  padding: .8rem;
  border: 1px solid var(--fern, #80966f);
  border-radius: .3rem;
  background: #fffef9;
  color: #243b2c;
  box-shadow: 0 4px 18px #0003;
  font: .85rem/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.grammar-popup .grammar-close { align-self: flex-end; padding: 0 .35rem; min-height: 0; }
