:root {
  --ink: #2b211c;
  --muted: #77675d;
  --line: #eadfd6;
  --paper: #ffffff;
  --soft: #fff7ef;
  --ember: #d9730d;
  --ember-dark: #9e2f14;
  --flame: #ff7a00;
  --coal: #1d1512;
  --gold: #f4b33b;
  --rose: #e14c2a;
  --shadow: 0 18px 48px rgba(68, 31, 13, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fffaf4;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(234, 223, 214, 0.9);
  background: rgba(255, 250, 244, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 118px;
  min-width: 118px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  color: #2e343d;
  font-size: 14px;
  font-weight: 700;
}

.main-nav a {
  padding: 10px 0;
}

.main-nav a:hover {
  color: var(--ember);
}

.auth-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.auth-button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.auth-button.ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fffaf4;
}

.auth-button.solid {
  border: 0;
  color: #fff;
  background: var(--ember);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--ember-dark);
  background: #ffe8d4;
  font-size: 13px;
  font-weight: 850;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: clamp(230px, 30vh, 300px);
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: clamp(18px, 3vw, 34px) clamp(20px, 6vw, 92px) clamp(14px, 2.4vw, 28px);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(29, 21, 18, 0.92), rgba(54, 28, 17, 0.74) 42%, rgba(29, 21, 18, 0.12)),
    linear-gradient(0deg, rgba(255, 250, 244, 0.96), rgba(255, 250, 244, 0) 24%);
}

.hero-content {
  position: relative;
  width: min(980px, 100%);
  color: #fff8ef;
}

.hero-main {
  display: flex;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.hero-logo {
  flex: 0 0 auto;
  width: min(370px, 42vw);
  height: auto;
  margin: 0;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.34));
}

.hero-side {
  min-width: 280px;
  max-width: 520px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--ember);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 5.8vw, 72px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
}

.hero-copy {
  max-width: 500px;
  margin: 0;
  color: #ffe8d0;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 650;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.hero-request-action {
  min-height: 75px;
  min-width: min(360px, 100%);
  padding: 0 48px;
  font-size: 27px;
  font-weight: 950;
}

.primary-action,
.secondary-action,
.idea-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action,
.idea-form button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--ember-dark), var(--flame));
  box-shadow: 0 10px 28px rgba(217, 115, 13, 0.24);
}

.secondary-action {
  border: 1px solid rgba(255, 231, 208, 0.42);
  color: #fff7ef;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.split-section p,
.idea-copy p,
.notice-card p {
  color: var(--muted);
}

.section-shell,
.idea-section,
.split-section {
  padding: clamp(34px, 5vw, 56px) clamp(16px, 4vw, 56px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading > div {
  min-width: 0;
}

.section-heading .primary-action {
  flex: 0 0 auto;
}

.section-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-gallery-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}

.admin-gallery-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-gallery-action.danger-action {
  border-color: #d94a3a;
  color: #fff;
  background: #b52f24;
}

html.route-listing .hero,
.listing-page .hero {
  display: none;
}

html.route-listing .notice-section,
.listing-page .notice-section {
  display: none;
}

html.route-listing .section-shell,
.listing-page .section-shell {
  padding-top: clamp(34px, 6vw, 64px);
}

html.route-notice .hero,
html.route-notice #gallery,
.notice-page .hero,
.notice-page #gallery {
  display: none;
}

html.route-notice .notice-section,
.notice-page .notice-section {
  min-height: calc(100vh - 58px);
  padding-top: clamp(34px, 6vw, 64px);
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #3b424d;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.is-active {
  color: #fff;
  border-color: var(--ember);
  background: var(--ember);
}

.search-box {
  display: flex;
  flex: 0 0 min(360px, 100%);
  align-items: center;
  gap: 10px;
  min-width: 260px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.search-box span {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.home-gallery-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.home-gallery-block {
  display: grid;
  gap: 12px;
}

.home-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-gallery-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.home-gallery-head a {
  color: var(--ember-dark);
  font-size: 13px;
  font-weight: 900;
}

.home-gallery-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

html.route-home .notice-list.notice-gallery.gallery-grid,
.notice-list.home-notice-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.content-card {
  height: 370px;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 25, 29, 0.05);
  overflow: hidden;
}

.content-card:not(:has(.card-thumbnail)) {
  min-height: 350px;
}

.content-card-link {
  display: block;
  height: 100%;
}

.gallery-card-wrap {
  position: relative;
  height: 100%;
}

.gallery-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(31, 34, 38, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(23, 25, 29, 0.12);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.gallery-select input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--ember);
}

.content-card[data-type="ai"] {
  border-top: 4px solid var(--rose);
}

.content-card[data-type="work"] {
  border-top: 4px solid var(--gold);
}

.content-card[data-type="notice"] {
  border-top: 4px solid var(--ember);
}

.card-thumbnail {
  width: calc(100% + 28px);
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  margin: -14px -14px 0;
  object-fit: cover;
  border: 0;
  background: #2a1812;
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.content-card-body {
  min-width: 0;
  flex: 1 1 auto;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  min-width: 0;
}

.card-meta span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta .card-type-badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 950;
}

.content-card[data-type="ai"] .card-type-badge {
  color: #0a4b91;
  background: #e5f2ff;
}

.content-card[data-type="work"] .card-type-badge {
  color: #9a3d00;
  background: #fff0d9;
}

.pill {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--ember-dark);
  background: #ffe8d4;
  font-size: 11px;
  font-weight: 850;
}

