/* ===== 기본 테마 전용: Purple & Gold ===== */

body[data-color-theme="basic"] {
  --default-bg: var(--basic-bg);
  --default-bg-soft: var(--basic-bg-soft);
  --default-gold: var(--basic-gold);
  --default-gold-dark: var(--basic-gold-dark);
  --default-gold-light: var(--basic-gold-light);
  --default-text: var(--basic-text);
  --default-muted: var(--basic-text);
}
body[data-color-theme="basic"] .brand-logo {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  object-fit: contain;
  display: block;
  transform: scale(2);
  transform-origin: center;
}
body[data-color-theme="basic"] {
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(var(--basic-gold-rgb), 0.045),
      transparent 32%
    ),
    linear-gradient(
      135deg,
      var(--basic-bg-main) 0%,
      var(--basic-bg-soft) 50%,
      var(--basic-bg-main) 100%
    ) !important;
  color: var(--default-text) !important;
}

body[data-color-theme="basic"] .controls {
  background: transparent !important;
  border-right-color: rgba(var(--basic-gold-rgb), 0.18) !important;
}
body[data-color-theme="basic"] .brand {
  border-bottom-color: rgba(var(--basic-gold-rgb), 0.20) !important;
}
body[data-color-theme="basic"] .brand h1 {
  color: var(--basic-gold) !important;
}
body[data-color-theme="basic"] .setting-group {
  border-bottom-color: rgba(var(--basic-gold-rgb), 0.14) !important;
}
body[data-color-theme="basic"] .setting-group summary,
body[data-color-theme="basic"] label.title {
  color: var(--basic-gold) !important;
}
body[data-color-theme="basic"] .hint,
body[data-color-theme="basic"] .row-range-label {
  color: var(--basic-muted) !important;
}
body[data-color-theme="basic"] .setting-group summary::after {
  color: rgba(var(--basic-gold-rgb), 0.70) !important;
}
body[data-color-theme="basic"] select,
body[data-color-theme="basic"] input[type="text"],
body[data-color-theme="basic"] input[type="number"] {
  background: rgb(255, 255, 255) !important;
  border-color: rgb(244, 244, 244) !important;
  color: #0d0d0d !important;
}
body[data-color-theme="basic"] select:focus,
body[data-color-theme="basic"] input:focus {
  border-color: var(--basic-gold) !important;
  box-shadow: 0 0 0 4px rgba(var(--basic-gold-rgb), 0.13) !important;
}
body[data-color-theme="basic"] input[type="radio"],
body[data-color-theme="basic"] input[type="checkbox"] {
  accent-color: var(--basic-button-gold) !important;
}
body[data-color-theme="basic"] .primary {
  background: linear-gradient(
    135deg,
    var(--basic-button-gold-dark),
    var(--basic-gold)
  ) !important;
  color: var(--basic-button-text) !important;
}
body[data-color-theme="basic"] .preview-wrap {
  background: #fFFFFF !important;
}
body[data-color-theme="basic"] .print-main,
body[data-color-theme="basic"] .print-q {
  background: linear-gradient(
    135deg,
    var(--basic-button-gold),
    var(--basic-gold)
  ) !important;
  color: var(--basic-button-text) !important;
}
body[data-color-theme="basic"] .print-a {
  background: linear-gradient(
    135deg,
    var(--basic-button-gold-dark),
    var(--basic-gold)
  ) !important;
  color: var(--basic-button-text) !important;
}
body[data-color-theme="basic"] .print-both {
  background: linear-gradient(
    135deg,
    var(--basic-button-gold-deep),
    var(--basic-gold)
  ) !important;
  color: var(--basic-button-text) !important;
}
body[data-color-theme="basic"] .view-tab.is-active {
  background: var(--basic-gold) !important;
  color: var(--basic-button-text) !important;
}
body[data-color-theme="basic"] .check-row {
  color: #F4F0F8 !important;
}
body[data-color-theme="basic"] .controls::-webkit-scrollbar-thumb,
body[data-color-theme="basic"] .preview-wrap::-webkit-scrollbar-thumb {
  background: var(--basic-gold) !important;
}

