.admin-shell {
  min-height: 100vh;
  overflow: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--text);
  padding: 34px 18px 72px;
}

.admin-container {
  width: min(1200px, calc(100vw - 36px));
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-header h1 {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 400;
}

.admin-board {
  border: 1px solid var(--line-strong);
  background: rgba(4, 8, 10, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 28px 80px rgba(0, 0, 0, 0.24);
}

.admin-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.admin-tabs button,
.admin-module-head button,
.admin-form button,
.settings-form button,
.admin-row button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 0 14px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.admin-tabs button.active,
.admin-tabs button:hover,
.admin-module-head button:hover,
.admin-form button:hover,
.settings-form button:hover,
.admin-row button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(24, 228, 255, 0.08);
  box-shadow: 0 0 18px rgba(24, 228, 255, 0.12);
}

.admin-module {
  display: none;
  padding: 22px;
}

.admin-module.active {
  display: grid;
  gap: 18px;
}

.admin-subtabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 460px;
}

.admin-subtabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
}

.admin-subtabs button.active,
.admin-subtabs button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(24, 228, 255, 0.08);
  box-shadow: 0 0 18px rgba(24, 228, 255, 0.12);
}

.admin-subpanel {
  display: none;
}

.admin-subpanel.active {
  display: block;
}

.admin-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.admin-module-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.admin-module-head small {
  color: var(--cyan);
  letter-spacing: 0.16em;
}

.admin-composer {
  display: grid;
  gap: 14px;
  align-content: start;
  border: 0;
  background: transparent;
  padding: 0;
}

.mood-composer,
.log-composer {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.log-composer {
  grid-template-columns: minmax(0, 1fr);
}

.single-composer,
.publish-stack,
.manage-stack {
  display: grid;
  gap: 16px;
}

.composer-card {
  display: grid;
  gap: 16px;
  align-content: start;
  border: 1px solid rgba(233, 244, 247, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012)),
    rgba(4, 9, 11, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  padding: 20px;
}

.composer-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span {
  color: #9dacb3;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.field input,
.field select,
.field textarea,
.admin-composer input,
.admin-composer select,
.admin-composer textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--field-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--field-bg);
  color: var(--text);
  padding: 11px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.admin-composer input:hover,
.admin-composer select:hover,
.admin-composer textarea:hover {
  border-color: var(--field-border-hover);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022)),
    var(--field-bg-active);
}

.field input::placeholder,
.field textarea::placeholder,
.admin-composer input::placeholder,
.admin-composer textarea::placeholder {
  color: rgba(216, 228, 232, 0.46);
}

.field select,
.admin-composer select,
.admin-form select,
.settings-form select,
.admin-row-actions select {
  appearance: none;
  color-scheme: dark;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(238, 246, 247, 0.82) 50%),
    linear-gradient(135deg, rgba(238, 246, 247, 0.82) 50%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.field select option,
.admin-composer select option,
.admin-form select option,
.settings-form select option,
.admin-row-actions select option {
  background: #10171b;
  color: #eaf5f7;
}

.field select option:checked,
.admin-composer select option:checked,
.admin-form select option:checked,
.settings-form select option:checked,
.admin-row-actions select option:checked {
  background: #24313a;
  color: #ffffff;
}

.field input,
.field select {
  min-height: 44px;
}

.field-main textarea,
.body-field textarea {
  min-height: 360px;
  font-size: 18px;
  line-height: 1.7;
}

.rich-field > textarea[data-rich-textarea] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.rich-editor {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.rich-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 12, 15, 0.96);
  padding: 10px;
}

.rich-toolbar button {
  min-height: 30px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
}

.rich-toolbar button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.rich-surface {
  min-height: 420px;
  padding: 22px;
  line-height: 1.8;
  outline: none;
}

.rich-surface:focus {
  box-shadow: inset 0 0 0 1px rgba(24, 228, 255, 0.3);
}

.rich-surface img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  cursor: pointer;
}

.rich-surface figure {
  margin: 18px 0;
}