.content-card h3 {
  width: 100%;
  margin: 8px 0 7px;
  font-size: 16px;
  line-height: 1.24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notice-gallery-card {
  height: 370px;
  min-height: 350px;
  padding-bottom: 14px;
}

.notice-card-main {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 6vw, 80px);
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.split-section.accent {
  background: #fff0e4;
}

.split-section p {
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
}

.idea-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.7fr);
  gap: clamp(26px, 6vw, 84px);
  align-items: start;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 122, 0, 0.22), transparent 32%),
    linear-gradient(135deg, #251410, #170f0d 62%, #2a1410);
  color: #fff;
}

.idea-copy {
  position: sticky;
  top: 104px;
}

.idea-copy .eyebrow {
  color: #ffb15f;
}

.idea-copy p {
  max-width: 560px;
  font-size: 18px;
}

.request-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 0 0 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.request-type-options legend {
  flex-basis: 100%;
  color: #ffb15f;
  font-size: 13px;
  font-weight: 900;
}

.request-type-options label {
  flex: 1 1 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff8ef;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.request-type-options input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--flame);
}

.idea-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.idea-form label {
  display: grid;
  gap: 7px;
  color: #dce6ef;
  font-size: 13px;
  font-weight: 800;
}

.idea-form .request-type-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: auto;
  color: #fff8ef;
  font-size: 14px;
  font-weight: 850;
}

.idea-form small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 600;
}

.required-mark {
  color: #ffb15f;
}

.required-star {
  color: #e22929;
  font-weight: 900;
}

.dynamic-fields {
  display: grid;
  gap: 14px;
}

.idea-form input,
.idea-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.idea-form input {
  min-height: 44px;
  padding: 0 12px;
}

.idea-form .request-type-options input {
  width: 15px;
  min-height: 0;
  height: 15px;
  padding: 0;
}

.idea-form textarea {
  resize: vertical;
  padding: 12px;
}

.idea-form input::placeholder,
.idea-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: #ffd7a6;
  font-size: 14px;
}

.notice-section {
  background: #fff;
}

.notice-page-only h1 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
}

.notice-list {
  display: grid;
  gap: 12px;
}

.notice-list.notice-gallery.gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.notice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.notice-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ember);
}

.notice-card h3,
.notice-card p {
  margin: 0;
}

.notice-card h3 {
  font-size: 16px;
  line-height: 1.24;
}

.notice-card p {
  font-size: 13px;
  line-height: 1.4;
}

.notice-content {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.notice-content p {
  margin: 0;
}

.notice-content img {
  display: block;
  max-width: min(100%, 720px);
  max-height: 420px;
  margin: 8px 0;
  border-radius: 8px;
  object-fit: contain;
  background: #fff7ef;
}

.notice-card time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.empty-state {
  padding: 26px;
  border: 1px dashed #cfd6df;
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 7vw, 88px);
  color: #c6d0d9;
  background: var(--coal);
}

.site-footer a {
  color: #fff;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 21, 18, 0.62);
  backdrop-filter: blur(4px);
}

