/* KUJISA shared application shell
 * Keeps header, content width, utility pages, authentication and mobile app
 * navigation consistent across every public route.
 */
:root {
  --shell-max: 1320px;
  --shell-gutter: clamp(16px, 2.4vw, 28px);
  --shell-header: 72px;
  --shell-line: rgba(141, 83, 70, .42);
  --shell-panel: #171110;
  --shell-panel-soft: #1c1513;
  --shell-paper: #f5e9da;
  --shell-muted: #a99585;
  --shell-red: #b43c32;
}

html { background: #0d0908; }
body.site-auth-open { overflow: hidden; }

.container,
.market-shell,
.product-shell,
.portal-shell,
.support-shell {
  width: min(calc(100% - (var(--shell-gutter) * 2)), var(--shell-max)) !important;
  max-width: var(--shell-max) !important;
  margin-inline: auto !important;
}

.market-header,
.site-header,
.portal-header,
.support-header {
  min-height: var(--shell-header);
  border-bottom: 1px solid var(--shell-line) !important;
  background: rgba(12, 9, 8, .96) !important;
  backdrop-filter: blur(18px);
}

.market-header-main,
.header-inner,
.portal-header-inner,
.support-header-inner {
  min-height: var(--shell-header) !important;
  height: var(--shell-header);
  gap: 24px !important;
  align-items: center;
}

.brand,
.market-brand,
.portal-brand,
.support-brand {
  flex: 0 0 auto;
  gap: 11px !important;
}

.brand-mark,
.market-brand-symbol img,
.portal-mark,
.support-brand img {
  width: 38px !important;
  height: 41px !important;
  object-fit: contain;
}

.kujisa-wordmark-name {
  font-family: "KUJISA Tegomin", "Noto Serif KR", Georgia, serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-size: 23px !important;
  line-height: 1 !important;
  letter-spacing: .075em !important;
  font-synthesis: none !important;
}

.main-nav,
.portal-nav,
.support-header-links {
  display: flex;
  align-items: center;
  gap: 22px !important;
  font-family: "Noto Sans KR", sans-serif !important;
}

.main-nav a,
.portal-nav a,
.support-header-links a {
  color: #b8a697;
  font-size: 14px !important;
  font-weight: 800;
  white-space: nowrap;
}

.main-nav a:hover,
.portal-nav a:hover,
.support-header-links a:hover,
.main-nav a.is-current,
.portal-nav a[aria-current="page"] {
  color: #fff3e6;
}

.market-auth-link,
.market-collection-link,
.market-wallet,
.wallet-chip,
.account-link {
  font-family: "Noto Sans KR", sans-serif !important;
}

button.market-auth-link {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

button.account-link,
button.support-auth-link {
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.support-auth-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.support-auth-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #50332d;
  border-radius: 4px;
  background: #171110;
  color: #f5e9da;
  font-family: "Noto Sans KR", sans-serif !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.support-auth-signup {
  border-color: #a4382e;
  background: #a4382e;
  color: #fff;
}
button.market-hot-more {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Authentication is a single shared modal, never a separate page. */
.site-auth-dialog {
  width: min(440px, calc(100% - 32px));
  max-width: 440px;
  margin: auto;
  padding: 0;
  border: 1px solid #59362f;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  color: #f7ebdc;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .72);
}

.site-auth-dialog::backdrop {
  background: rgba(5, 3, 3, .76);
  backdrop-filter: blur(8px);
}

.site-auth-panel {
  position: relative;
  padding: 30px;
  background:
    linear-gradient(145deg, rgba(180, 60, 50, .12), transparent 46%),
    #171110;
}

.site-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #56362f;
  border-radius: 50%;
  background: #100c0b;
  color: #e8d8c8;
  cursor: pointer;
}

.site-auth-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.site-auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 26px 0 30px; }
.site-auth-brand img { width: 46px; height: 49px; object-fit: contain; }
.site-auth-brand .kujisa-wordmark-name { font-size: 30px !important; }
.site-auth-actions { display: grid; gap: 10px; }
.site-auth-provider {
  display: flex;
  width: min(100%, 300px);
  min-height: 45px;
  margin-inline: auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border-radius: 12px;
  font: 800 15px/1 "Noto Sans KR", sans-serif;
}
.site-auth-kakao { background: #fee500; color: rgba(0, 0, 0, .85); }
.site-auth-kakao img {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 45px;
  object-fit: contain;
}
.site-auth-apple { border: 1px solid #ddd; background: #050505; color: #fff; }
.site-auth-apple-mark {
  display: grid;
  width: 22px;
  height: 24px;
  place-items: center;
  font: 400 22px/1 -apple-system, BlinkMacSystemFont, sans-serif;
}
.site-auth-note { margin: 16px 0 0; color: #8f7c6e; font-size: 12px; line-height: 1.6; text-align: center; }
.site-auth-error { margin: 12px 0 0; padding: 11px; border-radius: 6px; background: rgba(196, 64, 53, .14); color: #ef8b7e; font-size: 12px; text-align: center; }
.site-auth-legal { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #392722; color: #75655b; font-size: 11px; line-height: 1.6; text-align: center; }
.site-auth-legal a { color: #aa9181; text-decoration: underline; text-underline-offset: 3px; }
.portal-auth { display: none !important; }

.site-drawer-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0 9px 0 13px;
  border: 1px solid #4b302a;
  border-radius: 10px;
  background: #0f0b0a;
}

.site-drawer-search > span {
  color: #a99585;
  font-size: 19px;
}

.site-drawer-search input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5e9da;
  font: 600 13px/1.4 "Noto Sans KR", sans-serif;
}

.site-drawer-search input::placeholder { color: #75645a; }

.site-drawer-search button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: #2b1d1a;
  color: #dac7b5;
  font: 800 12px/1 "Noto Sans KR", sans-serif;
  cursor: pointer;
}

.site-notification-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #4e312b;
  border-radius: 8px;
  background: #15100f;
  color: #cbb8a7;
  cursor: pointer;
}

.site-notification-button:hover,
.site-notification-button:focus-visible,
.site-notification-button[aria-expanded="true"] {
  border-color: #8d443b;
  color: #fff0df;
}

.site-notification-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.site-notification-panel {
  position: fixed;
  top: var(--notification-top, 76px);
  right: var(--notification-right, 68px);
  z-index: 1001;
  width: min(320px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #52332c;
  border-radius: 10px;
  background: #15100f;
  color: #eadccd;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .56);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease;
}

.site-notification-panel.is-open {
  opacity: 1;
  transform: translateY(0);
}

.site-notification-panel > header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #3e2823;
}

.site-notification-panel > header strong {
  font-size: 13px;
}

.site-notification-panel > header button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #947f70;
  cursor: pointer;
}

.site-notification-panel > header svg {
  width: 17px;
  height: 17px;
}

.site-notification-empty {
  display: grid;
  justify-items: center;
  padding: 26px 18px 28px;
  text-align: center;
}

.site-notification-empty > svg {
  width: 24px;
  height: 24px;
  color: #a9483e;
}

.site-notification-empty p {
  margin: 12px 0 5px;
  color: #e7d8c8;
  font-size: 13px;
  font-weight: 800;
}

.site-notification-empty span {
  color: #877467;
  font-size: 11px;
  line-height: 1.55;
}

.site-profile-avatar {
  overflow: hidden;
}

.site-profile-avatar img,
.site-profile-avatar .site-profile-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.site-profile-avatar img {
  object-fit: cover;
}

.site-profile-icon {
  padding: 7px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.site-drawer-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.site-drawer-actions .site-drawer-signup {
  border-color: #a4382e;
  background: #a4382e;
  color: #fff;
}

.site-drawer-actions [data-site-logout] {
  grid-column: 1 / -1;
}

/* Desktop home: one measured two-column system. */
.market-hero {
  grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr) !important;
  align-items: stretch !important;
}
.market-hero-card,
.market-hero-side,
.market-hot-complete { min-height: 0; height: 100%; }
.market-hero-side { display: flex; }
.market-hot-complete { flex: 1 1 auto; }
.market-hero-slide-dark::after {
  background: linear-gradient(90deg, rgba(12, 8, 8, .88) 0%, rgba(12, 8, 8, .48) 47%, rgba(12, 8, 8, .12) 77%) !important;
}
.market-hero-slide > picture {
  position: absolute;
  inset: 0;
  display: block;
}
.market-hero-slide-collection .market-hero-media {
  filter: brightness(.48) saturate(.82) contrast(1.08);
}
.market-hero-slide-collection::after {
  background: linear-gradient(90deg, rgba(12, 8, 8, .92) 0%, rgba(12, 8, 8, .64) 50%, rgba(12, 8, 8, .28) 100%) !important;
}
.market-hero-slide-collection .market-hero-copy,
.market-hero-slide-collection .market-hero-copy h2,
.market-hero-slide-collection .market-hero-copy p { color: #f5e9da !important; }
.market-hero-copy h1,
.market-hero-copy h2 { text-wrap: balance; }
.market-hero-copy .hero-line { display: block; white-space: nowrap; }

/* Utility pages intentionally use a neutral commerce interface. */
.support-main,
.portal-main,
.checkout-main { font-family: "Noto Sans KR", sans-serif; }
.support-intro {
  margin-bottom: 22px !important;
  padding: 6px 2px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.support-intro h1 { color: #f4e8da !important; font: 900 28px/1.25 "Noto Sans KR", sans-serif !important; letter-spacing: -.04em !important; }
.support-intro span { color: #a99585 !important; }
.support-layout { grid-template-columns: 196px minmax(0, 1fr) !important; align-items: stretch !important; gap: 16px !important; }
.support-nav {
  position: sticky;
  top: 94px;
  align-self: stretch;
  align-content: start;
  border-radius: 12px !important;
  background: #171110 !important;
}
.support-nav a { border-radius: 8px !important; }
.support-nav a:hover {
  background: rgba(255, 243, 228, .04) !important;
  color: #e8d9c8 !important;
}
.support-nav a.is-active {
  background: rgba(180, 60, 50, .16) !important;
  color: #f6eadd !important;
}
.support-section {
  min-height: 510px !important;
  height: 100%;
  padding: 26px !important;
  border-radius: 12px !important;
  background: #171110 !important;
  box-shadow: none !important;
}
.support-section h2 { font: 900 23px/1.3 "Noto Sans KR", sans-serif !important; }
.support-section h3 { font-size: 15px !important; }
.support-section p,
.support-section li { font-size: 13px !important; line-height: 1.7 !important; }
.support-faq summary { font-family: "Noto Sans KR", sans-serif; }
.inquiry-button { background: #b43c32 !important; }
.checkout-layout { align-items: stretch !important; }
.checkout-layout > * { height: 100%; }

@media (max-width: 900px) {
  :root { --shell-header: 64px; --shell-gutter: 12px; }
  .market-header-main,
  .header-inner,
  .portal-header-inner,
  .support-header-inner {
    height: var(--shell-header) !important;
    min-height: var(--shell-header) !important;
  }
  .brand-mark,
  .market-brand-symbol img,
  .portal-mark,
  .support-brand img { width: 32px !important; height: 35px !important; }
  .kujisa-wordmark-name { font-size: 20px !important; }
  .main-nav,
  .portal-nav,
  .support-header-links,
  .support-auth-actions,
  .market-search,
  .market-collection-link,
  .market-wallet,
  .market-auth-link,
  .wallet-chip,
  .account-link { display: none !important; }
  .site-menu-button { margin-left: auto; }
  .site-notification-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    margin-left: auto;
  }
  .site-notification-button + .site-menu-button { margin-left: 0; }

  .market-hero {
    display: block !important;
    width: min(calc(100% - 24px), var(--shell-max)) !important;
  }
  .market-hero-card {
    display: grid !important;
    grid-template-rows: 290px 58px !important;
  }
  .market-hero-slider { min-height: 0 !important; height: 290px !important; }
  .market-hero-track,
  .market-hero-slide { height: 100% !important; min-height: 0 !important; }
  .market-hero-media { width: 100%; height: 100% !important; object-fit: cover; }
  .market-hero-copy {
    width: min(76%, 330px) !important;
    padding: 20px !important;
  }
  .market-hero-copy h1,
  .market-hero-copy h2 {
    max-width: none !important;
    margin: 8px 0 9px !important;
    font-size: clamp(23px, 7vw, 31px) !important;
    line-height: 1.22 !important;
    word-break: keep-all;
  }
  .market-hero-copy .hero-line { display: block; white-space: nowrap; }
  .market-hero-copy > p:last-child {
    max-width: 290px !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.6 !important;
  }
  .market-kicker { font-size: 9px !important; }
  .market-live-board {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    height: 58px !important;
    min-height: 58px !important;
    align-items: center;
    overflow: hidden;
  }
  .market-live-head {
    min-width: 100px;
    height: 100%;
    padding: 0 12px !important;
  }
  .market-live-head p,
  .market-live-event time,
  .market-live-event strong { display: none !important; }
  .market-live-head h2 { font-size: 13px !important; white-space: nowrap; }
  .market-live-window { min-width: 0; height: 100%; }
  .market-live-event {
    display: flex !important;
    height: 100%;
    align-items: center;
    gap: 8px;
    padding: 0 12px !important;
  }
  .market-live-event span {
    min-width: 0;
    overflow: hidden;
    font-size: 11px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .market-live-event em { flex: none; font-size: 10px !important; }
  .market-hero-side { margin-top: 12px; }
  .market-hot ol {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-main { padding-top: 18px !important; }
  .support-intro { padding: 2px 2px 0 !important; }
  .support-intro h1 { font-size: 22px !important; }
  .support-layout { grid-template-columns: 1fr !important; }
  .support-nav { align-self: auto; }
  .support-section { min-height: 0 !important; }
  .support-nav {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px !important;
    padding: 4px !important;
    overflow: hidden;
  }
  .support-nav a {
    min-width: 0;
    padding: 9px 4px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    text-align: center;
  }
  .support-section { height: auto; padding: 16px 14px !important; }
  .support-section h2 { font-size: 20px !important; }
  .support-section h3 { margin-top: 20px !important; font-size: 14px !important; }
  .support-section p,
  .support-section li { font-size: 12.5px !important; line-height: 1.65 !important; }
  .support-faq summary { padding-block: 14px !important; font-size: 13px !important; }
  .policy-table th,
  .policy-table td { padding: 9px !important; font-size: 11.5px !important; line-height: 1.55 !important; }
  .inquiry-grid { grid-template-columns: 1fr !important; }
  .checkout-layout > * { height: auto; }

  .site-auth-panel { padding: 24px 20px 20px; }
  .site-auth-brand { margin: 20px 0 24px; }
  .site-notification-panel {
    right: 12px;
    width: min(300px, calc(100vw - 24px));
  }
}

@media (max-width: 520px) {
  .market-hero-card { grid-template-rows: 268px 54px !important; }
  .market-hero-slider { height: 268px !important; }
  .market-hero-copy { width: 80% !important; padding: 18px !important; }
  .market-hero-copy h1,
  .market-hero-copy h2 { font-size: clamp(22px, 7.1vw, 28px) !important; }
  .market-hot ol { gap: 8px !important; }
  .market-hot li a { min-height: 84px !important; }
  .site-auth-dialog { border-radius: 14px; }
}

.site-profile-guest { cursor: pointer; }

/* Canonical compact drawer and persistent day mode. */
.site-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.site-drawer-head > .site-drawer-brand,
.site-drawer-head > .site-drawer-head-actions {
  display: flex;
  align-items: center;
}

.site-drawer-head-actions {
  gap: 7px;
  margin-left: auto;
}

.site-theme-toggle {
  display: inline-flex;
  min-width: 70px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid #50322c;
  border-radius: 999px;
  background: #1a1110;
  color: #bca898;
  font: 800 10px/1 "Noto Sans KR", sans-serif;
  cursor: pointer;
}

.site-theme-toggle i {
  position: relative;
  display: block;
  width: 26px;
  height: 14px;
  border-radius: 999px;
  background: #4a342e;
}

.site-theme-toggle i::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #eadccc;
  content: "";
  transition: transform .18s ease;
}

.site-theme-toggle[aria-pressed="true"] i {
  background: #a4382e;
}

.site-theme-toggle[aria-pressed="true"] i::after {
  transform: translateX(12px);
}

.site-theme-toggle:focus-visible {
  outline: 3px solid rgba(211, 90, 70, .24);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .site-drawer {
    width: min(296px, calc(100vw - 28px));
    max-height: min(560px, calc(100dvh - 138px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  }

  .site-drawer-head {
    min-height: 52px;
    padding: 8px 10px;
  }

  .site-drawer-profile {
    padding: 8px 10px;
  }

  .site-profile-avatar {
    width: 34px;
    height: 34px;
  }

  .site-drawer-nav {
    padding: 2px 0;
  }

  .site-drawer-nav a {
    min-height: 39px;
    padding: 7px 11px;
  }

  .site-drawer-nav span {
    font-size: 12.5px;
  }

  .site-drawer-actions {
    padding: 6px 10px 10px;
  }

  .site-drawer-actions > a,
  .site-drawer-actions > button {
    min-height: 38px;
    font-size: 12px;
  }

  .site-theme-toggle {
    min-width: 62px;
    height: 32px;
    gap: 5px;
    padding-inline: 7px;
  }
}

:root[data-theme="ichiban"] {
  color-scheme: light;
}

:root[data-theme="ichiban"] body {
  background:
    radial-gradient(circle at 76% -8%, rgba(159, 45, 41, .08), transparent 36rem),
    repeating-linear-gradient(0deg, rgba(87, 55, 41, .025) 0 1px, transparent 1px 8px),
    #f0e8dc;
  color: #241916;
}

:root[data-theme="ichiban"] body::before {
  display: none;
}

:root[data-theme="ichiban"] .market-header,
:root[data-theme="ichiban"] .site-header,
:root[data-theme="ichiban"] .portal-header,
:root[data-theme="ichiban"] .support-header {
  border-color: #c8b7a6 !important;
  background: rgba(249, 243, 234, .94) !important;
}

:root[data-theme="ichiban"] .site-menu-button,
:root[data-theme="ichiban"] .site-notification-button {
  border-color: #c8b7a6 !important;
  background: #fffaf1 !important;
  color: #4f392f !important;
}

:root[data-theme="ichiban"] .site-drawer-backdrop {
  background: rgba(48, 31, 25, .28);
}

:root[data-theme="ichiban"] .site-drawer,
:root[data-theme="ichiban"] .site-notification-panel,
:root[data-theme="ichiban"] .site-auth-panel {
  border-color: #c8b7a6;
  background: #fffaf1;
  color: #241916;
  box-shadow: 0 24px 64px rgba(70, 44, 34, .18);
}

:root[data-theme="ichiban"] .site-drawer-head,
:root[data-theme="ichiban"] .site-notification-panel > header {
  border-color: #d6c6b6;
  background: rgba(255, 250, 241, .98);
}

:root[data-theme="ichiban"] .site-drawer-close,
:root[data-theme="ichiban"] .site-theme-toggle {
  border-color: #c8b7a6;
  background: #f4e8d7;
  color: #5e473b;
}

:root[data-theme="ichiban"] .site-drawer-profile,
:root[data-theme="ichiban"] .site-drawer-nav a,
:root[data-theme="ichiban"] .site-auth-legal {
  border-color: rgba(95, 63, 50, .16);
}

:root[data-theme="ichiban"] .site-drawer-nav span,
:root[data-theme="ichiban"] .site-drawer-profile strong,
:root[data-theme="ichiban"] .site-notification-empty p,
:root[data-theme="ichiban"] .site-auth-heading {
  color: #2b1c18;
}

:root[data-theme="ichiban"] .site-drawer-nav small,
:root[data-theme="ichiban"] .site-drawer-profile small,
:root[data-theme="ichiban"] .site-notification-empty span,
:root[data-theme="ichiban"] .site-auth-note,
:root[data-theme="ichiban"] .site-auth-legal {
  color: #776357;
}

:root[data-theme="ichiban"] .site-drawer-nav a:hover,
:root[data-theme="ichiban"] .site-drawer-nav a:focus-visible {
  background: rgba(159, 45, 41, .07);
}

:root[data-theme="ichiban"] .mobile-app-nav {
  border-color: #c8b7a6;
  background: rgba(255, 250, 241, .97);
  box-shadow: 0 -10px 28px rgba(72, 48, 38, .12);
}

:root[data-theme="ichiban"] .mobile-app-nav a,
:root[data-theme="ichiban"] .mobile-app-nav button {
  color: #79675b;
}

:root[data-theme="ichiban"] .portal-page {
  --portal-bg: #f0e8dc;
  --portal-panel: #fffaf1;
  --portal-panel-2: #eee2d4;
  --portal-line: #c8b7a6;
  --portal-paper: #2b1c18;
  --portal-paper-deep: #6f594b;
  --portal-ink: #241916;
  --portal-muted: #705e52;
  background: #f0e8dc;
}

:root[data-theme="ichiban"] .portal-panel,
:root[data-theme="ichiban"] .portal-account-strip,
:root[data-theme="ichiban"] .portal-collection,
:root[data-theme="ichiban"] .portal-shipping-block {
  background: #fffaf1 !important;
}

:root[data-theme="ichiban"] .portal-shipping-brief,
:root[data-theme="ichiban"] .portal-empty,
:root[data-theme="ichiban"] .portal-order,
:root[data-theme="ichiban"] .portal-shipping-dialog,
:root[data-theme="ichiban"] .portal-shipping-cart-item {
  background: #f7eee2 !important;
}

:root[data-theme="ichiban"] .portal-profile-editor-head h2,
:root[data-theme="ichiban"] .portal-avatar-copy strong,
:root[data-theme="ichiban"] .portal-nickname-editor > label,
:root[data-theme="ichiban"] .portal-account-strip strong,
:root[data-theme="ichiban"] .portal-account-value b {
  color: #2b1c18 !important;
}

:root[data-theme="ichiban"] #portal-nickname-input,
:root[data-theme="ichiban"] .portal-avatar-button {
  border-color: #c8b7a6;
  background: #f7eee2;
  color: #241916;
}

:root[data-theme="ichiban"] .checkout-page {
  --checkout-bg: #f0e8dc;
  --checkout-panel: #fffaf1;
  --checkout-panel-2: #eee2d4;
  --checkout-line: #c8b7a6;
  --checkout-paper: #2b1c18;
  --checkout-paper-deep: #6f594b;
  --checkout-ink: #241916;
  --checkout-muted: #705e52;
  background: #f0e8dc;
}

:root[data-theme="ichiban"] .checkout-panel,
:root[data-theme="ichiban"] .checkout-summary,
:root[data-theme="ichiban"] .checkout-balance,
:root[data-theme="ichiban"] .checkout-result,
:root[data-theme="ichiban"] .checkout-option,
:root[data-theme="ichiban"] .checkout-shipping-item,
:root[data-theme="ichiban"] .checkout-field input,
:root[data-theme="ichiban"] .checkout-field select,
:root[data-theme="ichiban"] .checkout-field textarea {
  background: #fffaf1 !important;
  color: #241916 !important;
}

:root[data-theme="ichiban"] .support-page {
  background: #f0e8dc;
  color: #241916;
}

:root[data-theme="ichiban"] .support-nav,
:root[data-theme="ichiban"] .support-section {
  border-color: #c8b7a6 !important;
  background: #fffaf1 !important;
}

:root[data-theme="ichiban"] .support-nav a.is-active {
  background: rgba(159, 45, 41, .1) !important;
  color: #2b1c18 !important;
}

:root[data-theme="ichiban"] .support-intro h1,
:root[data-theme="ichiban"] .support-section h2,
:root[data-theme="ichiban"] .support-section h3,
:root[data-theme="ichiban"] .support-faq summary,
:root[data-theme="ichiban"] .notice-summary strong,
:root[data-theme="ichiban"] .company-card strong {
  color: #2b1c18 !important;
}

:root[data-theme="ichiban"] .support-intro span,
:root[data-theme="ichiban"] .support-section p,
:root[data-theme="ichiban"] .support-section li,
:root[data-theme="ichiban"] .notice-body,
:root[data-theme="ichiban"] .support-nav a {
  color: #705e52 !important;
}

:root[data-theme="ichiban"] .inquiry-field input,
:root[data-theme="ichiban"] .inquiry-field select,
:root[data-theme="ichiban"] .inquiry-field textarea,
:root[data-theme="ichiban"] .inquiry-note,
:root[data-theme="ichiban"] .policy-table th {
  border-color: #c8b7a6;
  background: #f7eee2;
  color: #241916;
}


/* Global type unification: one typeface everywhere, logo wordmark excluded. */
body,
body h1, body h2, body h3, body h4, body h5, body h6,
body p, body a, body span, body small, body strong, body em, body b, body i,
body li, body dt, body dd, body time, body code, body figcaption, body summary,
body label, body th, body td, body input, body select, body textarea, body button {
  font-family: "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", sans-serif !important;
}

.kujisa-wordmark-name {
  font-family: "KUJISA Tegomin", "Noto Serif KR", Georgia, serif !important;
}

/* Mobile drawer: anchor above the app nav, fit content height, slim gutters. */
@media (max-width: 760px) {
  body .site-drawer {
    top: auto;
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 96px - env(safe-area-inset-bottom));
  }

  body .site-drawer-nav {
    flex: none;
  }

  body .site-drawer-legal {
    margin-top: 0;
  }

  body.site-drawer-open .site-drawer {
    transform: none;
  }
}

/* Reviewer demo sign-in: available only while the server exposes a demo code. */
.site-auth-review {
  margin: 14px 0 0;
  text-align: center;
}

.site-auth-review-toggle {
  padding: 4px 6px;
  border: 0;
  background: none;
  color: #7c6a5e;
  font: 600 11px/1.5 "Noto Sans KR", sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.site-auth-review-toggle:hover { color: #b39985; }

.site-auth-review-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.site-auth-review-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #4b302a;
  border-radius: 10px;
  outline: 0;
  background: #0f0b0a;
  color: #f5e9da;
  font: 500 13px/1 "Noto Sans KR", sans-serif;
}

.site-auth-review-form input:focus { border-color: #a4382e; }

.site-auth-review-form button {
  min-height: 42px;
  border: 1px solid #50332d;
  border-radius: 10px;
  background: #1b1211;
  color: #e8d9c8;
  font: 700 13px/1 "Noto Sans KR", sans-serif;
  cursor: pointer;
}

:root[data-theme="ichiban"] .site-auth-review-form input,
:root[data-theme="ichiban"] .site-auth-review-form button {
  border-color: #c8b7a6;
  background: #f7eee2;
  color: #241916;
}