.rich-surface figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.canvas-log-field {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.canvas-log-field > span:first-child {
  color: #9dacb3;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.canvas-log-field > textarea[data-log-editor-html],
.canvas-log-field > textarea[data-log-editor-json],
.canvas-log-field > textarea[data-log-editor-text] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.canvas-log-editor {
  border: 1px solid rgba(233, 244, 247, 0.14);
  background:
    radial-gradient(circle at 50% 0, rgba(0, 229, 255, 0.08), transparent 32%),
    #03080a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 30px 90px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.canvas-log-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  overflow: visible;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    #0a1115;
}

.canvas-log-toolbar .tool-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-height: 30px;
  padding: 0 8px 0 0;
  margin-right: 2px;
  border-right: 1px solid rgba(233, 244, 247, 0.12);
}

.canvas-log-toolbar .tool-group:last-child {
  border-right: 0;
}

.canvas-log-toolbar button,
.canvas-log-toolbar select,
.canvas-log-toolbar input[type="color"] {
  min-height: 30px;
  border: 1px solid rgba(233, 244, 247, 0.13);
  background: rgba(255, 255, 255, 0.045);
  color: #edf8fb;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.canvas-log-toolbar button {
  padding: 0 8px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}

.canvas-log-toolbar button:hover,
.canvas-log-toolbar select:hover,
.canvas-log-toolbar input[type="color"]:hover {
  border-color: rgba(24, 228, 255, 0.45);
  background: rgba(24, 228, 255, 0.11);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(24, 228, 255, 0.12);
}

.canvas-log-toolbar select {
  width: auto;
  min-width: 82px;
  padding: 0 6px;
  color-scheme: dark;
}

.canvas-log-toolbar input[type="color"] {
  width: 34px;
  padding: 2px;
}

.canvas-log-viewport {
  height: min(78vh, 880px);
  min-height: 650px;
  overflow: auto;
  padding: 28px 0 44px;
  background:
    linear-gradient(rgba(0, 229, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.014) 1px, transparent 1px),
    radial-gradient(circle at 50% 0, rgba(24, 228, 255, 0.055), transparent 40%),
    #020608;
  background-size: 30px 30px, 30px 30px, auto, auto;
}

.canvas-log-viewport canvas {
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.4));
}

.log-meta-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 0.8fr) minmax(110px, 0.45fr) minmax(110px, 0.45fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(233, 244, 247, 0.12);
  background:
    linear-gradient(90deg, rgba(24, 228, 255, 0.035), transparent 36%),
    rgba(255, 255, 255, 0.018);
  padding: 14px;
}

.log-meta-strip textarea {
  min-height: 42px;
  resize: vertical;
}

.log-meta-strip input,
.log-meta-strip select {
  min-height: 42px;
}

.log-submit-actions {
  align-self: end;
  min-width: 118px;
}

.log-submit-actions button {
  width: 100%;
  min-height: 42px;
}

