*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;background:#f4f2ed;color:#1a1a18;min-height:100vh;line-height:1.5}
a{color:inherit}
.wrap{max-width:960px;margin:0 auto;padding:1.5rem 1rem}
.wrap-narrow{max-width:480px;margin:0 auto;padding:1.5rem 1rem}
h1{font-size:22px;font-weight:700;margin-bottom:4px}
h2{font-size:19px;font-weight:700;margin-bottom:10px}
h3{font-size:16px;font-weight:700}
.sub{font-size:14px;color:#777;margin-bottom:1.5rem}
p{font-size:15px}
.topnav{border-bottom:1px solid #e0ddd6;background:#fff}
.topnav-inner{max-width:960px;margin:0 auto;padding:14px 1rem;display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{font-weight:700;font-size:17px;display:flex;align-items:center;gap:6px;text-decoration:none;color:#1a1a18}
.nav-links{display:flex;gap:18px;align-items:center;font-size:14px}
.nav-links a{text-decoration:none;color:#555}
.nav-links a:hover{color:#1a1a18}
.nav-links a.btn{color:#1a1a18}
.nav-links a.btn-primary{color:#fff}
.nav-links a.btn-primary:hover{color:#fff}
.tabs{display:flex;gap:0;border-bottom:2px solid #e0ddd6;margin-bottom:1.5rem;flex-wrap:wrap}
.tab{padding:9px 20px;font-size:14px;font-weight:500;cursor:pointer;border:none;background:transparent;color:#888;border-bottom:2px solid transparent;margin-bottom:-2px;transition:all .15s}
.tab.active{color:#1a1a18;border-bottom-color:#1a1a18}
.tab:hover:not(.active){color:#444}
.panel{display:none}.panel.active{display:block}
.card{background:#fff;border:1px solid #e0ddd6;border-radius:12px;padding:1.25rem;margin-bottom:1rem}
.card-title{font-size:15px;font-weight:600;margin-bottom:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.grid-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.schedule-grid{border-collapse:collapse;font-size:13px;min-width:500px;width:100%}
.schedule-grid th{background:#f4f2ed;font-weight:600;padding:8px 12px;border:1px solid #e0ddd6;text-align:center;white-space:nowrap}
.schedule-grid td{border:1px solid #e0ddd6;padding:4px}
.slot{width:100%;height:36px;border-radius:6px;border:1.5px solid #d0cdc6;background:#fff;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;transition:all .15s;user-select:none;color:#aaa}
.slot:hover{border-color:#888;background:#f4f2ed}
.slot.on{background:#1a1a18;border-color:#1a1a18;color:#fff;font-weight:600}
.slot.priority{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:700}
.slot.on-teacher{background:#2563eb;border-color:#2563eb;color:#fff}
.slot-disabled{cursor:not-allowed!important;background:repeating-linear-gradient(45deg,#f4f2ed,#f4f2ed 5px,#eae7e0 5px,#eae7e0 10px)!important;border-color:#e0ddd6!important;opacity:.6}
.slot-disabled:hover{border-color:#e0ddd6!important;background:repeating-linear-gradient(45deg,#f4f2ed,#f4f2ed 5px,#eae7e0 5px,#eae7e0 10px)!important}
.time-label{font-weight:600;font-size:13px;color:#555;padding:8px 12px;white-space:nowrap;text-align:right}
.btn{display:inline-flex;align-items:center;gap:6px;padding:9px 18px;border:1px solid #d0cdc6;border-radius:8px;background:transparent;color:#1a1a18;font-size:14px;cursor:pointer;transition:background .15s;text-decoration:none}
.btn:hover{background:#f0ede6}
.btn-primary{background:#1a1a18;color:#fff;border-color:transparent;font-weight:600}
.btn-primary:hover{background:#333}
.btn-danger{color:#c0392b;border-color:#f0c0bc}
.btn-danger:hover{background:#fff0ee}
.btn-sm{padding:5px 11px;font-size:13px}
.btn-block{width:100%;justify-content:center}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.step-nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.input-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
label{display:block;font-size:13px;font-weight:600;margin-bottom:5px;color:#444}
.field{margin-bottom:14px}
.field .opt{font-weight:400;color:#999}
input[type=text],input[type=email],input[type=password],select,textarea{width:100%;padding:10px 12px;border:1px solid #d0cdc6;border-radius:8px;font-size:14px;outline:none;background:#fff;color:#1a1a18;font-family:inherit}
input:focus,select:focus,textarea:focus{border-color:#2563eb}
.checkbox-row{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:400;color:#1a1a18}
.checkbox-row input{width:16px;height:16px}
.radio-group{display:flex;gap:10px;flex-wrap:wrap}
.radio-opt{border:1.5px solid #d0cdc6;border-radius:8px;padding:9px 14px;font-size:14px;cursor:pointer;display:flex;align-items:center;gap:7px;background:#fff}
.radio-opt.active{border-color:#1a1a18;background:#f4f2ed;font-weight:600}
.result-grid{border-collapse:collapse;font-size:13px;width:100%}
.result-grid th{background:#f4f2ed;font-weight:600;padding:8px 12px;border:1px solid #e0ddd6;text-align:center}
.result-grid td{border:1px solid #e0ddd6;padding:8px 12px;text-align:center;font-size:13px}
.assigned{background:#dcfce7;color:#166534;font-weight:600;border-radius:6px;padding:4px 8px;display:inline-block}
.free-slot{background:#eff6ff;color:#1e40af;border-radius:6px;padding:4px 8px;display:inline-block;font-size:12px}
.unassigned{background:#fee2e2;color:#991b1b;border-radius:6px;padding:4px 8px;display:inline-block}
.legend{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:12px;font-size:13px;align-items:center}
.leg{display:flex;align-items:center;gap:6px}
.leg-dot{width:12px;height:12px;border-radius:3px}
.alert{padding:12px 16px;border-radius:8px;font-size:14px;margin-bottom:12px}
.alert-ok{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}
.alert-warn{background:#fef9c3;color:#854d0e;border:1px solid #fde047}
.alert-err{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}
.badge{display:inline-block;padding:3px 10px;border-radius:99px;font-size:12px;font-weight:600}
.badge-blue{background:#eff6ff;color:#1e40af}
.badge-green{background:#dcfce7;color:#166534}
.badge-orange{background:#ffedd5;color:#9a3412}
.badge-white{background:#f4f2ed;color:#666;border:1px solid #e0ddd6}
.hint{font-size:12px;color:#999;margin-top:8px}
.promo-banner{background:linear-gradient(90deg,#eff6ff,#eef2ff);border-bottom:1px solid #dbe6fb;text-align:center;padding:9px 1rem;font-size:13.5px;color:#1e3a8a;font-weight:600}
.promo-banner strong{color:#2563eb}
.hero{text-align:center;padding:4rem 1rem 3rem;background:radial-gradient(ellipse at top,#eef2ff 0%,#f4f2ed 60%)}
.hero-badge{display:inline-flex;align-items:center;justify-content:center;background:#dcfce7;color:#166534;border:1px solid #bbf7d0;border-radius:99px;padding:5px 13px;font-size:12px;font-weight:700;margin-bottom:14px}
.hero h1{font-size:36px;margin-bottom:16px;letter-spacing:-.5px}
.hero p{max-width:580px;margin:0 auto 22px;color:#555;font-size:16.5px}
.hero-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.hero-note{margin-top:18px;font-size:13px;color:#888}
.hero-points{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:18px auto 0;max-width:760px}
.hero-points span{background:#fff;border:1px solid #e0ddd6;border-radius:99px;padding:5px 11px;font-size:12px;color:#555}
.section{padding:3rem 0;border-top:1px solid #e0ddd6}
.section.tinted{background:#fff}
.section h2{text-align:center;margin-bottom:8px;font-size:26px}
.section-lead{text-align:center;color:#666;font-size:14.5px;max-width:560px;margin:0 auto 2rem}
.feature-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.feature{background:#fff;border:1px solid #e0ddd6;border-radius:14px;padding:22px;transition:transform .15s,box-shadow .15s}
.feature:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(37,99,235,.08)}
.feature .icon-circle{width:42px;height:42px;border-radius:50%;background:#eff6ff;display:flex;align-items:center;justify-content:center;font-size:20px;margin-bottom:12px}
.feature h3{margin-bottom:6px}
.feature p{color:#666;font-size:14px}
.value-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.value-item{background:#fff;border:1px solid #e0ddd6;border-radius:12px;padding:16px}
.value-item strong{display:block;font-size:14px;margin-bottom:6px}
.value-item span{display:block;font-size:13px;color:#666}
.note-box{max-width:680px;margin:2rem auto 0;background:#fffbea;border:1px solid #fde68a;border-radius:12px;padding:16px 18px;font-size:14px;color:#7c5c00}
.note-box strong{color:#4a3800}
.qa{max-width:700px;margin:0 auto}
.qa-item{border-bottom:1px solid #e0ddd6}
.qa-item summary{list-style:none;cursor:pointer;padding:16px 4px;font-size:15px;font-weight:600;display:flex;justify-content:space-between;align-items:center;gap:12px}
.qa-item summary::-webkit-details-marker{display:none}
.qa-item summary::after{content:'+';font-size:20px;font-weight:400;color:#2563eb;flex-shrink:0;transition:transform .2s}
.qa-item[open] summary::after{transform:rotate(45deg)}
.qa-item p{color:#666;font-size:14px;padding:0 4px 16px;max-width:620px}
.pricing-wrap{display:flex;justify-content:center}
.price-card{background:#fff;border:2px solid #1a1a18;border-radius:18px;padding:2.25rem 2.5rem;max-width:380px;text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.05)}
.price-card .tag{display:inline-block;background:#2563eb;color:#fff;font-size:12px;font-weight:700;padding:4px 13px;border-radius:99px;margin-bottom:12px}
.price-amount{font-size:42px;font-weight:800;margin:6px 0}
.price-amount span{font-size:15px;font-weight:500;color:#777}
.price-list{text-align:left;margin:16px 0 4px;padding-left:1.2rem;color:#444;font-size:14px}
.price-list li{margin-bottom:6px}
.price-actions{display:flex;gap:6px;margin-top:6px}
.mini-link{border:1px solid #d0cdc6;background:#fff;border-radius:6px;padding:2px 7px;font-size:11px;color:#555;cursor:pointer}
.mini-link:hover{background:#f4f2ed;color:#1a1a18}
.price-note{font-size:13px;color:#777;margin-top:10px;line-height:1.5}
.price-old{font-size:15px;color:#aaa;text-decoration:line-through;margin-right:6px}
footer{border-top:1px solid #e0ddd6;padding:2.5rem 1rem 2rem;text-align:center;font-size:13px;color:#999;background:#fff}
footer a{color:#666;text-decoration:none}
footer a:hover{text-decoration:underline;color:#2563eb}
.footer-links{display:flex;gap:18px;justify-content:center;flex-wrap:wrap;margin:6px 0 14px;font-size:13px}
.footer-biz{font-size:12px;color:#aaa;margin-top:14px;line-height:1.7}
.auth-card{background:#fff;border:1px solid #e0ddd6;border-radius:14px;padding:2rem}
.auth-switch{text-align:center;font-size:14px;color:#666;margin-top:16px}
.auth-switch a{color:#2563eb;font-weight:600;text-decoration:none}
.error-box{background:#fee2e2;color:#991b1b;border:1px solid #fecaca;border-radius:8px;padding:10px 14px;font-size:13px;margin-bottom:14px;display:none}
.success-box{background:#dcfce7;color:#166534;border:1px solid #bbf7d0;border-radius:8px;padding:10px 14px;font-size:13px;margin-bottom:14px;display:none}
.admin-table{width:100%;border-collapse:collapse;font-size:13px}
.admin-table th{background:#f4f2ed;text-align:left;padding:9px 10px;border:1px solid #e0ddd6;white-space:nowrap}
.admin-table td{padding:9px 10px;border:1px solid #e0ddd6;vertical-align:middle}
.status-btn{border:1px solid #d0cdc6;border-radius:6px;padding:4px 10px;font-size:12px;cursor:pointer;font-weight:600}
.center{text-align:center}
.muted{color:#888}
.spinner{display:inline-block;width:16px;height:16px;border:2px solid #ddd;border-top-color:#1a1a18;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.loading-overlay{display:flex;align-items:center;gap:10px;color:#888;font-size:14px;padding:2rem;justify-content:center}
.link-box{display:flex;gap:8px;align-items:center;background:#f4f2ed;border:1px solid #e0ddd6;border-radius:8px;padding:10px 12px;font-size:13px;word-break:break-all}
.calendar-export-card{border-color:#bbf7d0;background:#f0fdf4}
.calendar-preview-card{background:#fff;border:1px solid #bbf7d0;border-radius:12px;padding:16px;text-align:left}
.settings-row{display:flex;gap:24px;flex-wrap:wrap;align-items:flex-end}
.settings-col{min-width:200px}
.lesson-count-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px;padding:10px 12px;background:#fafaf8;border:1px solid #e0ddd6;border-radius:8px}
.lesson-count-row label{margin:0}
.lesson-count-select{width:auto;min-width:74px;padding:6px 9px;font-size:13px}
.icon-btn{width:38px;height:38px;border-radius:50%;border:1px solid #d0cdc6;background:#fff;font-size:17px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .15s}
.icon-btn:hover{background:#f0ede6}
.tool-row{display:flex;gap:10px;align-items:center;margin-bottom:1rem}
.tool-row .settings-inline-hint{font-size:12px;color:#999}
.help-fab{position:fixed;right:18px;bottom:18px;width:34px;height:34px;border-radius:50%;background:#fff;color:#888;font-size:14px;border:1px solid #d0cdc6;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.1);z-index:200;display:flex;align-items:center;justify-content:center;opacity:.75;transition:opacity .15s,transform .15s}
.help-fab:hover{opacity:1;color:#1a1a18;transform:scale(1.08)}
.help-overlay{position:fixed;inset:0;background:rgba(20,18,15,.55);display:none;align-items:center;justify-content:center;z-index:300;padding:1rem}
.help-overlay.open{display:flex}
.help-modal{background:#fff;border-radius:16px;max-width:540px;width:100%;max-height:88vh;overflow-y:auto;padding:1.75rem;position:relative}
.help-close{position:absolute;top:14px;right:14px;background:none;border:none;font-size:20px;cursor:pointer;color:#999;width:32px;height:32px;border-radius:50%}
.help-close:hover{background:#f0ede6;color:#1a1a18}
.help-eyebrow{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#2563eb;margin-bottom:4px}
.help-step-title{font-size:19px;font-weight:700;margin:0 0 14px}
.help-preview-wrap{background:#f4f2ed;border-radius:12px;padding:20px 14px;margin-bottom:16px;min-height:150px;display:flex;align-items:center;justify-content:center}
.help-step-text{font-size:14.5px;color:#444;margin-bottom:6px;line-height:1.65}
.help-nav{display:flex;justify-content:space-between;align-items:center;margin-top:18px}
.help-dots{display:flex;gap:6px}
.help-dot{width:7px;height:7px;border-radius:50%;background:#e0ddd6;cursor:pointer}
.help-dot.active{background:#2563eb;width:18px;border-radius:4px}
.help-fade{animation:helpFadeIn .18s ease}
@keyframes helpFadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.help-preview{pointer-events:none}
.help-preview .schedule-grid{margin:0 auto}
.help-preview .card{margin-bottom:0}
.settings-summary{list-style:none;cursor:pointer;user-select:none;justify-content:flex-start!important;gap:10px!important}
.settings-summary::-webkit-details-marker{display:none}
.settings-summary::before{content:'▸';color:#888;font-size:12px;transition:transform .15s}
.settings-details[open] .settings-summary::before{transform:rotate(90deg)}
.legal{max-width:720px;margin:0 auto;padding:2rem 1rem 4rem}
.legal h1{font-size:26px;margin-bottom:6px}
.legal .updated{font-size:13px;color:#999;margin-bottom:2rem}
.legal h2{font-size:17px;margin:2rem 0 8px}
.legal p{color:#444;font-size:14.5px;margin-bottom:10px}
.legal ul{margin:0 0 10px 1.2rem;color:#444;font-size:14.5px}
.legal li{margin-bottom:6px}
.legal .box{background:#fff;border:1px solid #e0ddd6;border-radius:10px;padding:16px 18px;margin:14px 0}
@media(max-width:640px){
  body{font-size:14px}
  .wrap{padding:1rem .75rem}
  .wrap-narrow{padding:1rem .75rem}
  h1{font-size:20px;line-height:1.2}
  h2{font-size:18px;line-height:1.25}
  p{font-size:14px}
  .topnav-inner{padding:12px .75rem;flex-direction:column;align-items:flex-start;gap:10px}
  .brand{font-size:16px}
  .nav-links{width:100%;gap:8px;flex-wrap:wrap}
  .nav-links a{font-size:13px}
  .nav-links .btn,.nav-links a.btn{flex:1;justify-content:center;min-width:120px}
  .tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin-bottom:1rem}
  .tab{padding:10px 6px;font-size:12.5px;text-align:center;white-space:normal}
  .card{padding:1rem;border-radius:10px;margin-bottom:.85rem}
  .card-title{font-size:14px;gap:6px}
  .grid-wrap{margin:0 -.35rem;padding:0 .35rem .35rem}
  .schedule-grid{min-width:430px;font-size:12px}
  .schedule-grid th{padding:6px 7px}
  .schedule-grid td{padding:3px}
  .slot{height:34px;min-width:34px;border-radius:6px;font-size:12px}
  .time-label{padding:6px 7px;font-size:12px}
  .btn{width:100%;justify-content:center;padding:10px 14px}
  .btn-sm{width:auto;padding:7px 10px}
  .step-nav,.input-row{display:grid;grid-template-columns:1fr;gap:8px;align-items:stretch}
  .input-row input,.input-row button{width:100%;min-width:0!important}
  input[type=text],input[type=email],input[type=password],select,textarea{font-size:16px;padding:11px 12px}
  .settings-row{display:grid;grid-template-columns:1fr;gap:14px}
  .settings-col{min-width:0;width:100%}
  .radio-group{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
  .radio-opt{justify-content:center;padding:10px 8px;font-size:13px}
  .checkbox-row{align-items:flex-start;line-height:1.35}
  .lesson-count-row{display:grid;grid-template-columns:1fr;gap:8px;align-items:stretch}
  .lesson-count-select{width:100%;min-width:0}
  .link-box{display:grid;grid-template-columns:1fr;gap:8px;font-size:12px}
  .link-box .btn{width:100%}
  .result-grid{min-width:520px;font-size:12px}
  .result-grid th,.result-grid td{padding:6px 7px}
  .assigned,.free-slot,.unassigned{padding:4px 6px;font-size:11px;white-space:normal;line-height:1.25}
  .legend{gap:10px;font-size:12px}
  .alert{padding:10px 12px;font-size:13px}
  .badge{margin-top:4px;white-space:normal;line-height:1.35}
  .hero{padding:2.5rem .75rem 2rem}
  .hero h1{font-size:26px}
  .hero p{font-size:15px}
  .hero-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .hero-points{justify-content:flex-start}
  .hero-points span{font-size:11.5px}
  .section{padding:2rem 0}
  .section h2{font-size:22px}
  .feature-grid,.value-grid{grid-template-columns:1fr}
  .feature,.value-item{padding:16px;border-radius:10px}
  .price-card{padding:1.5rem 1rem;border-radius:14px;width:100%}
  .price-amount{font-size:34px}
  .auth-card{padding:1.25rem;border-radius:12px}
  .admin-table{min-width:680px}
  .help-modal{padding:1.25rem;max-height:92vh}
  .help-preview-wrap{padding:12px 8px;overflow-x:auto;justify-content:flex-start}
}

@media(max-width:420px){
  .wrap{padding:.85rem .55rem}
  .topnav-inner{padding:10px .55rem}
  .card{padding:.85rem}
  .tabs{grid-template-columns:1fr}
  .tab{border:1px solid #e0ddd6;margin-bottom:0;background:#fff}
  .tab.active{background:#f4f2ed;border-color:#1a1a18}
  .schedule-grid{min-width:390px}
  .slot{height:32px;min-width:32px}
  .radio-group{grid-template-columns:1fr}
  .hero h1{font-size:24px}
  .hero-badge{white-space:normal;line-height:1.35}
  .footer-links{display:grid;grid-template-columns:1fr;gap:8px}
}
