/* public/theme.css — 시스템 라이트/다크 테마와 색상 변수. prefers-color-scheme 규칙으로 운영체제 설정을 반영합니다. 아래 선택자는 HTML class/id와 연결됩니다. */
/* 화면 요소 스타일: :root */
:root {
  color-scheme: light dark;
  --surface: #fff;
  --surface-soft: #f5f6f7;
  --foreground: #25282b;
  --border: #e9e9eb;
}
body {
  background: var(--surface);
  color: var(--foreground);
}
/* 화면 크기 또는 시스템 테마 조건: @media (prefers-color-scheme: dark) */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #121416;
    --surface-soft: #1d2024;
    --foreground: #ecedf0;
    --border: #363b42;
    --line: #363b42;
    --muted: #aab2bc;
    --navy: #edf0f4;
    --blue: #ff925d;
    --lime: #3b281e;
    background: #121416;
    color: #ecedf0;
  }
  body {
    background: #121416;
    color: #ecedf0;
  }
  button,
  input,
  textarea,
  select {
    color: inherit;
  }
  .header,
  .market-header {
    background: #171a1e;
    border-color: var(--border);
  }
  .market-header nav button,
  .header nav a,
  .market-header nav a {
    color: #c0c6ce;
  }
  .market-header nav .current,
  .market-header nav a.current,
  .header nav a.active {
    color: #ff985f;
  }
  .brand,
  .card-title,
  .group-card-title,
  .seller-profile,
  .market-search button {
    color: #edf0f3;
  }
  .market-brand {
    color: #ff985f;
  }
  .market-brand span {
    color: #aab2bc;
  }
  .primary,
  .brand-mark {
    background: #ff8648;
    border-color: #ff8648;
    color: #171a1e;
  }
  .primary:hover:not(:disabled) {
    background: #ffa36e;
    border-color: #ffa36e;
  }
  .secondary,
  .market-search button,
  .add-button {
    background: #282d33;
    border-color: #444c55;
    color: #ecedf0;
  }
  .secondary:hover:not(:disabled) {
    background: #343b44;
  }
  .text-button,
  .muted,
  .panel-note,
  .footnote,
  .image-note,
  .upload-note,
  .breadcrumb,
  .member-bar,
  .market-intro p:not(.breadcrumb),
  .group-summary,
  .group-card-bottom,
  .card-location,
  .card-bottom,
  .catalog-bottom,
  .market-footer p,
  .market-footer a:not(.market-brand),
  .market-footer .market-brand span,
  .sidebar-note p,
  .sidebar-note > span,
  .catalog-heading span,
  .seller-row small,
  .checkout-item p {
    color: #adb5bf;
  }
  .member-bar,
  .market-footer,
  .catalog-bottom,
  .sidebar-note,
  .seller-row,
  .checkout-item,
  .owner-actions,
  .auth-tabs,
  .group-message,
  .group-person,
  .group-card,
  #group-member-area {
    border-color: var(--border);
  }
  .market-search,
  .card-picture,
  .photo-preview,
  .group-card,
  .order-panel,
  .product,
  .login-panel,
  .stat,
  .success-card,
  .table-wrap {
    background: #1d2126;
    border-color: var(--border);
  }
  .market-search input {
    background: transparent;
    color: #ecedf0;
  }
  input:not([type="checkbox"]),
  textarea,
  select {
    background: #191d22;
    border-color: #434b55;
    color: #edf0f4;
  }
  input::placeholder,
  textarea::placeholder,
  .market-search input::placeholder {
    color: #989faa;
  }
  .catalog-heading select {
    background: #121416;
    color: #b9c0c9;
  }
  .category-options button {
    color: #b7c0ca;
  }
  .category-options button:hover {
    background: #252a30;
  }
  .category-options button.chosen,
  .intro-tag,
  .seller-tag,
  .sample-badge,
  .group-card-banner {
    background: #392a22;
    color: #ffab7a;
    border-color: #65422e;
  }
  .quick-add,
  .eyebrow,
  .admin-label,
  .total-row strong,
  #checkout .total-row strong,
  .auth-tabs .selected {
    color: #ff9b69;
  }
  .heart,
  .dialog-x {
    background: #30363e;
    color: #edf0f4;
  }
  .heart.liked {
    color: #ff9d71;
  }
  .market dialog,
  dialog {
    background: #1d2126;
    color: #ecedf0;
    border-color: #444c55;
  }
  .market dialog::backdrop,
  dialog::backdrop {
    background: #000a;
  }
  .seller-avatar,
  #success .success-icon,
  .success-icon {
    background: #3b2a20;
    color: #ffa166;
  }
  .quantity {
    border-color: #444c55;
  }
  .quantity button {
    background: #303640;
    color: #ecedf0;
  }
  .quantity output {
    color: #ecedf0;
  }
  .remove-photo {
    background: #252a30;
    color: #f5f6f8;
  }
  .detail-thumbnails button {
    border-color: #444c55;
    background: #252a30;
  }
  .group-card-banner span,
  .group-toolbar .selected {
    color: #ffad80;
  }
  .group-toolbar .selected {
    border-color: #c77645;
  }
  .auth-tabs button {
    color: #b4bbc5;
  }
  .auth-tabs .selected {
    border-color: #ff945c;
  }
  .error {
    color: #ff9ba7;
  }
  .owner-actions .text-button {
    color: #ffad98;
  }
  .market-empty {
    border-color: #434b55;
    color: #b6bec8;
  }
  .market-empty h3 {
    color: #e8ecf0;
  }
  .toast {
    background: #e9edf2;
    color: #1b2026;
  }
  .count {
    background: #ff945c;
    color: #191c20;
  }
  .stat:first-child {
    background: #30251f;
    border-color: #65503d;
    color: #f0e8e2;
  }
  .stat:first-child strong {
    color: #ffac79;
  }
  .filters button {
    color: #bec5cf;
  }
  .filters button.selected {
    background: #3a2c23;
    color: #ffc49e;
  }
  th {
    background: #282e35;
    color: #d0d6de;
  }
  td {
    border-color: var(--border);
  }
  td small {
    color: #adb5bf;
  }
  .status.received {
    background: #243550;
    color: #a8c9ff;
  }
  .status.confirmed {
    background: #423722;
    color: #f4d591;
  }
  .status.completed {
    background: #1f3a2e;
    color: #99e4b5;
  }
  .status.cancelled {
    background: #343941;
    color: #c2c9d2;
  }
  .success-card dl {
    background: #282d34;
  }
  .success-card dd {
    color: #edf0f4;
  }
  .footer {
    border-color: #363b42;
    color: #adb5bf;
  }
  fieldset,
  .total-row,
  .detail-items {
    border-color: #363b42;
  }
  .detail-row p {
    color: #ecedf0;
  }
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline-color: #ffac7d;
  }
}