.admin-composer button,
.admin-subtabs button,
.admin-tabs button,
.admin-module-head button,
.settings-form button,
.admin-row button {
  border-color: rgba(233, 244, 247, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(12, 18, 22, 0.92);
  color: #dce9ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.admin-composer button:hover,
.admin-subtabs button:hover,
.admin-tabs button:hover,
.admin-module-head button:hover,
.settings-form button:hover,
.admin-row button:hover,
.admin-subtabs button.active,
.admin-tabs button.active {
  border-color: rgba(24, 228, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(24, 228, 255, 0.12), rgba(24, 228, 255, 0.035)),
    rgba(10, 24, 29, 0.96);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(24, 228, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.log-submit-actions button,
.composer-actions button[type="submit"] {
  border-color: rgba(24, 228, 255, 0.58);
  color: var(--cyan);
  background:
    linear-gradient(180deg, rgba(24, 228, 255, 0.12), rgba(24, 228, 255, 0.045)),
    #0a171b;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.article-body th,
.article-body td {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 12px;
  vertical-align: top;
}

.article-body span {
  color: inherit;
}

.body-field.compact textarea {
  min-height: 220px;
}

.composer-controls textarea,
.form-grid textarea {
  min-height: 118px;
  line-height: 1.6;
}

.title-field input {
  min-height: 48px;
  font-size: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide-field {
  grid-column: span 2;
}

.slim-field {
  width: min(280px, 100%);
}

.file-field input {
  padding: 8px;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.admin-composer button {
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.admin-composer output {
  align-self: center;
  min-height: 20px;
  color: var(--cyan);
  font-size: 12px;
}

.admin-list-panel {
  min-height: 0;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-list-panel h3,
.section-head h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.section-head h3 {
  margin: 0;
}

.section-head button {
  min-height: 32px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 0 12px;
  font-size: 12px;
}

.admin-info-card p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.8;
}

.split-list h3:not(:first-child) {
  margin-top: 18px;
}

.full-list {
  max-height: none;
}

.admin-form,
.settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
}

.admin-form.compact {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) auto minmax(120px, 160px);
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 10px 12px;
}

.admin-form textarea,
.settings-form textarea {
  min-height: 86px;
  resize: vertical;
}

.admin-form output,
.settings-form output {
  align-self: center;
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-list:empty {
  display: none;
}

.admin-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 150px minmax(230px, auto);
  gap: 14px;
  align-items: center;
  min-height: 70px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.026);
  padding: 12px 14px;
}

.admin-row-badge {
  display: inline-flex;
  width: fit-content;
  min-width: 52px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(24, 228, 255, 0.32);
  color: var(--cyan);
  background: rgba(24, 228, 255, 0.07);
  font-size: 12px;
}

.admin-row-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.admin-row-main strong {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-main span,
.admin-row small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-row-actions button {
  min-width: 82px;
  min-height: 32px;
}

.admin-row-actions .danger-button {
  border-color: rgba(255, 79, 163, 0.46);
  color: var(--pink);
  background: rgba(255, 79, 163, 0.08);
}

.admin-row-actions input,
.admin-row-actions select {
  min-height: 32px;
  width: 130px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 6px 8px;
}

.admin-section {
  border: 1px solid var(--line-strong);
  background: rgba(4, 8, 10, 0.9);
  padding: 22px;
}

.admin-section h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 500;
}

.admin-capture-form {
  grid-template-columns: 120px minmax(140px, 1fr) minmax(160px, 1fr) minmax(220px, 1.2fr) 150px minmax(150px, 1fr) 92px minmax(90px, 120px);
  margin-bottom: 0;
}

.admin-settings-section .settings-form {
  max-height: none;
  overflow: visible;
}

.mood-empty,
.nav-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 240px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  text-align: center;
}

.mood-empty strong,
.nav-empty strong {
  color: var(--cyan);
  letter-spacing: 0.12em;
}

.status-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1.35fr 1.25fr 2fr 1.5fr 1.45fr 1fr;
  border-top: 1px solid var(--line-strong);
  background: rgba(8, 12, 14, 0.98);
}

.status-bar div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.storage-cell i {
  display: block;
  width: 90px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan) 62%, rgba(255, 255, 255, 0.12) 62%);
  box-shadow: 0 0 12px rgba(24, 228, 255, 0.5);
}

.auth-screen,
.install-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  background: radial-gradient(circle at 50% 20%, rgba(24, 228, 255, 0.12), transparent 28%), var(--bg);
}

.auth-panel,
.install-shell {
  width: min(1120px, 100%);
  border: 1px solid var(--line-strong);
  background: rgba(8, 12, 14, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.auth-panel {
  max-width: 440px;
  padding: 34px;
}

.auth-panel h1,
.install-header h1 {
  font-weight: 400;
}

.stack-form,
.install-grid {
  display: grid;
  gap: 18px;
}

.stack-form label,
.install-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.stack-form input,
.install-grid input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  color: #071014;
  padding: 0 12px;
}

.stack-form button,
.install-actions button {
  height: 42px;
  border: 1px solid white;
  background: white;
  color: #05080a;
}

.form-error {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 79, 79, 0.42);
  background: rgba(255, 79, 79, 0.08);
  color: #ffb5b5;
}

.install-shell {
  padding: 30px;
}

.install-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.install-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.install-grid fieldset {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
}

.install-grid legend {
  padding: 0 8px;
  color: var(--cyan);
}

.install-actions {
  grid-column: 1 / -1;
}

.install-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.install-test-button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  color: #061014;
  font-size: 12px;
}

.install-grid output {
  color: var(--muted);
  font-size: 12px;
}

.install-grid output.test-ok {
  color: var(--green);
  text-shadow: 0 0 10px rgba(45, 255, 149, 0.42);
}