:root {
  --bg: #f7f1ec;
  --bg-2: #fff8f6;
  --panel: rgba(255,255,255,.86);
  --panel-solid: #fffdfb;
  --ink: #2b2525;
  --muted: #83716c;
  --line: #efdeda;
  --line-strong: #e5c8c8;
  --accent: #160d28;
  --accent-2: #160d28;
  --yellow: #fff2b8;
  --blue: #f0a6bd;
  --green: #9fd8b2;
  --orange: #f5b76d;
  --purple: #b9a1ea;
  --ghost: #afa29b;
  --field-bg: rgba(255,255,255,.72);
  --select-bg: #fffefb;
  --status-bg: #fff2f6;
  --focus: #e58aa4;
  --shadow: 0 22px 60px rgba(115, 83, 83, .16);
  --soft-shadow: 0 10px 24px rgba(115, 83, 83, .10);
  --page-bg: #ffffff;
  --paper-bg: none;
}

body[data-theme="pastel"] {
  --bg: #f7f1ec;
  --bg-2: #fff8f6;
  --panel: rgba(255,255,255,.86);
  --panel-solid: #fffdfb;
  --ink: #2b2525;
  --muted: #83716c;
  --line: #efdeda;
  --line-strong: #e5c8c8;
  --accent: #f1a7bd;
  --accent-2: #f6cdd2;
  --yellow: #fff2b8;
  --blue: #f0a6bd;
  --green: #9fd8b2;
  --orange: #f5b76d;
  --purple: #b9a1ea;
  --ghost: #afa29b;
  --field-bg: rgba(255,255,255,.72);
  --select-bg: #fffefb;
  --status-bg: #fff2f6;
  --focus: #160d28;
  --shadow: 0 22px 60px rgba(115, 83, 83, .16);
  --soft-shadow: 0 10px 24px rgba(115, 83, 83, .10);
}

body[data-theme="bw"] {
  --bg: #f3f3f3;
  --bg-2: #ffffff;
  --panel: rgba(255,255,255,.92);
  --panel-solid: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --line: #d9d9d9;
  --line-strong: #bdbdbd;
  --accent: #111111;
  --accent-2: #e8e8e8;
  --yellow: #eeeeee;
  --blue: #1f1f1f;
  --green: #3f3f3f;
  --orange: #5a5a5a;
  --purple: #2f2f2f;
  --ghost: #7a7a7a;
  --field-bg: rgba(255,255,255,.85);
  --select-bg: #ffffff;
  --status-bg: #eeeeee;
  --focus: #111111;
  --shadow: 0 22px 60px rgba(0,0,0,.12);
  --soft-shadow: 0 10px 24px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, var(--accent-2), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(185,161,234,.28), transparent 28%),
    linear-gradient(135deg, var(--bg-2), var(--bg));
  font-family: var(--locrian-ui-font);
}

body[data-theme="bw"] {
  background:
    radial-gradient(circle at 12% 10%, #eeeeee, transparent 30%),
    radial-gradient(circle at 88% 14%, #e6e6e6, transparent 28%),
    linear-gradient(135deg, var(--bg-2), var(--bg));
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
}

.controls {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(16px);
}

body[data-theme="bw"] .controls {
  border-color: #d7d7d7;
}

.controls::-webkit-scrollbar,
.preview-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.controls::-webkit-scrollbar-thumb,
.preview-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

.brand {
  position: relative;
  margin: 0 0 16px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,248,246,.70)),
    linear-gradient(135deg, var(--accent-2), transparent);
  box-shadow: var(--soft-shadow);
}

.brand::after {
  content: "♪";
  position: absolute;
  right: 18px;
  top: 6px;
  color: var(--accent);
  opacity: .28;
  font-size: 74px;
  font-weight: 900;
  line-height: 1;
}

body[data-theme="bw"] .brand::after { color: #111; opacity: .12; }

.brand h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 7px;
  font-size: 23px;
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.brand p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 280px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.field {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--field-bg);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}

