/* ============================================
   Themeable stylesheet — dark (#242424) default,
   light (cream/orange) via html[data-theme="light"]
   ============================================ */

/* ---------- CSS custom properties ---------- */

:root {
  --bg:               #242424;
  --bg-panel:         #2e2e2e;
  --bg-inset:         #2a2a2a;
  --bg-input:         #242424;
  --bg-deep:          #1e1e1e;
  --bg-gradient:      radial-gradient(circle at 20% 10%, #2a2a2a 0%, transparent 40%),
                      radial-gradient(circle at 80% 30%, #1e1e1e 0%, transparent 45%);
  --border:           #3d3d3d;
  --border-soft:      #3a3a3a;
  --text:             #d4cfc8;
  --text-muted:       #6e6860;
  --link:             #c8956e;
  --link-hover:       #e8a870;
  --accent-1:         #c8682a;
  --accent-2:         #a85520;
  --accent-border:    #7a3a14;
  --accent-text:      #f0d4b8;
  --nav-1:            #1a1a1a;
  --nav-2:            #111111;
  --nav-border:       #111111;
  --nav-text:         #d4cfc8;
  --nav-active:       #c8956e;
  --nav-hover:        rgba(255,255,255,0.06);
  --nav-active-bg:    rgba(0,0,0,0.3);
  --hero-1:           #2e2e2e;
  --hero-2:           #1e1e1e;
  --hero-text:        #d4cfc8;
  --hero-shine:       rgba(255,255,255,0.05);
  --badge-1:          #c8682a;
  --badge-2:          #a85520;
  --badge-border:     #7a3a14;
  --badge-text:       #f0d4b8;
  --tag-bg:           #a85520;
  --tag-text:         #f0d4b8;
  --tag-update:       #c8682a;
  --tag-post:         #7a3a14;
  --sidenav-hover:    #333333;
  --sidenav-active:   #383838;
  --sidenav-active-c: #e8a870;
  --tweet-bg:         #2e2e2e;
  --ad-s1:            #2a2a2a;
  --ad-s2:            #262626;
  --yt-s1:            #1e1e1e;
  --yt-s2:            #181818;
  --yt-ph-color:      #555;
  --visitor-bg:       #2e2e2e;
  --fc2-bg:           #242424;
  --fc2-border:       #3a3a3a;
  --fc2-shadow:       #1e1e1e;
  --admin-screen-bg:  #1e1e1e;
  --admin-key-1:      #333333;
  --admin-key-2:      #2a2a2a;
  --admin-sec-1:      #333333;
  --admin-sec-2:      #2a2a2a;
  --admin-sec-text:   #d4cfc8;
  --admin-error:      #c86868;
}

html[data-theme="light"] {
  --bg:               #f4e8d0;
  --bg-panel:         #ffffff;
  --bg-inset:         #fffbee;
  --bg-input:         #fffbee;
  --bg-deep:          #ffe8c2;
  --bg-gradient:      radial-gradient(circle at 20% 10%, #fff3d6 0%, transparent 40%),
                      radial-gradient(circle at 80% 30%, #ffe8c2 0%, transparent 45%);
  --border:           #b8824d;
  --border-soft:      #e2c89a;
  --text:             #3a2818;
  --text-muted:       #8a7050;
  --link:             #8b2e2e;
  --link-hover:       #e8751a;
  --accent-1:         #e8751a;
  --accent-2:         #c45c0e;
  --accent-border:    #8b4510;
  --accent-text:      #ffffff;
  --nav-1:            #a8383a;
  --nav-2:            #7a2527;
  --nav-border:       #5a1c1e;
  --nav-text:         #ffeed4;
  --nav-active:       #ffd27a;
  --nav-hover:        rgba(255,255,255,0.1);
  --nav-active-bg:    rgba(0,0,0,0.25);
  --hero-1:           #ffd89a;
  --hero-2:           #f5b05a;
  --hero-text:        #5a3a1a;
  --hero-shine:       rgba(255,255,255,0.4);
  --badge-1:          #ffd93d;
  --badge-2:          #f4a82c;
  --badge-border:     #8b2e2e;
  --badge-text:       #8b2e2e;
  --tag-bg:           #f4c430;
  --tag-text:         #5a3a1a;
  --tag-update:       #e8751a;
  --tag-post:         #8b2e2e;
  --sidenav-hover:    #fff3d6;
  --sidenav-active:   #ffe0b0;
  --sidenav-active-c: #8b2e2e;
  --tweet-bg:         #ffffff;
  --ad-s1:            #fff3d6;
  --ad-s2:            #ffe8c2;
  --yt-s1:            #2a2a2a;
  --yt-s2:            #1e1e1e;
  --yt-ph-color:      #ccc;
  --visitor-bg:       #ffffff;
  --fc2-bg:           #ffffff;
  --fc2-border:       #e2c89a;
  --fc2-shadow:       #fff8dc;
  --admin-screen-bg:  #fffbee;
  --admin-key-1:      #fef1cd;
  --admin-key-2:      #f8ddb0;
  --admin-sec-1:      #f3ead6;
  --admin-sec-2:      #e2cfaa;
  --admin-sec-text:   #5a3a1a;
  --admin-error:      #8b2e2e;
}

/* ---------- Reset ---------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 11px;
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  line-height: 1.45;
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ---------- Layout shell ---------- */

.page {
  width: 960px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

/* ---------- Top nav bar ---------- */

.top-nav {
  background: linear-gradient(to bottom, var(--nav-1) 0%, var(--nav-2) 100%);
  border: 1px solid var(--nav-border);
  border-radius: 4px 4px 0 0;
  height: 32px;
  display: flex;
  align-items: stretch;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.top-nav a {
  color: var(--nav-text);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  border-right: 1px solid rgba(128,128,128,0.15);
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.top-nav a:hover {
  background: var(--nav-hover);
  color: var(--accent-text);
  text-decoration: none;
}
.top-nav a.active {
  background: var(--nav-active-bg);
  color: var(--nav-active);
}

/* Theme toggle button in nav */
#themeToggle {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--nav-text);
  cursor: pointer;
  font-size: 14px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  opacity: 0.8;
}
#themeToggle:hover { opacity: 1; }

/* ---------- Header row (logo + hero) ---------- */

.header-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px;
  margin-top: 6px;
}

.logo-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

.hero-box {
  background: linear-gradient(to bottom, var(--hero-1) 0%, var(--hero-2) 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hero-text);
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
  box-shadow: 1px 1px 0 rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}
.hero-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(to bottom, var(--hero-shine), transparent);
  pointer-events: none;
}

/* ---------- Sign up bouncy badge ---------- */

.signup-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, var(--badge-1) 0%, var(--badge-2) 100%);
  border: 2px solid var(--badge-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--badge-text);
  font-weight: bold;
  font-size: 9px;
  text-align: center;
  line-height: 1.1;
  animation: bounce 1.2s infinite ease-in-out;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  z-index: 10;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-4px) rotate(3deg); }
}

