:root {
  --bg-image: url("/api/site-image?name=desktop-bg&mode=view");
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --card: rgba(31, 33, 56, 0.42);
  --card-strong: rgba(31, 33, 56, 0.62);
  --border: rgba(255, 255, 255, 0.24);
  --shadow: rgba(42, 36, 86, 0.38);
  --accent: #cbb8ff;
  --accent-2: #f8c4de;
  --error: #ffd0d0;
}

@media (max-width: 767px) {
  :root {
    --bg-image: url("/api/site-image?name=mobile-bg&mode=view");
  }
}

* {
  box-sizing: border-box;
}

.protected-site-image,
.protected-site-image *,
.wallpaper-preview {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #1f1f3b;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(54, 51, 112, 0.58), rgba(245, 170, 215, 0.25));
  backdrop-filter: blur(1.2px);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.auth-shell,
.home-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.glass-card {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 24px 80px var(--shadow);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

.auth-card,
.home-card {
  width: min(92vw, 460px);
  border-radius: 32px;
  padding: 30px;
  text-align: center;
}

.site-logo,
.home-logo {
  display: inline-block;
  width: 104px;
  height: 104px;
  border-radius: 28px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 16px 40px rgba(70, 54, 125, 0.38);
  background-image: url("/api/site-image?name=logo&mode=view");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}


.home-card {
  width: min(94vw, 920px);
}

.home-logo {
  width: 92px;
  height: 92px;
}

.eyebrow {
  margin: 18px 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(32px, 7vw, 44px);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-size: 26px;
}

h3 {
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.access-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 22px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9effc1;
  box-shadow: 0 0 18px #9effc1;
}

.login-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.login-form label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}

.login-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  outline: none;
  border-radius: 18px;
  padding: 15px 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.login-form input:focus {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(203, 184, 255, 0.25);
}

.login-form input:disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.guest-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.guest-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #cbb8ff;
}

.error-message {
  margin: -4px 0 0;
  color: var(--error);
  font-size: 14px;
}


.turnstile-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 74px;
  margin: 2px 0 0;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.turnstile-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-align: center;
}


.primary-button,
.secondary-button,
.menu-button,
.text-button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  margin-top: 8px;
  padding: 15px 18px;
  border-radius: 18px;
  color: #2d2146;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent), var(--accent-2));
  box-shadow: 0 16px 38px rgba(248, 196, 222, 0.28);
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.menu-button {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-radius: 24px;
  padding: 16px;
  text-align: left;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.menu-button:hover,
.menu-button:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.23);
  border-color: rgba(255, 255, 255, 0.42);
}

.menu-button span {
  font-size: 18px;
  font-weight: 800;
}

.menu-button small {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.menu-button.disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.menu-button.disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.15);
}

.logout-form {
  margin-top: 22px;
}

.text-button {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
}

.text-button:hover {
  color: #fff;
}

.modal,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.modal.open,
.lightbox.open {
  display: block;
}