.auth-dialog {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid rgba(255, 232, 212, 0.5);
  border-radius: 8px;
  background: #fffaf4;
  box-shadow: var(--shadow);
}

.auth-dialog h2 {
  margin-bottom: 18px;
  font-size: 30px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.modal-form {
  display: grid;
  gap: 13px;
}

.modal-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.modal-form input,
.modal-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.modal-form button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--ember-dark), var(--flame));
  font-weight: 850;
  cursor: pointer;
}

.modal-message {
  color: var(--ember-dark);
}

.profile-dialog {
  width: min(560px, 100%);
}

.profile-password-block {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-password-block small {
  color: var(--muted);
}

.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  color: #fffaf4;
  background: #120d0b;
}

.login-page::before,
.login-page::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

.login-page::before {
  background:
    linear-gradient(90deg, rgba(9, 7, 6, 0.6), rgba(18, 10, 7, 0.14) 42%, rgba(9, 7, 6, 0.7)),
    linear-gradient(0deg, rgba(6, 4, 3, 0.68), rgba(6, 4, 3, 0.18)),
    url("/static/modak-cover.webp") center / cover no-repeat;
}

.login-page::after {
  background:
    radial-gradient(circle at 26% 96%, rgba(255, 105, 15, 0.42), transparent 22%),
    radial-gradient(circle at 68% 8%, rgba(255, 122, 0, 0.14), transparent 16%);
}

.login-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  justify-items: center;
  align-items: center;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 54px);
}

.login-card {
  min-width: 0;
  width: min(440px, 100%);
  min-height: auto;
  display: grid;
  align-content: center;
  gap: 17px;
  padding: 34px;
  border: 1px solid rgba(255, 138, 48, 0.5);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(21, 15, 12, 0.82), rgba(21, 12, 8, 0.66)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

.login-brand {
  min-width: 0;
  display: grid;
  justify-items: center;
  text-align: center;
}

.login-brand img {
  width: min(315px, 78vw);
  height: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.36));
}

.login-brand > p:first-of-type {
  margin: 0 0 10px;
  color: #ff8a20;
  font-size: 15px;
  font-weight: 850;
}

.login-brand h1 {
  font-size: 42px;
  line-height: 1;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.34);
}

.login-brand > span {
  width: 48px;
  height: 2px;
  margin: 16px 0;
  background: #ff8a20;
}

.login-copy {
  max-width: 330px;
  margin: 0;
  color: rgba(255, 250, 244, 0.74);
  font-size: 14px;
  font-weight: 700;
}

.login-form-panel {
  display: grid;
  gap: 13px;
  margin-top: 6px;
}

.login-form-panel label {
  display: grid;
  gap: 7px;
  color: #fffaf4;
  font-size: 13px;
  font-weight: 900;
}

.login-input-wrap {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(255, 177, 100, 0.34);
  border-radius: 12px;
  background: rgba(36, 21, 14, 0.74);
}

.login-input-wrap:focus-within {
  border-color: rgba(255, 138, 32, 0.86);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.13);
}

.login-input-wrap i {
  color: rgba(255, 222, 194, 0.7);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.login-input-wrap input {
  width: 100%;
  min-height: 38px;
  border: 0;
  outline: 0;
  color: #fffaf4;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.login-input-wrap input::placeholder {
  color: rgba(255, 234, 216, 0.48);
}

.password-toggle {
  min-width: 44px;
  min-height: 34px;
  border: 0;
  color: rgba(255, 239, 226, 0.74);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #ff8b20 0%, #ff5a12 48%, #e91f23 100%);
  box-shadow: 0 18px 42px rgba(230, 53, 23, 0.28);
  font-size: 17px;
  font-weight: 950;
  cursor: pointer;
}

.login-submit span {
  font-size: 12px;
  letter-spacing: 0;
}

.login-message {
  min-height: 22px;
  margin: -6px 0 0;
  color: #ffbd7d;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.login-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: rgba(255, 235, 218, 0.5);
  font-size: 14px;
  font-weight: 800;
}

.login-divider::before,
.login-divider::after {
  height: 1px;
  background: rgba(255, 177, 100, 0.2);
  content: "";
}

.login-sub-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-sub-actions button {
  min-height: 48px;
  border: 1px solid rgba(255, 138, 32, 0.7);
  border-radius: 10px;
  color: #fff7ef;
  background: rgba(24, 13, 9, 0.42);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.login-sub-actions button:hover {
  background: rgba(255, 122, 0, 0.12);
}

.login-signup-modal .auth-dialog {
  background: #fffaf4;
}

.admin-body {
  min-height: 100vh;
  background: #fff7ef;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.94);
  backdrop-filter: blur(16px);
}

.admin-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header button,
.admin-form button,
.admin-item button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--ember);
  font-weight: 800;
  cursor: pointer;
}