.setting-group {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.54);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}

.setting-group summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  cursor: pointer;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.03em;
  user-select: none;
}

.setting-group summary::-webkit-details-marker { display: none; }

.setting-group summary::after {
  content: "+";
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--ink);
  font-weight: 950;
  line-height: 1;
}

.setting-group[open] summary::after { content: "−"; }

body[data-theme="bw"] .setting-group summary::after {
  background: #eeeeee;
}

.setting-group-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.setting-group-body .field:first-child { margin-top: 12px; }
.setting-group-body .field:last-child { margin-bottom: 0; }

label.title {
  display: block;
  margin-bottom: 9px;
  font-weight: 850;
  font-size: 13px;
  letter-spacing: -0.02em;
}

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--select-bg);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.76) inset;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

select:focus,
input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(240, 166, 189, .18);
}

body[data-theme="bw"] select:focus,
body[data-theme="bw"] input:focus {
  box-shadow: 0 0 0 4px rgba(0,0,0,.10);
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.row-range-list {
  display: grid;
  gap: 8px;
}

.row-range-item {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 8px;
}

.row-range-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.radio-list {
  display: grid;
  gap: 7px;
  font-size: 14px;
}

.radio-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.56);
}

input[type="radio"] { accent-color: var(--accent); }

.btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
  align-items: stretch;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 12px 10px;
  color: white;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(0,0,0,.10);
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}

button:hover { filter: brightness(.99); transform: translateY(-1px); }
button:active { transform: translateY(1px); }

.primary { background: var(--blue); }
.print-main { background: var(--green); width: 100%; height: 100%; }
.print-q { background: var(--green); }
.print-a { background: var(--orange); }
.print-both { background: var(--purple); }
.ghost { background: var(--ghost); }
.reset-settings-btn {
  width: 100%;
  margin-top: 10px;
  box-shadow: none;
  opacity: .86;
}

.print-dropdown {
  position: relative;
  min-width: 0;
}

.print-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  gap: 8px;
}

.print-dropdown.is-open .print-menu {
  display: grid;
}

.print-option {
  width: 100%;
  box-shadow: 0 6px 14px rgba(0,0,0,.09);
}

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--status-bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--line);
}

.error {
  background: var(--yellow);
  color: var(--ink);
}

.preview-wrap {
  min-width: 0;
  height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 30px;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

body[data-theme="bw"] .preview-wrap { border-color: #d7d7d7; }

.preview-shell {
  min-width: 850px;
  padding: 18px 18px 28px;
}

.preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  padding: 4px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.preview-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.preview-toolbar h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.view-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);
}

.view-tab {
  min-width: 98px;
  box-shadow: none;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
}

/* Major worksheet option groups only. Icons inherit each summary's theme/hover color. */
.setting-group > summary > .setting-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.setting-group > summary .setting-heading-icon {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  color: var(--locrian-primary, #61758A);
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Locrian generated screen UI font-size uplift; do not edit. */
@media screen {
.brand::after{font-size:calc(74px + 2pt)}
.brand::after{font-weight:850}
.brand h1{font-size:calc(23px + 2pt)}
.brand p{font-size:calc(13px + 2pt)}
.setting-group summary{font-weight:850}
.setting-group summary{font-size:calc(14px + 2pt)}
.setting-group summary::after{font-weight:900}
label.title{font-weight:800}
label.title{font-size:calc(13px + 2pt)}
select,
input[type="text"],
input[type="number"]{font-size:calc(14px + 2pt)}
.hint{font-size:calc(12px + 2pt)}
.row-range-label{font-size:calc(12px + 2pt)}
.row-range-label{font-weight:800}
.radio-list{font-size:calc(14px + 2pt)}
button{font-size:calc(14px + 2pt)}
button{font-weight:800}
.status{font-size:calc(13px + 2pt)}
.preview-kicker{font-size:calc(11px + 2pt)}
.preview-kicker{font-weight:850}
.preview-toolbar h2{font-size:calc(20px + 2pt)}
}