.modal-backdrop,
.lightbox {
  background: rgba(14, 15, 34, 0.74);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(92vw, 900px);
  max-height: min(86vh, 760px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: 30px;
  padding: 24px;
  background: var(--card-strong);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.wallpaper-list {
  display: grid;
  gap: 16px;
}

.wallpaper-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.wallpaper-preview {
  width: 100%;
  height: 130px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.wallpaper-preview-mobile {
  background-image: url("/api/site-image?name=mobile-bg&mode=view");
}

.wallpaper-preview-desktop {
  background-image: url("/api/site-image?name=desktop-bg&mode=view");
}

.wallpaper-info p {
  color: var(--muted);
  line-height: 1.6;
}

.wallpaper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 11px 14px;
  border-radius: 999px;
  color: #2d2146;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
}

.lightbox {
  z-index: 30;
  place-items: center;
  padding: 24px;
}

.lightbox.open {
  display: grid;
}

.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox img.protected-site-image {
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.lightbox-close {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 31;
}

@media (max-width: 767px) {
  .auth-shell,
  .home-shell {
    padding: 18px;
    align-items: end;
  }

  .auth-card,
  .home-card {
    width: 100%;
    border-radius: 28px;
    padding: 24px;
  }

  .button-grid {
    grid-template-columns: 1fr;
  }

  .menu-button {
    min-height: 86px;
  }

  .modal-panel {
    width: calc(100vw - 28px);
    padding: 18px;
    border-radius: 24px;
  }

  .wallpaper-item {
    grid-template-columns: 1fr;
  }

  .wallpaper-item img {
    height: 220px;
  }
}

.role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 0;
  padding: 8px 13px;
  border-radius: 999px;
  color: #2d2146;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.86);
}

.role-pill.guest {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.small-text {
  margin-bottom: 0;
  font-size: 13px;
}

.success-message {
  color: #bbffd0;
}

.blog-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  text-align: left;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading .eyebrow {
  margin-top: 0;
}

.blog-editor {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.blog-editor label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}

.blog-editor input,
.blog-editor textarea,
.blog-editor select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  outline: none;
  border-radius: 18px;
  padding: 13px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.blog-editor textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.7;
}

.blog-editor select option {
  color: #222;
}

.blog-editor input::placeholder,
.blog-editor textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.blog-editor input:focus,
.blog-editor textarea:focus,
.blog-editor select:focus {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(203, 184, 255, 0.25);
}

.blog-list {
  display: grid;
  gap: 16px;
}

.blog-post {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.post-header h3 {
  margin-bottom: 5px;
  font-size: 20px;
}

.post-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.post-content {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  word-break: break-word;
}

.post-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.post-image-button {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  cursor: zoom-in;
}

.post-image-button img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.danger-button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(255, 208, 208, 0.42);
  border-radius: 999px;
  color: #ffd0d0;
  font-weight: 800;
  background: rgba(255, 80, 80, 0.14);
  cursor: pointer;
}

@media (max-width: 767px) {
  .home-card {
    width: 100%;
  }

  .section-heading {
    display: grid;
  }

  .post-header {
    display: grid;
  }
}

/* 2026-05-07 update: diary moved into modal and shown as a list. */
.blog-modal-panel {
  width: min(94vw, 980px);
  text-align: left;
}

.blog-view-toolbar {
  margin: 0 0 14px;
}

.diary-list-item {
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.13);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.diary-list-item:hover,
.diary-list-item:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.38);
}

.diary-list-title {
  font-size: 18px;
  font-weight: 900;
}

.diary-list-meta,
.diary-list-summary {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.diary-list-meta {
  font-size: 13px;
}

.diary-list-summary {
  font-size: 14px;
}

.blog-detail {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.blog-detail[hidden],
.blog-list[hidden],
.blog-view-toolbar[hidden],
.blog-editor[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .blog-modal-panel {
    width: calc(100vw - 28px);
  }

  .blog-editor {
    padding: 14px;
  }

  .diary-list-item {
    padding: 14px;
  }
}

/* 2026-05-07 update: message board, diary editing, image links, and inline image insertion. */
.messages-modal-panel {
  width: min(94vw, 980px);
  text-align: left;
  padding-bottom: 90px;
}

.message-list,
.message-editor {
  display: grid;
  gap: 16px;
}

.message-editor,
.blog-editor {
  text-align: left;
}

.message-editor {
  margin: 0 0 20px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.message-editor label,
.blog-editor label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}

.message-editor input,
.message-editor textarea,
.blog-editor input,
.blog-editor textarea,
.blog-editor select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  outline: none;
  border-radius: 18px;
  padding: 13px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.message-editor textarea,
.blog-editor textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.message-editor input::placeholder,
.message-editor textarea::placeholder,
.blog-editor input::placeholder,
.blog-editor textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.message-editor input:focus,
.message-editor textarea:focus,
.blog-editor input:focus,
.blog-editor textarea:focus,
.blog-editor select:focus {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(203, 184, 255, 0.25);
}

.inline-check {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.inline-check input {
  width: 18px !important;
  height: 18px;
  padding: 0;
  accent-color: #cbb8ff;
}

.editor-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.editor-actions .primary-button {
  width: auto;
  min-width: 150px;
}

.message-view-toolbar {
  margin: 0 0 14px;
}

.message-detail {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-field {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-field h4 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.detail-field p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.75;
  word-break: break-word;
}

.inline-image-wrap {
  margin: 12px 0;
}

.inline-image-wrap .post-image-button {
  display: block;
  width: min(100%, 560px);
}

.inline-image-wrap .post-image-button img {
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.18);
}

.post-images {
  margin-top: 14px;
}

.floating-message-button {
  position: sticky;
  left: 100%;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 13px 18px;
  border: 0;
  border-radius: 999px;
  color: #2d2146;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--accent), var(--accent-2));
  box-shadow: 0 18px 42px rgba(248, 196, 222, 0.36);
  cursor: pointer;
}

.floating-message-button span {
  font-size: 20px;
  line-height: 1;
}

.wide-danger {
  margin-top: 8px;
}

.message-detail[hidden],
.message-list[hidden],
.message-view-toolbar[hidden],
.message-editor[hidden],
.floating-message-button[hidden],
#post-keep-images-row[hidden],
#cancel-post-edit[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .messages-modal-panel {
    width: calc(100vw - 28px);
    padding-bottom: 82px;
  }

  .message-editor {
    padding: 14px;
  }

  .editor-actions,
  .detail-actions {
    display: grid;
  }

  .editor-actions .primary-button,
  .editor-actions .secondary-button,
  .detail-actions .secondary-button,
  .detail-actions .danger-button {
    width: 100%;
  }

  .floating-message-button {
    left: auto;
    width: 100%;
  }
}

/* 2026-05-07 update: message required marks, admin replies, and reply editing. */
.required-star {
  color: #ffd0e6;
  font-weight: 900;
}

.reply-editor {
  display: grid;
  gap: 16px;
  margin: 0 0 20px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: left;
}

.reply-editor label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}