.admin-header button,
.admin-item button {
  padding: 0 12px;
}

.admin-header .danger-action {
  border: 1px solid #d94a3a;
  color: #fff;
  background: #b52f24;
}

.admin-main {
  padding: clamp(28px, 6vw, 72px) clamp(18px, 6vw, 72px);
}

.admin-auth {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.55fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-auth h1,
.admin-title-row h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.admin-auth p,
.admin-panel-head p,
.admin-title-row p {
  color: var(--muted);
}

.admin-subpanel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-subpanel + .admin-subpanel {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.compact-head {
  margin-bottom: 0 !important;
}

.compact-head h3 {
  margin: 0;
  font-size: 20px;
}

.admin-dashboard {
  max-width: 1440px;
  margin: 0 auto;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 22px;
  padding-bottom: 6px;
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}

.admin-tabs button.is-active {
  color: #fff;
  border-color: var(--ember);
  background: var(--ember);
}

.admin-view {
  display: none;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(68, 31, 13, 0.08);
}

.admin-view.is-active {
  display: block;
}

.admin-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 18px 0;
}

.admin-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-toolbar select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(420px, 1.3fr);
  gap: 20px;
  align-items: start;
}

.admin-editor {
  position: sticky;
  top: 94px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
}

.log-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 8px;
  overflow-x: auto;
  margin: 20px 0;
  padding-bottom: 6px;
}

.log-dashboard {
  display: grid;
  grid-template-columns: minmax(520px, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.log-dashboard h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.log-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.log-heading-row h3 {
  margin: 0;
}

.log-range-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.log-range-form input,
.log-range-form button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  font-size: 12px;
}

.log-range-form input {
  width: 122px;
  padding: 0 8px;
}

.log-range-form button {
  padding: 0 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--ember), var(--flame));
  font-weight: 850;
  cursor: pointer;
}

.log-summary.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
  margin: 0;
  padding-bottom: 0;
}

.log-summary article {
  display: grid;
  gap: 3px;
  min-width: 110px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
}

.log-summary strong {
  color: var(--ember-dark);
  font-size: 26px;
}

.log-summary span,
.log-summary small {
  color: var(--muted);
}

.menu-view-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.menu-view-summary article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.menu-view-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.menu-view-summary strong {
  color: var(--ember-dark);
  font-size: 15px;
  white-space: nowrap;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.admin-log-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.admin-log-table th,
.admin-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-log-table th {
  color: var(--muted);
  background: #fff7ef;
  font-size: 12px;
  font-weight: 850;
}

.admin-log-table tr:last-child td {
  border-bottom: 0;
}

.admin-log-table th:nth-child(1),
.admin-log-table td:nth-child(1) {
  width: 18%;
}

.admin-log-table th:nth-child(2),
.admin-log-table td:nth-child(2) {
  width: 20%;
}

.admin-log-table th:nth-child(3),
.admin-log-table td:nth-child(3) {
  width: 40%;
}

.admin-log-table th:nth-child(4),
.admin-log-table td:nth-child(4) {
  width: 22%;
}

.empty-cell {
  color: var(--muted);
  text-align: center !important;
}

.admin-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(420px, 1.15fr);
  gap: 20px;
  align-items: start;
}

.admin-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(68, 31, 13, 0.08);
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 24px;
}

.admin-panel-head p {
  margin: 8px 0 0;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form.compact {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffaf4;
}

.admin-form textarea {
  min-height: 90px;
  padding: 12px;
  resize: vertical;
}

.admin-form button {
  padding: 0 16px;
}

.admin-form .ghost-button,
.admin-item button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fffaf4;
}

.admin-item-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
  font-size: 13px;
  font-weight: 800;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffaf4;
  font-size: 13px;
  font-weight: 800;
}

.editor-body,
.work-detail-body {
  min-height: 100vh;
  background: #fff7ef;
}

.work-editor-shell,
.work-detail-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 80px;
}

