:root {
  --ink: #17253b;
  --muted: #58687f;
  --line: #dce2eb;
  --paper: #fff;
  --surface: #f5f7fb;
  --blue: #245ec8;
  --orange: #bd5328;
  --green: #337764;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, .button { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, input:disabled, textarea:disabled, select:disabled { cursor: not-allowed; opacity: .6; }
:focus-visible { outline: 3px solid #e9a431; outline-offset: 4px; }
::selection { background: #dce8ff; }
.skip-link { position: absolute; top: 8px; left: 16px; z-index: 10; padding: 10px 16px; background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.container { width: min(1140px, calc(100% - 64px)); margin-inline: auto; }
.container.narrow { max-width: 820px; }
.site-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 19px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: var(--blue); color: white; font: italic 23px Georgia, serif; }
.brand-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.brand-logo { display: block; width: 82px; height: auto; flex: 0 0 auto; color: var(--blue); overflow: visible; }
.brand-suffix { font-size: 14px; color: var(--muted); font-weight: 500; border-left: 1px solid #bec9d9; padding-left: 11px; }
.header-link { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; font-size: 14px; white-space: nowrap; }
.mode-banner { margin: 20px 0 0; padding: 10px 15px; border: 1px solid #dfcabb; border-radius: 7px; background: #fff6ec; color: #864222; font-size: 13px; line-height: 1.7; }
.mode-banner.live { color: var(--muted); background: white; border-color: var(--line); }
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 60px; padding: 58px 0 44px; align-items: center; }
.eyebrow { display: block; font-size: 12px; font-weight: 650; letter-spacing: .12em; color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(32px, 4.2vw, 48px); letter-spacing: -.04em; line-height: 1.3; margin: 13px 0 19px; font-weight: 720; }
h2 { font-size: 23px; line-height: 1.45; letter-spacing: -.025em; margin-bottom: 10px; }
h3 { font-size: 17px; margin-bottom: 10px; }
p { margin-bottom: 14px; }
.intro { max-width: 34em; color: var(--muted); font-size: 16px; line-height: 1.95; }
.accent { color: var(--blue); }
.hero-note { display: flex; gap: 9px; align-items: center; color: var(--orange); font-size: 13px; margin-top: 20px; }
.hero-note:before { content: ""; width: 20px; height: 2px; background: var(--orange); }
.workflow { border-left: 1px solid var(--line); padding-left: 32px; margin: 0; list-style: none; display: grid; gap: 19px; }
.workflow li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.workflow .step-number { color: var(--orange); font: 18px/1.5 Georgia, serif; }
.workflow strong { display: block; font-size: 14px; font-weight: 650; }
.workflow small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; min-width: 0; }
.panel + .panel { margin-top: 20px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; }
.small, .help { font-size: 13px; color: var(--muted); line-height: 1.75; }
.help { margin: 7px 0 0; }
.muted { color: var(--muted); }
.form-stack { display: grid; gap: 24px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 650; }
.service-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.service-option { border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: flex; align-items: start; gap: 12px; cursor: pointer; background: #fff; min-height: 122px; }
.service-option:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: #f5f8ff; }
.service-option input { accent-color: var(--blue); width: 20px; height: 20px; margin: 4px 0 0; flex: 0 0 auto; }
.service-option strong { display: block; font-size: 17px; margin-bottom: 5px; }
.service-option small { display: block; color: var(--muted); font-size: 13px; line-height: 1.75; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { min-width: 0; }
.field > label, .field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 650; }
input:not([type=radio]):not([type=checkbox]), textarea, select { width: 100%; border: 1px solid #c6d0de; background: #fff; color: var(--ink); border-radius: 6px; padding: 11px 12px; min-height: 48px; }
textarea { resize: vertical; line-height: 1.7; min-height: 116px; }
input::placeholder, textarea::placeholder { color: #788496; opacity: 1; }
input[type=file] { padding: 9px; font-size: 13px; }
input[type=file]::file-selector-button { min-height: 44px; padding: 9px 15px; margin-right: 12px; border: 1px solid #cbd8ed; color: var(--blue); background: #f1f5fd; border-radius: 5px; cursor: pointer; font: inherit; }
.upload-box { background: #f8faff; border: 1px dashed #b9cbe6; border-radius: 8px; padding: 20px; }
.upload-box input { background: white; }
.check-label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.8; min-height: 44px; cursor: pointer; }
.check-label input { width: 19px; height: 19px; margin: 3px 0 0; accent-color: var(--blue); flex: 0 0 auto; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.button { min-height: 48px; border: 1px solid #c6d0de; border-radius: 7px; padding: 11px 19px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; line-height: 1.65; }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.soft { color: var(--blue); background: #f0f5fe; border-color: #cbd9f0; }
.button.danger { color: #9c342e; }
.button:active:not(:disabled) { transform: translateY(1px); }
.status-message { border-radius: 7px; border: 1px solid #cbd9f0; background: #f0f5fe; color: #204f98; padding: 12px 15px; font-size: 14px; overflow-wrap: anywhere; margin: 16px 0 0; }
.status-message:empty { display: none; }
.status-message.error { border-color: #eac3bc; background: #fff2ef; color: #9c342e; }
.status-message.success { border-color: #bfdacf; background: #f0f8f4; color: #28634f; }
.success-panel { border-color: #bfdacf; }
.success-icon { width: 38px; height: 38px; border-radius: 50%; background: #e3f1e9; color: var(--green); display: grid; place-items: center; font-size: 20px; margin-bottom: 16px; }
.private-link { font-size: 12px; margin-bottom: 12px; overflow-wrap: anywhere; }
.details-note { border-left: 3px solid var(--orange); padding: 2px 0 2px 14px; margin-top: 20px; color: var(--muted); font-size: 13px; }
.page-heading { padding: 40px 0 25px; }
.page-heading h1 { font-size: clamp(29px, 4vw, 37px); margin-bottom: 10px; }
.order-id { overflow-wrap: anywhere; font-size: 13px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 4px; background: #eaf0fd; color: var(--blue); font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge.done { background: #e8f3ed; color: var(--green); }
.badge.closed { background: #eef0f4; color: var(--muted); }
.order-progress { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 26px 0 0; padding: 0; gap: 8px; }
.order-progress li { border-top: 3px solid #e1e6ee; padding-top: 10px; color: var(--muted); font-size: 12px; }
.order-progress li.current { border-color: var(--blue); color: var(--blue); font-weight: 650; }
.order-progress li.complete { border-color: #86a1cf; }
.summary-list { display: grid; grid-template-columns: 95px minmax(0, 1fr); margin: 0; gap: 12px 20px; font-size: 14px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.price { font-size: 35px; letter-spacing: -.04em; line-height: 1.3; color: var(--blue); font-variant-numeric: tabular-nums; font-weight: 650; }
.price small { font-size: 16px; margin-right: 5px; font-weight: 500; }
.quote-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 23px; }
.quote-top h2 { margin-bottom: 5px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 25px 0; }
.empty-state { padding: 24px 0; text-align: center; color: var(--muted); font-size: 14px; }
.empty-state h2 { color: var(--ink); }
.payment-box { margin-top: 20px; padding: 18px; background: #f7f9fe; border: 1px solid var(--line); border-radius: 8px; }
.payment-box p:last-child { margin-bottom: 0; }
.payment-qr { display: block; width: min(240px, 100%); height: auto; margin: 15px auto; background: white; }
.order-actions { margin-top: 22px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 38px auto 0; padding-top: 19px; padding-bottom: max(26px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.admin-layout { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 22px; align-items: start; }
.admin-layout > .panel + .panel { margin: 0; }
.order-list { display: grid; gap: 10px; }
.order-item { display: grid; text-align: left; gap: 5px; border: 1px solid var(--line); padding: 15px; background: white; border-radius: 7px; color: var(--ink); width: 100%; }
.order-item[aria-pressed=true] { border-color: var(--blue); background: #f4f8ff; }
.order-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.order-item strong { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.order-item small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.admin-detail-section { margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }
.admin-login { max-width: 550px; margin: 0 auto; }
.logout { margin-left: auto; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled) { background: #edf2fa; }
  .button.primary:hover:not(:disabled) { background: #184cad; }
  .service-option:hover, .order-item:hover { border-color: #8caadd; }
}
@media (max-width: 820px) {
  .hero { gap: 30px; padding-top: 40px; grid-template-columns: 1.1fr .9fr; }
  .workflow { padding-left: 22px; }
  .panel { padding: 25px; }
  .admin-layout { grid-template-columns: 1fr; }
  .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 590px) {
  .container { width: calc(100% - 32px); }
  .site-header { min-height: 73px; gap: 10px; }
.brand { font-size: 17px; gap: 8px; }
.brand-mark { width: 29px; height: 29px; }
.brand-logo { width: 73px; }
.brand-suffix { font-size: 12px; padding-left: 8px; }
  .header-link { font-size: 12px; }
  .hero { display: block; padding: 33px 0 27px; }
  h1 { font-size: 34px; }
  .intro { font-size: 15px; }
  .workflow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; margin-top: 28px; }
  .workflow li { display: block; }
  .workflow .step-number { display: block; margin-bottom: 7px; }
  .workflow strong { font-size: 13px; }
  .workflow small { font-size: 11px; }
  .panel { padding: 22px 18px; }
  .service-options, .form-grid { grid-template-columns: 1fr; }
  .service-option { min-height: 104px; padding: 15px; }
  .section-heading { flex-wrap: wrap; gap: 4px; margin-bottom: 18px; }
  .section-heading h2 { font-size: 21px; }
  .upload-box { padding: 15px; }
  .form-stack { gap: 22px; }
  .actions > .button { flex: 1 1 auto; }
  .quote-top { align-items: flex-start; }
  .price { font-size: 30px; }
  .summary-list { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; font-size: 13px; }
  .order-list { grid-template-columns: 1fr; }
  .page-heading { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .button:active:not(:disabled) { transform: none; }
}
.plan-price { display: block; margin-top: 12px; color: var(--blue); font-size: 17px; font-weight: 700; }
.subject-options, .background-options { display: flex; gap: 10px; flex-wrap: wrap; }
.subject-options label, .background-options label { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.subject-options label:has(:checked), .background-options label:has(:checked) { background: #f0f5fe; border-color: var(--blue); }
.subject-options label span { color: var(--muted); font-size: 12px; }
.subject-options input, .background-options input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }
#background-upload { margin-top: 16px; }
.background-preview { --theme-accent: #245eba; position: relative; isolation: isolate; overflow: hidden; background: #fff; color: #202c3d; border: 1px solid #d4dbe6; border-top: 6px solid var(--theme-accent); margin-top: 18px; aspect-ratio: 16 / 9; display: grid; align-items: center; border-radius: 3px; }
.background-preview[data-theme=english-red] { --theme-accent: #cf0016; }
.background-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: -1; }
.preview-content { padding: 5% 6%; min-width: 0; }
.preview-label { color: var(--theme-accent); font-size: 12px; font-weight: 700; background: #fffffff2; }
.preview-content > strong { display: table; margin: 10px 0 22px; font-size: clamp(18px, 3vw, 29px); line-height: 1.4; background: #fffffff2; }
.preview-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.preview-columns > div { padding: 16px; background: #fffffff2; border-left: 3px solid var(--theme-accent); }
.preview-columns span { font-size: 12px; color: var(--theme-accent); }
.preview-columns p { font-size: 14px; margin: 9px 0 0; }
.preview-footnote { display: table; margin-top: 25px; font-size: 11px; color: #596579; background: #fffffff2; }
.design-summary { margin-bottom: 20px; }
.course-page { padding: 0; margin: 0; height: 100dvh; display: flex; flex-direction: column; }
.course-header { padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: white; }
.course-header strong { font-size: 14px; }
.course-header a { font-size: 13px; }
#course-frame { width: 100%; flex: 1; min-height: 0; border: 0; background: white; }
.course-page > .status-message:not(:empty) { margin: 16px; }
@media(max-width:590px) { .background-preview { aspect-ratio: auto; min-height: 250px; } .preview-columns { gap: 10px; } .preview-columns > div { padding: 10px; } .preview-content { padding: 18px; } .preview-content > strong { margin-bottom: 18px; } .preview-columns p { font-size: 12px; } }