.reply-editor input,
.reply-editor textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  outline: none;
  border-radius: 18px;
  padding: 13px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.reply-editor textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.reply-editor input::placeholder,
.reply-editor textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.reply-editor input:focus,
.reply-editor textarea:focus {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(203, 184, 255, 0.25);
}

.reply-list {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
}

.reply-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.reply-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.reply-title {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.12em;
  font-weight: 900;
}

.reply-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emoji-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 17px;
}

.emoji-action:hover,
.emoji-action:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.reply-editor[hidden],
#reply-keep-images-row[hidden],
#cancel-reply-write[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .reply-editor {
    padding: 14px;
  }

  .reply-header {
    display: grid;
  }
}

/* 2026-05-07 update: diary write button, diary guest replies, image numbering hints. */
.blog-list-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 14px;
}

.blog-reply-editor {
  display: grid;
  gap: 16px;
  margin: 0 0 20px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: left;
}

.blog-reply-editor label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}

.blog-reply-editor input,
.blog-reply-editor textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  outline: none;
  border-radius: 18px;
  padding: 13px 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.blog-reply-editor textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.blog-reply-editor input::placeholder,
.blog-reply-editor textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.blog-reply-editor input:focus,
.blog-reply-editor textarea:focus {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(203, 184, 255, 0.25);
}

.image-number-list {
  display: grid;
  gap: 7px;
  margin: -4px 0 2px;
  padding: 10px 12px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  line-height: 1.5;
}

.image-number-list strong {
  color: var(--accent);
}

.image-number-chip {
  display: block;
  overflow-wrap: anywhere;
}

.blog-list-toolbar[hidden],
.blog-reply-editor[hidden],
.image-number-list[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .blog-list-toolbar {
    display: grid;
  }

  .blog-list-toolbar .secondary-button,
  .blog-reply-editor .primary-button,
  .blog-reply-editor .secondary-button {
    width: 100%;
  }

  .blog-reply-editor {
    padding: 14px;
  }
}

/* 2026-05-07 update: diary comments, admin replies, and Markdown/HTML rendering. */
.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
  margin: 0.9em 0 0.45em;
  line-height: 1.35;
}

.rich-content p,
.rich-content ul,
.rich-content ol,
.rich-content blockquote,
.rich-content pre,
.rich-content table {
  margin: 0 0 0.9em;
}

.rich-content ul,
.rich-content ol {
  padding-left: 1.4em;
}

.rich-content blockquote {
  padding: 10px 14px;
  border-left: 4px solid rgba(203, 184, 255, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.rich-content code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.rich-content pre {
  overflow: auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
}

.rich-content pre code {
  padding: 0;
  background: transparent;
}

.rich-content a {
  color: #efe7ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.rich-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

.rich-content th,
.rich-content td {
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.comments-section .comments-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-list {
  margin-bottom: 0;
}

.comment-header {
  align-items: center;
}

.comment-inline-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.compact-button {
  min-width: auto;
  padding: 8px 12px;
  font-size: 13px;
}

.blog-comment-detail-panel {
  width: min(92vw, 820px);
  text-align: left;
}

#blog-reply-nickname-row {
  display: grid;
  gap: 8px;
}

#blog-reply-nickname-row[hidden],
#blog-reply-keep-images-row[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .comments-section .comments-heading,
  .comment-header {
    display: grid;
  }

  .comment-inline-actions {
    justify-content: stretch;
  }

  .comment-inline-actions .secondary-button {
    width: 100%;
  }
}