.install-grid output.test-failed {
  color: var(--pink);
}

.install-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.install-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Polished app controls */
.toolbar-actions button,
.quick-capture-form button,
.settings-actions button,
.detail-edit-actions button,
.inline-tool-form button,
.library-actions button,
.inbox-actions button,
.restore-button,
.folder-filter-button,
.detail-preview .file-download-button {
  height: 36px;
  min-height: 36px;
  border: 1px solid rgba(238, 246, 247, 0.28);
  background: rgba(238, 246, 247, 0.08);
  color: var(--text);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.toolbar-actions button:hover,
.quick-capture-form button:hover,
.settings-actions button:hover,
.detail-edit-actions button:hover,
.inline-tool-form button:hover,
.library-actions button:hover,
.inbox-actions button:hover,
.restore-button:hover,
.folder-filter-button:hover,
.detail-preview .file-download-button:hover {
  border-color: var(--cyan);
  background: rgba(24, 228, 255, 0.13);
  box-shadow: 0 0 18px rgba(24, 228, 255, 0.14);
}

.quick-capture-form button,
.toolbar-actions .white-control,
.inline-tool-form button.primary-action,
.settings-actions button.primary-action {
  background: rgba(255, 255, 255, 0.92);
  color: #061014;
  border-color: rgba(255, 255, 255, 0.92);
}

.quick-capture-form select,
.quick-capture-form input,
.quick-capture-form textarea,
.settings-form input,
.detail-edit-form input,
.detail-edit-form textarea,
.inline-tool-form input {
  height: 38px;
  min-height: 38px;
  border: 1px solid rgba(238, 246, 247, 0.2);
  background: rgba(238, 246, 247, 0.92);
  color: #061014;
  padding: 0 12px;
  font-size: 13px;
}

.quick-capture-form textarea {
  height: 38px;
  padding-top: 9px;
}

.detail-edit-form textarea {
  height: 76px;
  padding-top: 10px;
}

input[type="file"] {
  color: rgba(232, 244, 247, 0.7);
  padding: 4px 8px;
}

input[type="file"]::file-selector-button {
  height: 28px;
  margin-right: 10px;
  border: 1px solid rgba(233, 244, 247, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.024)),
    #172127;
  color: #edf8fb;
  font-size: 12px;
  font-weight: 700;
}

input[type="file"]::file-selector-button:hover {
  border-color: rgba(24, 228, 255, 0.45);
  background:
    linear-gradient(180deg, rgba(24, 228, 255, 0.14), rgba(24, 228, 255, 0.045)),
    #12262c;
  color: #ffffff;
}

.module-content {
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  overflow: hidden;
}

.inline-tool-form {
  height: 42px;
  min-height: 42px;
  align-items: center;
  align-content: center;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.4fr) 132px 92px minmax(90px, 110px);
}

.inline-tool-form input,
.inline-tool-form button,
.inline-tool-form output {
  height: 38px;
  min-height: 38px;
}

.inline-tool-form output {
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-grid {
  align-content: start;
  max-height: min(360px, calc(100vh - 420px));
  padding-right: 4px;
}

.library-card {
  min-height: 196px;
}

.empty-module {
  min-height: 190px;
  align-self: start;
  padding: 28px;
  background: rgba(255, 255, 255, 0.012);
}

.empty-module strong {
  font-size: 16px;
  letter-spacing: 0.22em;
}

.module-stat-grid {
  align-self: start;
}

.module-stat-grid div {
  min-height: 76px;
}

.detail-panel {
  grid-template-columns: 220px minmax(300px, 1.05fr) minmax(210px, 0.7fr) minmax(250px, 0.85fr);
  align-content: start;
}

.detail-preview {
  display: grid;
  gap: 10px;
  align-content: start;
}

.detail-preview .media-photo.large,
.detail-preview img,
.detail-preview video,
.synthetic-cover {
  width: 160px;
  height: 132px;
  max-width: 100%;
  object-fit: cover;
}

.detail-preview .wave {
  width: 160px;
  margin: 0;
}

.detail-preview .round-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 11px;
}

.detail-body header {
  min-height: 32px;
  align-items: start;
}

.detail-body h2 {
  font-size: 22px;
  line-height: 1.2;
}