/* ---------- Main 3-column grid ---------- */

.main-grid {
  display: grid;
  grid-template-columns: 180px 1fr 170px;
  gap: 6px;
  margin-top: 6px;
  align-items: stretch;
}

/* ---------- Sidebar ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar > *:last-child { flex: 1 1 auto; }

.side-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.1);
  overflow: hidden;
}

.side-box-title {
  background: linear-gradient(to bottom, var(--accent-1) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: bold;
  padding: 5px 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--accent-border);
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.side-nav {
  list-style: none;
  padding: 4px 0;
}
.side-nav li { border-bottom: 1px dashed var(--border-soft); }
.side-nav li:last-child { border-bottom: none; }
.side-nav a {
  display: block;
  padding: 7px 12px 7px 24px;
  color: var(--text);
  font-size: 11px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><polygon points='0,0 8,4 0,8' fill='%23c8682a'/></svg>");
  background-repeat: no-repeat;
  background-position: 10px center;
}
html[data-theme="light"] .side-nav a {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><polygon points='0,0 8,4 0,8' fill='%23e8751a'/></svg>");
}
.side-nav a:hover {
  background-color: var(--sidenav-hover);
  color: var(--link);
  text-decoration: none;
}
.side-nav a.active {
  background-color: var(--sidenav-active);
  color: var(--sidenav-active-c);
  font-weight: bold;
}

/* ---------- Center column ---------- */