.work-editor-heading {
  position: sticky;
  top: 72px;
  z-index: 15;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: -14px 0 24px;
  padding: 14px 0 16px;
  border-bottom: 1px solid rgba(234, 223, 214, 0.86);
  background: rgba(255, 247, 239, 0.94);
  backdrop-filter: blur(14px);
}

.work-editor-heading h1,
.work-article-head h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}

.work-article-head h1 {
  font-size: clamp(30px, 4.8vw, 56px);
}

.idea-page-section {
  min-height: calc(100vh - 58px);
  align-items: center;
}

.idea-page-section .idea-copy h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.14;
}

.work-editor-form {
  display: grid;
  gap: 16px;
}

.work-editor-form > label,
.result-upload {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.work-editor-form input,
.work-editor-form textarea,
.work-editor-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
}

.format-fields {
  display: grid;
  gap: 16px;
}

.format-fields[hidden] {
  display: none;
}

.format-fields h2 {
  margin: 18px 0 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.rich-field {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.thumbnail-link-control {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.thumbnail-clear-button {
  width: fit-content;
  min-height: 34px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid #d94a3a;
  border-radius: 8px;
  color: #fff;
  background: #b52f24;
  font-weight: 850;
  cursor: pointer;
}

.thumbnail-preview-wrap {
  display: block;
  margin-top: 10px;
}

.thumbnail-preview-wrap iframe,
.thumbnail-preview-wrap video {
  width: min(420px, 100%);
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #1d1512;
}

.rich-field > label {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 900;
}

.rich-field > p {
  margin: 0 0 12px;
  color: var(--muted);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fff7ef;
}

.rich-field.is-editing .rich-toolbar {
  position: sticky;
  top: 72px;
  z-index: 18;
  box-shadow: 0 10px 24px rgba(70, 36, 18, 0.12);
}

.rich-toolbar button,
.rich-toolbar select {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.toolbar-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.rich-toolbar select[data-font-size] {
  width: 78px;
}

.toolbar-inline-control,
.toolbar-color-palette,
.toolbar-color-control {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.toolbar-color-palette {
  gap: 3px;
  padding: 0 6px;
}

.toolbar-color-palette button {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 0;
  outline: 1px solid #777;
  background: var(--swatch);
}

.toolbar-inline-control input {
  width: 72px;
  min-height: 28px;
  padding: 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.toolbar-color-control span {
  padding-bottom: 2px;
  border-bottom: 3px solid currentColor;
}

.toolbar-color-control input {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.align-button {
  width: 34px;
  padding: 0 !important;
}

.align-button span,
.align-button::before,
.align-button::after {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.align-button span {
  width: 16px;
  margin: 0 auto;
}

.align-button::before,
.align-button::after {
  width: 20px;
  margin: 4px auto;
}

.align-left span,
.align-left::before,
.align-left::after {
  margin-left: 7px;
  margin-right: auto;
}

.align-center span,
.align-center::before,
.align-center::after {
  margin-left: auto;
  margin-right: auto;
}

.align-right span,
.align-right::before,
.align-right::after {
  margin-left: auto;
  margin-right: 7px;
}

.align-justify span,
.align-justify::before,
.align-justify::after {
  width: 20px;
}

.emoji-picker-menu {
  position: fixed;
  z-index: 320;
  display: grid;
  grid-template-columns: repeat(6, 34px);
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 18px 48px rgba(35, 18, 10, 0.2);
}

.emoji-picker-menu button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.rich-editor {
  min-height: 240px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #fff;
  outline: 0;
}

.rich-editor,
.rich-content {
  width: 100%;
  font-size: 16px;
  line-height: 1.6;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
}

.rich-editor .line-height-target {
  outline: 2px solid rgba(255, 125, 26, 0.34);
  background: rgba(255, 125, 26, 0.08);
}

.rich-editor .notion-callout,
.rich-content .notion-callout,
.rich-editor blockquote,
.rich-content blockquote {
  display: block;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #f2d4b6;
  border-left: 4px solid var(--ember);
  border-radius: 8px;
  background: #fff4e8;
  color: var(--ink);
}

.notion-callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: middle;
  font-size: 18px;
}

.rich-editor .notion-table,
.rich-content .notion-table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
}

.rich-editor .notion-table th,
.rich-editor .notion-table td,
.rich-content .notion-table th,
.rich-content .notion-table td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.rich-editor .notion-code-block,
.rich-content .notion-code-block {
  overflow-x: auto;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff7ef;
  background: #1d1512;
  font-family: "Courier New", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.rich-editor .notion-checkbox,
.rich-content .notion-checkbox {
  display: inline-block;
  width: 1.4em;
  color: var(--ember-dark);
  font-weight: 900;
}

.rich-editor .notion-bookmark,
.rich-content .notion-bookmark {
  display: block;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffaf4;
  font-weight: 800;
  text-decoration: none;
}

.rich-editor .notion-toggle-summary,
.rich-content .notion-toggle-summary {
  cursor: default;
  font-weight: 850;
}

.rich-editor .notion-list,
.rich-content .notion-list {
  margin: 8px 0 8px 24px;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #a39489;
}

.editor-context-menu {
  position: fixed;
  z-index: 300;
  width: min(330px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 18px 48px rgba(35, 18, 10, 0.24);
}

.editor-context-menu[hidden] {
  display: none;
}

.context-menu-group {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.context-command-list {
  gap: 0;
}

.context-command-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 34px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.context-command-list button:hover {
  background: #fff4e8;
}

.context-command-list small {
  color: #a39489;
}

.context-menu-group + .context-menu-group {
  border-top: 1px solid var(--line);
}

.context-menu-group label {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.context-menu-group select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.context-button-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.context-three-buttons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.context-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.context-button-grid button {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.context-button-grid button:hover {
  color: #fff;
  border-color: var(--ember);
  background: var(--ember);
}

.context-delete-button {
  min-height: 36px;
  border: 1px solid #d94a3a;
  border-radius: 6px;
  color: #b52f24;
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}

.context-delete-button:hover {
  color: #fff;
  background: #b52f24;
}

.context-size-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.context-size-inputs label {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}

.context-size-inputs input {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.context-size-inputs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.media-resize-overlay {
  position: fixed;
  z-index: 290;
  border: 2px solid var(--ember);
  pointer-events: none;
}

.media-resize-overlay[hidden] {
  display: none;
}

.media-resize-overlay button {
  position: absolute;
  width: 13px;
  height: 13px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.media-resize-overlay [data-resize-handle="nw"] { top: -8px; left: -8px; cursor: nwse-resize; }
.media-resize-overlay [data-resize-handle="n"] { top: -8px; left: calc(50% - 6px); cursor: ns-resize; }
.media-resize-overlay [data-resize-handle="ne"] { top: -8px; right: -8px; cursor: nesw-resize; }
.media-resize-overlay [data-resize-handle="e"] { top: calc(50% - 6px); right: -8px; cursor: ew-resize; }
.media-resize-overlay [data-resize-handle="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.media-resize-overlay [data-resize-handle="s"] { bottom: -8px; left: calc(50% - 6px); cursor: ns-resize; }
.media-resize-overlay [data-resize-handle="sw"] { bottom: -8px; left: -8px; cursor: nesw-resize; }
.media-resize-overlay [data-resize-handle="w"] { top: calc(50% - 6px); left: -8px; cursor: ew-resize; }

.media-size-label {
  position: absolute;
  top: -30px;
  right: 0;
  padding: 3px 7px;
  border-radius: 5px;
  color: #fff;
  background: var(--ember-dark);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.media-overlay-action {
  position: absolute !important;
  top: -32px;
  width: auto !important;
  height: 24px !important;
  min-width: 76px;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: #fff;
  background: var(--ember-dark) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

.media-copy-size-button {
  left: 0;
}

.media-full-size-button {
  left: 84px;
}

.editor-media,
.rich-content img,
.rich-content video,
.rich-content iframe {
  max-width: 100%;
  height: auto;
  margin: 0 8px;
  border-radius: 8px;
}

.rich-content iframe,
.rich-editor iframe.video-embed {
  width: min(720px, 100%);
  aspect-ratio: 16 / 9;
  border: 0;
  background: #1d1512;
}

.rich-editor .editor-media {
  display: inline-block;
  float: none;
  vertical-align: middle;
  user-select: none;
  cursor: grab;
}

.rich-editor .editor-media:active {
  cursor: grabbing;
}

.rich-editor {
  overflow-wrap: normal;
}

.editor-caret-anchor {
  display: inline-block;
  width: 0;
  min-width: 0;
  height: 1em;
  overflow: hidden;
  color: transparent;
  line-height: 1;
  vertical-align: baseline;
  user-select: none;
}

.media-layout-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 12px 0;
}

.media-layout-row > img,
.media-layout-row > video {
  min-width: 0;
  max-width: 100%;
}

.media-layout-row > .media-text-companion {
  flex: 0 0 auto;
  min-width: max-content;
  padding: 0 4px;
  line-height: 1.2;
}

.upload-preview {
  width: min(480px, 100%);
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

.result-preview,
.detail-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-media-item {
  position: relative;
}

.result-media-item img,
.result-media-item video,
.detail-media-grid img,
.detail-media-grid video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-radius: 8px;
  background: #1d1512;
}

.result-media-item button {
  position: absolute;
  top: 8px;
  right: 8px;
}

.work-article-head {
  position: relative;
  display: grid;
  gap: 16px;
  margin-bottom: 44px;
}

.detail-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.detail-title-row > div:first-child {
  min-width: 0;
}

.detail-title-row h1 {
  margin-bottom: 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-title-row p {
  max-width: 800px;
  color: var(--muted);
  font-size: 20px;
}

.detail-summary {
  max-width: 100%;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid rgba(217, 115, 13, 0.26);
  border-left: 5px solid var(--ember);
  border-radius: 8px;
  color: #5a2a0e;
  background: #fff7ed;
  box-shadow: 0 12px 28px rgba(217, 115, 13, 0.08);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.55;
}

.detail-summary:empty {
  display: none;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 2px;
}

.detail-actions a,
.detail-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffaf4;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.detail-actions button {
  color: #fff;
  border-color: transparent;
  background: #b52f24;
}

.detail-thumbnail {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 8px;
}

iframe.detail-thumbnail,
video.detail-thumbnail {
  aspect-ratio: 16 / 9;
  max-height: none;
  border: 0;
  background: #1d1512;
}

.detail-section {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-section h2 {
  margin-bottom: 22px;
  font-size: 28px;
}

.rich-content {
  padding: 16px;
  border: 1px solid transparent;
  overflow-x: auto;
}

.rich-editor a,
.rich-content a {
  color: #0b63ce;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.comments-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.comments-toggle,
#comment-form button,
.scroll-end-button,
.scroll-top-button {
  min-width: 82px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--ember);
  font-weight: 850;
  cursor: pointer;
}

#comments-panel {
  margin-top: 16px;
}

#comment-form {
  display: grid;
  gap: 8px;
}

#comment-form textarea {
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comment-item {
  position: relative;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.comment-item div {
  display: flex;
  gap: 10px;
  color: var(--muted);
}

.comment-item button {
  position: absolute;
  top: 10px;
  right: 10px;
}

.scroll-end-button {
  position: fixed;
  top: 92px;
  right: max(18px, calc((100vw - 1120px) / 2 - 108px));
  z-index: 20;
  box-shadow: 0 10px 24px rgba(70, 36, 18, 0.18);
}

.scroll-top-button {
  position: fixed;
  right: max(18px, calc((100vw - 1120px) / 2 - 108px));
  bottom: 22px;
  z-index: 20;
  box-shadow: 0 10px 24px rgba(70, 36, 18, 0.18);
}

.check-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.admin-item div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-item strong,
.admin-item span {
  overflow-wrap: anywhere;
}

.admin-item span {
  color: var(--muted);
  font-size: 13px;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.admin-pagination button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffaf4;
  font-weight: 850;
  cursor: pointer;
}

.admin-pagination button.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--ember), var(--flame));
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ember-dark) !important;
  background: #ffe8d4;
  font-weight: 850;
}

@media (max-width: 1280px) and (min-width: 901px) {
  .gallery-grid,
  .home-gallery-row,
  html.route-home .notice-list.notice-gallery.gallery-grid,
  .notice-list.home-notice-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .log-dashboard {
    grid-template-columns: 1fr;
  }

  .log-summary.compact {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .log-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .log-range-form {
    flex-wrap: wrap;
  }

  .menu-view-summary {
    grid-template-columns: 1fr;
  }

  .admin-log-table {
    min-width: 720px;
  }
}

@media (max-width: 720px) {
  .detail-title-row {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .scroll-end-button,
  .scroll-top-button {
    right: 16px;
    min-width: 86px;
  }
}

@media (max-width: 900px) {
  .login-stage {
    justify-items: center;
    padding: 24px 16px;
  }

  .login-card {
    min-height: auto;
    max-width: 420px;
    padding: 32px 26px;
    border-radius: 20px;
  }

  .login-brand img {
    width: min(300px, 72vw);
  }

  .login-brand h1 {
    font-size: clamp(42px, 11vw, 54px);
  }

  .login-input-wrap,
  .login-submit {
    min-height: 60px;
  }

  .login-input-wrap input {
    font-size: 16px;
  }

  .site-header {
    display: grid;
    grid-template-columns: auto auto;
    height: auto;
    min-height: 72px;
    row-gap: 10px;
    padding-block: 12px;
  }

  .auth-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 13px 12px;
  }

  .hero {
    min-height: clamp(280px, 38vh, 350px);
  }

  .hero-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hero-logo {
    width: min(340px, 78vw);
  }

  .hero-side {
    min-width: 0;
    max-width: 560px;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(31, 17, 13, 0.82), rgba(31, 17, 13, 0.64)),
      linear-gradient(90deg, rgba(31, 17, 13, 0.82), rgba(31, 17, 13, 0.3));
  }

  .split-section,
  .idea-section,
  .admin-auth,
  .admin-grid,
  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .gallery-grid,
  .home-gallery-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notice-list.notice-gallery.gallery-grid,
  .notice-list.home-notice-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-toolbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    flex-basis: auto;
    min-width: 0;
    width: 100%;
  }

  .section-actions {
    justify-content: flex-start;
  }

  .section-heading .primary-action {
    width: fit-content;
  }

  .idea-copy {
    position: static;
  }

  .admin-title-row {
    align-items: start;
    flex-direction: column;
  }

  .admin-editor {
    position: static;
  }

  .result-preview,
  .detail-media-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-page::before {
    background:
      linear-gradient(0deg, rgba(10, 7, 6, 0.78), rgba(10, 7, 6, 0.42)),
      url("/static/modak-cover.webp") center / cover no-repeat;
  }

  .login-stage {
    min-height: 100svh;
    display: block;
    width: 100%;
    max-width: 100vw;
    padding: 16px;
    overflow-x: hidden;
  }

  .login-card {
    width: 100% !important;
    max-width: 360px !important;
    min-width: 0;
    margin: 0 auto;
    gap: 15px;
    padding: 28px 20px;
  }

  .login-card > * {
    max-width: 100%;
  }

  .login-brand h1 {
    font-size: 36px;
  }

  .login-brand img {
    width: min(260px, 70vw);
  }

  .login-copy {
    font-size: 15px;
  }

  .login-input-wrap {
    gap: 10px;
    padding: 0 14px;
  }

  .login-input-wrap input {
    min-width: 0;
    font-size: 15px;
  }

  .login-form-panel {
    gap: 16px;
  }

  .login-sub-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .login-sub-actions button {
    min-height: 54px;
    font-size: 16px;
  }

  .site-header {
    height: 64px;
    padding-inline: 16px;
  }

  .main-nav {
    top: 64px;
  }

  .hero {
    min-height: 310px;
    padding: 28px 18px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-request-action {
    min-height: 64px;
    font-size: 22px;
  }

  .primary-action,
  .secondary-action,
  .idea-form button {
    width: 100%;
  }

  .section-heading .primary-action {
    width: 100%;
  }

  .tab-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery-grid,
  .home-gallery-row {
    grid-template-columns: 1fr;
  }

  .notice-list.notice-gallery.gallery-grid,
  .notice-list.home-notice-row {
    grid-template-columns: 1fr;
  }

  .tab-button {
    border-radius: 8px;
  }

  .notice-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notice-card time {
    grid-column: 2;
  }

  .admin-header {
    align-items: start;
    flex-direction: column;
    gap: 12px;
    padding-block: 14px;
  }

  .work-editor-heading {
    top: 0;
    align-items: stretch;
    flex-direction: column;
    margin-top: -12px;
  }

  .work-editor-heading .primary-action {
    width: 100%;
  }

  .admin-item {
    grid-template-columns: 1fr;
  }

  .item-actions {
    justify-content: flex-start;
  }
}