.icon-button {
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.detail-edit-form {
  max-width: 380px;
}

.metadata-panel,
.related-panel {
  min-width: 0;
}

.metadata-panel dl {
  grid-template-columns: 84px minmax(0, 1fr);
}

.metadata-panel dd {
  overflow-wrap: anywhere;
}

.related-tabs {
  gap: 10px;
}

.related-tabs button {
  font-size: 12px;
}

.related-item {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
}

.related-item button {
  width: 42px;
  height: 28px;
  border-radius: 0;
  font-size: 10px;
}

.ghost-button,
.capture-button,
.menu-add,
.archive-mark,
.round-button,
.icon-button {
  border: 1px solid rgba(238, 246, 247, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.025);
}

.ghost-button:hover,
.capture-button:hover,
.menu-add:hover,
.round-button:hover,
.icon-button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(24, 228, 255, 0.1);
  box-shadow: 0 0 18px rgba(24, 228, 255, 0.16);
}

.capture-button,
.menu-add {
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.menu-item {
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.menu-item:hover {
  color: var(--cyan);
  background: rgba(24, 228, 255, 0.06);
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea,
.admin-shell .detail-edit-form input,
.admin-shell .detail-edit-form select,
.admin-shell .detail-edit-form textarea {
  border: 1px solid var(--field-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    var(--field-bg);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.admin-shell input:hover,
.admin-shell select:hover,
.admin-shell textarea:hover {
  border-color: var(--field-border-hover);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.024)),
    var(--field-bg-active);
}

.admin-shell input::placeholder,
.admin-shell textarea::placeholder {
  color: rgba(222, 236, 240, 0.48);
}

.admin-shell select {
  color-scheme: dark;
}

.admin-shell select option {
  background: #10171b;
  color: #eaf5f7;
}

.admin-shell select option:checked {
  background: #26333c;
  color: #ffffff;
}

.tag-input-field {
  display: grid;
  gap: 8px;
}

.tag-input-field > span {
  color: var(--muted);
  font-size: 12px;
}

.tag-chip-editor {
  min-height: 46px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(24, 228, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(24, 228, 255, 0.06), transparent 42%),
    rgba(7, 13, 16, 0.88);
  box-shadow: inset 0 0 20px rgba(24, 228, 255, 0.035);
}

.tag-chip-editor input {
  flex: 1 1 140px;
  min-width: 120px;
  height: 30px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 4px;
}

.tag-chip-editor input:focus {
  outline: 0;
  border: 0;
  box-shadow: none;
}

.tag-edit-chip {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(24, 228, 255, 0.42);
  background: rgba(24, 228, 255, 0.1);
  color: #dffaff;
  padding: 0 10px;
  font-size: 12px;
  box-shadow: 0 0 16px rgba(24, 228, 255, 0.1);
}

.tag-edit-chip span {
  color: #ff7db8;
  font-size: 16px;
  line-height: 1;
}

.mood-type-panels {
  display: grid;
  gap: 14px;
}

.media-preview-field {
  position: relative;
  align-content: start;
}

.media-preview-field input[type="file"] {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 !important;
  pointer-events: none;
}

.upload-preview {
  min-height: 112px;
  display: grid;
  place-items: center;
  margin-top: 8px;
  border: 1px dashed rgba(24, 228, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(24, 228, 255, 0.07), rgba(255, 79, 163, 0.035)),
    rgba(255, 255, 255, 0.025);
  color: rgba(224, 242, 246, 0.7);
  font-size: 12px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.upload-preview:hover,
.upload-preview:focus-visible,
.upload-preview.is-dragging {
  outline: 0;
  border-color: rgba(24, 228, 255, 0.72);
  background-color: rgba(24, 228, 255, 0.07);
  box-shadow: 0 0 24px rgba(24, 228, 255, 0.14), inset 0 0 24px rgba(24, 228, 255, 0.035);
}

.upload-preview:active {
  transform: scale(0.992);
}

#favicon-upload-button {
  width: 150px;
  min-height: 110px;
  border-style: dashed;
  border-color: rgba(24, 228, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(24, 228, 255, 0.08), rgba(255, 79, 163, 0.035)),
    rgba(255, 255, 255, 0.025);
  white-space: normal;
}

.upload-preview.has-preview {
  min-height: 150px;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.82);
  box-shadow: inset 0 -54px 44px rgba(0, 0, 0, 0.58);
  align-items: end;
  padding: 12px;
}

.upload-preview.is-video,
.upload-preview.is-file {
  align-content: center;
  gap: 6px;
  color: var(--text);
}

.upload-preview strong,
.upload-preview span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.log-excerpt-row textarea {
  min-height: 72px;
  resize: vertical;
}

.log-cover-field .upload-preview {
  min-height: 96px;
}

.log-composer .composer-primary {
  overflow: hidden;
}

.log-composer .form-grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.log-cover-field input[type="file"] {
  width: 100%;
  min-height: 40px;
  padding: 8px;
  font-size: 12px;
}

.log-cover-field .upload-preview {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  margin-top: 10px;
  border-style: solid;
  border-color: rgba(24, 228, 255, 0.36);
  background:
    linear-gradient(135deg, rgba(24, 228, 255, 0.1), rgba(255, 79, 163, 0.055)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 8px, transparent 8px 16px),
    rgba(255, 255, 255, 0.025);
  color: rgba(223, 247, 252, 0.74);
  text-align: center;
}

.log-cover-field .upload-preview::before,
.log-cover-field .upload-preview::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.log-cover-field .upload-preview::before {
  left: 10px;
  top: 10px;
  border-left: 1px solid rgba(238, 248, 255, 0.58);
  border-top: 1px solid rgba(238, 248, 255, 0.58);
}

.log-cover-field .upload-preview::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid rgba(238, 248, 255, 0.58);
  border-bottom: 1px solid rgba(238, 248, 255, 0.58);
}

.log-cover-field .upload-preview.has-preview {
  min-height: 0;
  height: auto;
  align-items: end;
}

.canvas-log-editor {
  width: 100%;
  box-sizing: border-box;
}

.canvas-log-viewport {
  width: 100%;
  box-sizing: border-box;
  display: block;
}

.canvas-log-viewport > [editor-component="main"] {
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.canvas-log-viewport .ce-page-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.canvas-log-viewport canvas {
  display: block;
  max-width: none;
}

.canvas-log-viewport .ce-inputarea {
  width: 100px;
  min-width: 0;
  height: 30px;
  min-height: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.log-composer .canvas-log-toolbar button,
.log-composer .canvas-log-toolbar select,
.log-composer .canvas-log-toolbar input[type="color"] {
  width: auto;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
}

.log-composer .canvas-log-toolbar select[data-ce-font] {
  width: 122px;
}

.log-composer .canvas-log-toolbar select[data-ce-size] {
  width: 68px;
}

.log-composer .canvas-log-toolbar input[type="color"] {
  width: 38px;
  padding: 3px;
}

[data-mood-panel][hidden] {
  display: none !important;
}

.mood-type-panels {
  min-height: 0;
}

.mood-upload-fields {
  border: 1px solid rgba(233, 244, 247, 0.1);
  background: rgba(24, 228, 255, 0.026);
  padding: 14px;
}

.mood-upload-fields .media-preview-field {
  min-width: 0;
}

.mood-upload-fields .upload-preview {
  min-height: 132px;
}

.mood-video-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.mood-video-file {
  align-self: start;
}

.mood-video-file input[type="file"] {
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  box-sizing: border-box;
  padding: 7px 9px;
}

.mood-video-file input[type="file"]::file-selector-button {
  height: 32px;
}

.mood-video-thumbnail {
  width: 100%;
}

.mood-video-thumbnail .upload-preview {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
}

.mood-video-thumbnail .upload-preview.has-preview {
  min-height: 0;
}

.custom-audio-player {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) 124px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(238, 246, 247, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(4, 8, 10, 0.88);
}

.audio-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(238, 246, 247, 0.36);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--text);
  margin-left: 3px;
}

.custom-audio-player.is-playing .play-icon {
  width: 12px;
  height: 14px;
  border: 0;
  border-left: 4px solid var(--cyan);
  border-right: 4px solid var(--cyan);
  margin-left: 0;
}

.custom-player-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.custom-player-progress,
.custom-volume input {
  width: 100%;
  height: auto;
  position: static;
  overflow: visible;
  border: 0;
  background: transparent;
  accent-color: var(--cyan);
}

.custom-player-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.custom-volume {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.custom-volume span {
  width: 12px;
  height: 12px;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 10px rgba(24, 228, 255, 0.22);
}

.audio-page .wave-strip {
  display: none;
}

.audio-page .audio-feature {
  grid-template-columns: 58px minmax(180px, 1fr) minmax(380px, 1.2fr);
}

.immersive-custom {
  max-width: 640px;
  grid-template-columns: 42px minmax(220px, 1fr) 124px;
}

.audio-page .audio-track-table {
  border-color: rgba(238, 246, 247, 0.13);
  background: rgba(255, 255, 255, 0.012);
}

.audio-page .audio-track-row {
  grid-template-columns: 34px 56px minmax(160px, 1.4fr) minmax(120px, 0.8fr) minmax(120px, 0.9fr) 64px 66px;
  min-height: 76px;
  padding: 10px 12px;
}

.audio-track-main {
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}

.track-cover {
  width: 48px;
  height: 48px;
  display: block;
  border: 1px solid rgba(238, 246, 247, 0.16);
  background:
    radial-gradient(circle at center, rgba(24, 228, 255, 0.24), transparent 46%),
    rgba(255, 255, 255, 0.04);
  background-size: cover;
  background-position: center;
}

.download-link {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(24, 228, 255, 0.34);
  color: var(--cyan);
  background: rgba(24, 228, 255, 0.07);
  text-decoration: none;
  padding: 0 10px;
  font-size: 12px;
}

.download-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.file-row-display {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.file-row-display p {
  margin: 4px 0;
  color: rgba(226, 240, 244, 0.78);
  line-height: 1.45;
}

.file-row-display small {
  color: var(--muted);
}

.admin-help {
  margin: 0 0 16px;
  max-width: 860px;
  color: rgba(226, 240, 244, 0.72);
  line-height: 1.7;
}

.life-prompt-grid {
  display: grid;
  gap: 16px;
}

.life-prompt-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(238, 246, 247, 0.14);
  background:
    linear-gradient(135deg, rgba(24, 228, 255, 0.035), transparent 38%),
    rgba(255, 255, 255, 0.018);
}

.life-prompt-card.testing {
  border-color: rgba(24, 228, 255, 0.55);
  box-shadow: inset 0 0 28px rgba(24, 228, 255, 0.05);
}

.life-prompt-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(238, 246, 247, 0.1);
}

.life-prompt-card header small {
  color: var(--cyan);
  letter-spacing: 0.16em;
}

.life-prompt-card header h4 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
}