.center {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

.panel-title {
  background: linear-gradient(to bottom, var(--accent-1) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: bold;
  padding: 6px 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--accent-border);
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-title .more {
  font-size: 10px;
  font-weight: normal;
  color: var(--accent-text);
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}
.panel-title .more:hover { opacity: 1; color: var(--accent-text); }

.panel-body {
  padding: 10px;
}

/* ---------- YouTube player panel ---------- */

.yt-panel .panel-body {
  padding: 8px;
}
.yt-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.yt-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.yt-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yt-ph-color);
  font-size: 12px;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, var(--yt-s1) 0 8px, var(--yt-s2) 8px 16px);
}
.yt-form {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.yt-form input[type="text"] {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 11px;
  background: var(--bg-input);
  color: var(--text);
}
.yt-form button {
  background: linear-gradient(to bottom, var(--accent-1) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  padding: 4px 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.yt-form button:hover { filter: brightness(1.1); }

/* ---------- Two-up ---------- */

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}
.two-up > .panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.two-up > .panel > .panel-body {
  flex: 1;
  overflow: auto;
}

.notice-list, .tweet-list {
  list-style: none;
}
.notice-list li, .tweet-list li {
  padding: 5px 0;
  border-bottom: 1px dashed var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.notice-list li:last-child, .tweet-list li:last-child {
  border-bottom: none;
}

.tweet-embed {
  width: 100%;
  background: var(--tweet-bg);
  padding: 4px;
}
.tweet-embed iframe {
  width: 100% !important;
  max-width: 100%;
  display: block;
}

.sidebar .tweet-box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.sidebar .tweet-box .tweet-embed {
  flex: 1;
  overflow: hidden;
}

.notice-list .tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 9px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 2px;
  margin-right: 5px;
  text-transform: uppercase;
}
.notice-list .tag.update { background: var(--tag-update); color: var(--accent-text); }
.notice-list .tag.post   { background: var(--tag-post);   color: var(--accent-text); }
.notice-list .date, .tweet-list .date {
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.notice-list .title, .tweet-list .text {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Right column ---------- */

.rightcol {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ad-box {
  background: repeating-linear-gradient(45deg, var(--ad-s1) 0 10px, var(--ad-s2) 10px 20px);
  border: 1px dashed var(--border);
  border-radius: 3px;
  flex: 1 1 auto;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
  padding: 12px;
}

/* ---------- Big bottom placeholder ---------- */

.big-placeholder {
  margin-top: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

/* ---------- Blog list ---------- */

.blog-list {
  list-style: none;
}
.blog-list li {
  padding: 5px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 10px;
}
.blog-list li:last-child { border-bottom: none; }
.blog-list .date {
  display: block;
  color: var(--text-muted);
  font-size: 9px;
  margin-top: 1px;
}
.blog-list a {
  color: var(--text);
  font-weight: bold;
}
.blog-list a:hover { color: var(--link); }

.empty-state {
  color: var(--text-muted);
  font-size: 11px;
}

/* ---------- Bottom boxes row ---------- */

.bottom-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.mini-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

/* ---------- Visitor counter ---------- */

.visitor-counter {
  padding: 8px 8px 10px;
  text-align: center;
  background: var(--visitor-bg);
}
.visitor-heading {
  font-size: 10px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.visitor-counter img,
.visitor-counter script + img,
.visitor-counter a img {
  display: inline-block;
  vertical-align: middle;
}
.fc2-wrap {
  display: inline-block;
  padding: 4px 6px;
  background: var(--fc2-bg);
  border: 0px solid var(--fc2-border);
  border-radius: 0px;
  box-shadow: inset 0 0 0 0px var(--fc2-shadow);
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 10px;
  padding: 16px 0 0;
}
.footer a { color: var(--link); }

/* ---------- Page content (subpages) ---------- */

.page-content {
  padding: 16px 20px;
  min-height: 340px;
}
.page-content h1 {
  font-size: 16px;
  color: var(--link);
  margin-bottom: 10px;
  border-bottom: 2px dashed var(--border-soft);
  padding-bottom: 6px;
}
.page-content h2 {
  font-size: 13px;
  color: var(--accent-1);
  margin: 14px 0 6px;
}
.page-content p {
  margin-bottom: 10px;
  font-size: 11px;
  line-height: 1.6;
}
.page-content ul { padding-left: 20px; margin-bottom: 10px; }
.page-content li { margin-bottom: 3px; font-size: 11px; }

/* ---------- Guestbook ---------- */

.gb-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
  margin-bottom: 16px;
}
.gb-form input, .gb-form textarea {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 7px;
  font-family: inherit;
  font-size: 11px;
  background: var(--bg-input);
  color: var(--text);
}
.gb-form textarea { min-height: 70px; resize: vertical; }
.gb-form button {
  align-self: flex-start;
  background: linear-gradient(to bottom, var(--accent-1) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  padding: 5px 16px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}
.gb-form button:hover { filter: brightness(1.1); }

.gb-entry {
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--bg-inset);
}
.gb-entry .meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.gb-entry .name { color: var(--link); font-weight: bold; }

.entry-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
  margin-bottom: 16px;
}
.entry-form input,
.entry-form textarea {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 7px;
  font-family: inherit;
  font-size: 11px;
  background: var(--bg-input);
  color: var(--text);
}
.entry-form textarea {
  min-height: 100px;
  resize: vertical;
}
.entry-form button {
  align-self: flex-start;
  background: linear-gradient(to bottom, var(--accent-1) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  padding: 5px 16px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}
.entry-form button:hover { filter: brightness(1.1); }

.entry-card {
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--bg-inset);
}
.entry-card h3 {
  font-size: 13px;
  color: var(--link);
  margin-bottom: 4px;
}
.entry-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.entry-card p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

/* ---------- Admin ---------- */

.admin-shell {
  max-width: 760px;
}

.admin-screen {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--admin-screen-bg);
  color: var(--link);
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  letter-spacing: 4px;
  padding: 10px 12px;
  margin: 12px 0;
  min-height: 42px;
}

.admin-status {
  min-height: 18px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.admin-status.is-error {
  color: var(--admin-error);
}

.ascii-lock {
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
  background: var(--admin-screen-bg);
  border: 1px dashed var(--border-soft);
  border-radius: 3px;
  padding: 10px;
  margin-bottom: 10px;
  white-space: pre;
}

.admin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 6px;
  margin-bottom: 12px;
}

.admin-key {
  background: linear-gradient(to bottom, var(--admin-key-1) 0%, var(--admin-key-2) 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 12px 0;
}
.admin-key:hover { filter: brightness(1.1); }

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-button {
  background: linear-gradient(to bottom, var(--accent-1) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}
.admin-button:hover { filter: brightness(1.1); }

.admin-button.secondary {
  background: linear-gradient(to bottom, var(--admin-sec-1) 0%, var(--admin-sec-2) 100%);
  color: var(--admin-sec-text);
  border-color: var(--border);
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-section {
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  background: var(--bg-inset);
  padding: 12px;
}

.admin-section h2 { margin-top: 0; }

.admin-list { margin-top: 12px; }

.admin-entry-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.admin-entry-actions button {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--link);
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: bold;
  padding: 4px 8px;
}
.admin-entry-actions button:hover { background: var(--sidenav-hover); }

.admin-hidden { display: none; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
}

/* ---------- Socials ---------- */

.socials-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-width: 520px;
}
.socials-list li {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  background: var(--bg-inset);
  font-size: 11px;
}
.socials-list .label {
  font-weight: bold;
  color: var(--link);
  display: block;
  margin-bottom: 2px;
}

/* ---------- Announcement tag (light purple) ---------- */

.notice-list .tag.announcement { background: #b09ad8; color: #fff; }

/* ---------- Entry divider ---------- */

.entry-divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 8px 0 12px;
}

/* ---------- Clickable blog card ---------- */

.entry-clickable {
  cursor: pointer;
  transition: background 0.1s;
}
.entry-clickable:hover { background: var(--sidenav-hover); }

.read-more {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: bold;
  color: var(--accent-1);
}

/* ---------- Blog modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 40px;
  overflow-y: auto;
}
.modal-hidden { display: none !important; }

.modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 640px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-content {
  padding: 20px 24px 24px;
}
.modal-content h2 {
  font-size: 15px;
  color: var(--link);
  margin-bottom: 4px;
  padding-right: 24px;
}
.modal-body-text {
  font-size: 11px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  margin: 10px 0 20px;
}

/* ---------- Comments ---------- */

.modal-comments {
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}
.modal-comments-title {
  font-size: 11px;
  font-weight: bold;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.comment-entry {
  padding: 7px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  background: var(--bg-inset);
  margin-bottom: 6px;
}
.comment-name {
  font-weight: bold;
  color: var(--link);
  font-size: 11px;
}
.comment-date {
  color: var(--text-muted);
  font-size: 10px;
  margin-left: 8px;
}
.comment-body {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text);
}
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.comment-form input,
.comment-form textarea {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 7px;
  font-family: inherit;
  font-size: 11px;
  background: var(--bg-input);
  color: var(--text);
}
.comment-form textarea { min-height: 70px; resize: vertical; }
.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comment-form button {
  background: linear-gradient(to bottom, var(--accent-1) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}
.comment-form button:hover { filter: brightness(1.1); }
.comment-status { font-size: 10px; color: var(--text-muted); }
.comment-status.is-error { color: var(--admin-error); }

/* ---------- Admin tag select ---------- */

.entry-form select {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 7px;
  font-family: inherit;
  font-size: 11px;
  background: var(--bg-input);
  color: var(--text);
}

/* ---------- Admin settings ---------- */

.admin-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  font-size: 11px;
  color: var(--text);
}

.admin-button.is-active {
  background: linear-gradient(to bottom, var(--accent-1) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  border-color: var(--accent-border);
  font-weight: bold;
}

/* ---------- Admin login form ---------- */

#adminLoginForm {
  display: flex;
  gap: 6px;
  margin: 10px 0;
}

#adminCodeInput {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 12px;
  background: var(--bg-input);
  color: var(--text);
}