.life-prompt-card textarea {
  min-height: 168px;
  resize: vertical;
  line-height: 1.7;
}

.life-schedule-badge {
  max-width: 320px;
  padding: 8px 11px;
  border: 1px solid rgba(238, 246, 247, 0.14);
  color: rgba(226, 240, 244, 0.76);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
}

.life-schedule-badge.configurable {
  border-color: rgba(24, 228, 255, 0.34);
  color: var(--cyan);
}

.life-test-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 240px)) minmax(140px, 180px);
  align-items: end;
  gap: 12px;
}

.life-prompt-card:not([data-life-prompt-card="day"]) .life-test-controls {
  grid-template-columns: minmax(180px, 280px) minmax(140px, 180px);
}

.life-test-controls button {
  min-height: 46px;
}

.life-test-controls button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.life-test-output {
  display: block;
  min-height: 52px;
  max-height: 320px;
  overflow: auto;
  padding: 12px 14px;
  border-left: 2px solid rgba(24, 228, 255, 0.42);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  line-height: 1.6;
  white-space: normal;
}

.life-test-output .life-test-meta {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 12px;
}

.life-test-output pre {
  margin: 0;
  color: rgba(238, 246, 247, 0.88);
  font: inherit;
  white-space: pre-wrap;
}

.life-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.life-info-grid article {
  border: 1px solid rgba(238, 246, 247, 0.14);
  background: rgba(255, 255, 255, 0.028);
  padding: 14px;
}

.life-info-grid strong {
  display: block;
  color: var(--cyan);
  margin-bottom: 8px;
}

.life-info-grid span {
  color: var(--muted);
  line-height: 1.6;
}

