/* Memowna v30 optimized stylesheet
   Consolidated from v29 while preserving cascade order and visual behavior. */
:root{
  --bg:#f7faf9; --card:#fff; --line:#e5ece9; --text:#1f2937; --muted:#6b7280;
  --primary:#18a7a0; --primary-soft:#e9f8f6; --accent:#f4a62a; --danger:#ef4444;
  --shadow:0 10px 30px rgba(31,41,55,.08); --radius:18px;
  --table-row-height:42px; --table-input-row-height:44px; --table-header-height:36px; --small-action-height:30px; --control-height:38px;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,"Noto Sans KR",sans-serif;background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.app{min-height:100vh}
.header{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.header-inner{max-width:1280px;margin:auto;display:flex;align-items:center;gap:26px;padding:14px 22px}
.brand{display:flex;align-items:center;gap:10px;font-size:25px;font-weight:800;letter-spacing:-1px;white-space:nowrap}
.logo-mark{width:40px;height:34px;display:block}
.logo-word{font-weight:800;color:#263642}
.logo-word .a{color:#f4a62a}
.balance{display:inline-flex;align-items:center;gap:7px;background:#fff7e8;border:1px solid #f5d59b;border-radius:999px;padding:8px 12px;font-size:13px;font-weight:800;color:#8b5a00}
.price-box{background:#f8fffd;border:1px solid #bde9e5;border-radius:14px;padding:16px}
.money{font-size:28px;font-weight:800;color:#0f766e}
.status-ok{color:#047857;font-weight:700}
.status-wait{color:#b45309;font-weight:700}
.status-bad{color:#b91c1c;font-weight:700}
.risk-high{display:inline-block;padding:4px 8px;border-radius:999px;background:#fee2e2;color:#b91c1c;font-size:12px;font-weight:800}.risk-mid{display:inline-block;padding:4px 8px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:12px;font-weight:800}.risk-low{display:inline-block;padding:4px 8px;border-radius:999px;background:#dcfce7;color:#166534;font-size:12px;font-weight:800}.policy-box{background:#fffdf7;border:1px solid #f3dfad;border-radius:14px;padding:16px}.report-box{background:#fff;border:1px solid #f2c3c3;border-left:5px solid #ef4444;border-radius:14px;padding:16px}.timeline{display:grid;gap:10px}.timeline .item{display:flex;gap:12px;align-items:flex-start}.timeline .dot{width:12px;height:12px;border-radius:50%;background:var(--primary);margin-top:5px;flex:0 0 auto}
.modal-demo{border:2px dashed #bde9e5;background:#fbfffe;border-radius:16px;padding:18px}
.nav{display:flex;gap:6px;flex:1;flex-wrap:nowrap;min-width:0}
.nav button{border:0;background:transparent;padding:10px 12px;border-radius:10px;color:#4b5563;white-space:nowrap;flex:0 0 auto}
.nav button.active,.nav button:hover{background:var(--primary-soft);color:var(--primary);font-weight:700}
.header-actions{display:flex;gap:8px}

/* UI v1.0.51 — keep the desktop header on one row without changing its structure. */
@media(min-width:1201px) and (max-width:1400px){
  .header-inner{gap:16px;padding-left:16px;padding-right:16px}
  .nav{gap:2px}
  .nav button{padding-left:8px;padding-right:8px;font-size:15px}
  .brand,.header-actions{flex:0 0 auto}
}
.btn{border:0;border-radius:10px;padding:10px 15px;font-weight:700}
.btn.primary{background:var(--primary);color:#fff}
.btn.secondary{background:#fff;border:1px solid var(--line)}
.btn.success{background:var(--accent);color:#fff}
.btn.ghost{background:#f3f4f6}
.btn.danger{background:#fee2e2;color:#b91c1c}
main{max-width:1280px;margin:auto;padding:28px 22px 70px}
.page{display:none}.page.active{display:block}
.hero{display:grid;grid-template-columns:1.15fr .85fr;gap:34px;align-items:center;padding:46px 0}
.hero h1{font-size:52px;line-height:1.12;margin:0 0 18px;letter-spacing:-2px}
.hero-own{color:var(--primary);font-weight:850}.hero-particle{color:var(--text);font-weight:850}
.hero p{font-size:19px;line-height:1.7;color:var(--muted)}
.hero-card{background:linear-gradient(145deg,rgba(20,184,166,.13),rgba(249,158,11,.16));border:1px solid rgba(20,184,166,.24);border-radius:26px;padding:28px;color:var(--text);box-shadow:var(--shadow)}
.hero-card .mock{background:#fff;color:var(--text);border-radius:18px;padding:20px;margin-top:18px;border:1px solid var(--line)}
.output-showcase-title{font-size:24px;margin:0 0 8px;letter-spacing:-.5px}
.output-showcase-sub{margin:0;color:var(--muted);font-size:15px;line-height:1.55}
.output-format-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}
.output-format{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;align-items:center;gap:13px;min-height:86px}
.output-format .format-icon{font-size:30px;line-height:1}
.output-format b{display:block;font-size:18px;margin-bottom:3px}
.output-format small{color:var(--muted);line-height:1.35}
.output-format.mp3,.output-format.pdf{border-top:4px solid var(--green)}
.output-format.mp4,.output-format.anki{border-top:4px solid var(--orange)}
.hero-output-note{margin-top:16px;padding:12px 14px;border-radius:12px;background:rgba(255,255,255,.72);font-weight:700;text-align:center}
@media(max-width:560px){.output-format-grid{grid-template-columns:1fr}}
.grid{display:grid;gap:18px}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
.grid.cols-2{grid-template-columns:repeat(2,1fr)}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow)}
.card h3{margin:0 0 12px}
.muted{color:var(--muted)}
.section-title{display:flex;justify-content:space-between;align-items:center;margin:8px 0 18px}
.section-title h2{margin:0;font-size:30px}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:22px 0}
.step{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}
.step span{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--primary);color:#fff;font-weight:800;margin-bottom:10px}
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.field label{display:block;font-size:14px;font-weight:700;margin-bottom:7px}
.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:12px;background:#fff}
.field textarea{min-height:110px;resize:vertical}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}
table{width:100%;border-collapse:collapse;background:#fff;min-width:780px}
th,td{padding:13px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
th{background:#f8fafc;font-size:14px}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.toolbar input,.toolbar select{border:1px solid var(--line);border-radius:10px;padding:11px;background:#fff}
.split{display:grid;grid-template-columns:270px 1fr;gap:20px}
.side{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;height:max-content}
.side button{width:100%;text-align:left;border:0;background:transparent;padding:12px;border-radius:10px}
.side button:hover,.side button.active{background:var(--primary-soft);color:var(--primary);font-weight:700}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:12px;font-weight:700}
.kpi{font-size:30px;font-weight:800;margin-top:8px}
.notice{background:#fffbeb;border:1px solid #fde68a;padding:14px;border-radius:12px;color:#92400e}
.auth{max-width:460px;margin:50px auto}
.auth .card{padding:30px}
.tabs{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap}
.tabs button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px 14px}
.tabs button.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.footer{border-top:1px solid var(--line);background:#fff;padding:26px;color:var(--muted);text-align:center}
.mobile-menu{display:none}
.icon{font-size:22px;line-height:1;display:inline-block;margin-right:7px}
.flow{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:26px 0}
.flow-card{position:relative;background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px;text-align:center;box-shadow:var(--shadow)}
.flow-card:not(:last-child)::after{content:"→";position:absolute;right:-23px;top:44%;font-size:28px;color:var(--primary);font-weight:800;z-index:2}
.flow-card .big-icon{font-size:42px;display:block;margin-bottom:10px}
.quick-card{background:linear-gradient(135deg,#e9f8f6,#fff8e8);border:1px solid #bde9e5}
.feature-link{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff}
.feature-link b{display:block;margin-bottom:4px}
.review-action-wrap{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.help-tip{position:relative;display:inline-grid;place-items:center;width:24px;height:24px;border:1px solid #bde9e5;border-radius:50%;background:#fff;color:var(--primary);font-size:13px;font-weight:800;cursor:help;outline:none}
.help-tip::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%);width:280px;padding:10px 12px;border-radius:10px;background:#1f2937;color:#fff;font-size:13px;font-weight:500;line-height:1.5;box-shadow:0 10px 25px rgba(15,23,42,.2);opacity:0;visibility:hidden;pointer-events:none;transition:.15s;z-index:30}
.help-tip::before{content:"";position:absolute;left:50%;bottom:calc(100% + 4px);transform:translateX(-50%);border:6px solid transparent;border-top-color:#1f2937;opacity:0;visibility:hidden;transition:.15s;z-index:31}
.help-tip:hover::after,.help-tip:hover::before,.help-tip:focus::after,.help-tip:focus::before{opacity:1;visibility:visible}
@media(max-width:560px){.help-tip::after{left:auto;right:0;transform:none;width:min(280px,82vw)}}
.mini-kpi{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px}
.mini-kpi strong{display:block;font-size:26px;margin-top:8px}
.output-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px}
.output-card{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fff;text-align:center}
.output-card .big-icon{font-size:32px}

.source-switch{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 16px}
.source-switch button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:11px 15px;font-weight:700}
.source-switch button.active{background:var(--primary);border-color:var(--primary);color:#fff}
.source-panel{display:none}.source-panel.active{display:block}
.upload-guide{background:#f8fffd;border:1px solid #bde9e5;border-radius:12px;padding:13px 14px;margin-bottom:14px;color:#38605d;font-size:14px;line-height:1.6}
.direct-entry-wrap{max-height:520px;overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff}
.direct-entry-table{min-width:720px}
.direct-entry-table th{position:sticky;top:0;z-index:2}
.direct-entry-table th:first-child,.direct-entry-table td:first-child{width:60px;text-align:center;color:var(--muted)}
.direct-entry-table input{width:100%;min-width:260px;border:1px solid transparent;border-radius:7px;padding:9px 10px;background:transparent}
.direct-entry-table input:focus{outline:none;border-color:var(--primary);background:#f8fffd;box-shadow:0 0 0 3px rgba(24,167,160,.10)}
.direct-entry-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}

.generator-stack{display:grid;gap:18px}
.generator-stack>.card{width:100%}
.generator-stack .direct-entry-table{min-width:980px;table-layout:fixed}
.generator-stack .direct-entry-table th:nth-child(2),.generator-stack .direct-entry-table th:nth-child(3){width:46%}
.generator-stack .direct-entry-table input{min-width:0}
.market-list-wrap{margin-top:18px;overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff}
.market-list{width:100%;min-width:1220px;border-collapse:collapse;table-layout:fixed;font-size:13.5px}
.market-list th{position:sticky;top:0;z-index:2;background:#f7f9fa;color:#374151;font-size:13px;white-space:nowrap;padding:12px 10px}
.market-list td{vertical-align:middle;white-space:nowrap;padding:12px 10px;height:62px;overflow:hidden;text-overflow:ellipsis}
.market-list tbody tr{cursor:pointer;transition:background .15s ease}
.market-list tbody tr:hover{background:#f3fffd}
.market-list th:nth-child(1){width:240px}.market-list th:nth-child(2){width:72px}.market-list th:nth-child(3){width:110px}.market-list th:nth-child(4){width:72px}.market-list th:nth-child(5){width:235px}.market-list th:nth-child(6){width:92px}.market-list th:nth-child(7){width:72px}.market-list th:nth-child(8){width:92px}.market-list th:nth-child(9){width:92px}.market-list th:nth-child(10){width:76px}
.market-list .set-title{font-weight:800;color:#10223b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.market-list .set-desc{max-width:235px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.market-list .set-price{font-weight:850;color:var(--primary);white-space:nowrap}
.market-list .seller,.market-list .rating,.market-list .market-category,.market-list .market-topic,.market-list .market-count,.market-list .market-unit-price,.market-list .market-view{white-space:nowrap}
.market-list .market-view{overflow:visible;text-align:center}
.market-list .market-view .btn{padding:8px 10px;white-space:nowrap;font-size:13px;min-width:58px}
.market-title-rule{margin:8px 0 0;color:var(--muted);font-size:13px}
.market-title-rule b{color:#374151}
.market-list-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}
.market-detail{display:none;margin-top:20px}.market-detail.active{display:block}
.market-detail-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap}
.locked-answer{color:#9ca3af;letter-spacing:.08em}.sample-answer{color:inherit}.purchase-summary{position:sticky;bottom:14px;z-index:4;background:#fffdf7;border:1px solid #f6d99b;border-radius:16px;padding:14px 16px;box-shadow:0 12px 30px rgba(17,24,39,.12);display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-top:14px}
@media(max-width:900px){.generator-stack .direct-entry-table{min-width:760px}}

@media(max-width:900px){
  .hero,.split,.grid.cols-3,.grid.cols-2,.form-grid,.steps,.flow,.output-grid{grid-template-columns:1fr}.flow-card:not(:last-child)::after{content:"↓";right:50%;top:auto;bottom:-28px}
  .hero h1{font-size:38px}
  .nav{display:none}
  .mobile-menu{display:block;margin-left:auto}
  .header-actions{display:none}
}

.editor-grid-wrap{max-height:590px;overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fff}
.editor-grid{min-width:1050px;table-layout:fixed}
.editor-grid th{position:sticky;top:0;z-index:2}
.editor-grid th:nth-child(1){width:54px}.editor-grid th:nth-child(2){width:70px}.editor-grid th:nth-child(3),.editor-grid th:nth-child(4){width:34%}.editor-grid th:nth-child(5){width:190px}.editor-grid th:nth-child(6){width:90px}
.editor-grid input{width:100%;border:1px solid transparent;border-radius:7px;padding:9px;background:transparent}
.editor-grid input:focus{outline:none;border-color:var(--primary);background:#f8fffd}
.drag-handle{cursor:grab;font-size:20px;color:#94a3b8;user-select:none}.dragging{opacity:.45;background:#ecfeff}.drop-target{outline:2px solid var(--primary);outline-offset:-2px}
.set-name-link{border:0;background:none;padding:0;color:var(--text);font-weight:800;text-decoration:underline;text-decoration-color:#bde9e5;text-underline-offset:4px}.set-name-link:hover{color:var(--primary)}
.library-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.bulk-card-modal{position:fixed;inset:0;background:rgba(15,23,42,.48);display:none;align-items:center;justify-content:center;padding:24px;z-index:1000}.bulk-card-modal.active{display:flex}.bulk-card-dialog{background:#fff;border-radius:20px;width:min(1120px,96vw);max-height:92vh;box-shadow:0 28px 80px rgba(15,23,42,.25);display:flex;flex-direction:column;overflow:hidden}.bulk-card-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:22px 24px;border-bottom:1px solid var(--line)}.bulk-card-head h3{margin:0 0 6px}.bulk-card-close{border:0;background:#f3f5f7;width:38px;height:38px;border-radius:10px;font-size:22px;cursor:pointer}.bulk-card-body{padding:18px 24px;overflow:auto}.bulk-card-guide{background:#f5fffd;border:1px solid #bde9e5;border-radius:12px;padding:12px 14px;margin-bottom:14px;line-height:1.65}.bulk-card-grid-wrap{border:1px solid var(--line);border-radius:14px;overflow:auto;max-height:55vh}.bulk-card-grid{width:100%;border-collapse:collapse;table-layout:fixed}.bulk-card-grid th,.bulk-card-grid td{border-bottom:1px solid var(--line);padding:0}.bulk-card-grid th{position:sticky;top:0;background:#f7f9fb;z-index:2;padding:12px;text-align:left}.bulk-card-grid th:first-child,.bulk-card-grid td:first-child{width:64px;text-align:center}.bulk-card-grid input{width:100%;border:0;padding:13px 14px;font:inherit;background:#fff;outline:none}.bulk-card-grid input:focus{background:#f7fffd;box-shadow:inset 0 0 0 2px var(--teal)}.bulk-card-foot{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:16px 24px;border-top:1px solid var(--line);background:#fbfcfd;flex-wrap:wrap}
@media(max-width:700px){.bulk-card-modal{padding:8px}.bulk-card-dialog{max-height:96vh;border-radius:14px}.bulk-card-head,.bulk-card-body,.bulk-card-foot{padding-left:14px;padding-right:14px}}

/* Why Memowna integrated page */
.why-page{margin:-28px -22px -70px;background:#fff;color:#172033;font-family:Inter,Pretendard,"Noto Sans KR","Apple SD Gothic Neo","Segoe UI",sans-serif;line-height:1.7;overflow:hidden}
.why-page .why-wrap{width:min(1160px,calc(100% - 40px));margin:0 auto}
.why-page .why-hero{padding:76px 0 62px;text-align:center;background:radial-gradient(circle at 18% 18%,rgba(24,167,160,.10),transparent 34%),radial-gradient(circle at 84% 72%,rgba(244,166,42,.12),transparent 35%)}
.why-page .why-eyebrow,.why-page .why-label{margin:0 0 14px;color:#5d6b7f;font-size:12px;font-weight:850;letter-spacing:.16em;text-transform:uppercase}
.why-page h1{margin:0;font-size:clamp(44px,6.5vw,76px);line-height:1.04;letter-spacing:-.06em}
.why-page .why-gradient{background:linear-gradient(90deg,var(--primary),var(--accent));-webkit-background-clip:text;background-clip:text;color:transparent}
.why-page .why-hero-kor{max-width:820px;margin:24px auto 0;color:#334155;font-size:clamp(19px,2.1vw,26px);font-weight:700;line-height:1.55;letter-spacing:-.035em}
.why-page .why-hero-sub{margin:14px auto 0;color:#6b7280;font-size:16px}
.why-page .why-section{padding:88px 0}.why-page .why-section+.why-section{border-top:1px solid #e7ecea}
.why-page .why-heading{text-align:center}.why-page h2{margin:0;font-size:clamp(34px,4.5vw,58px);line-height:1.1;letter-spacing:-.055em}
.why-page .why-lead{max-width:800px;margin:18px auto 0;color:#536174;font-size:17px;line-height:1.75;text-align:center}
.why-page .cycle-stage{background:#f8fbfa}
.why-page .cycle-stage .why-section{padding:38px 0 42px}
.why-page .cycle-stage h2{font-size:clamp(30px,3.6vw,48px)}
.why-page .cycle-stage .why-lead{margin-top:10px;font-size:15px}
.why-page .cycle-shell{position:relative;width:min(1020px,100%);margin:28px auto 0}
.why-page .cycle-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.why-page .cycle-center::before{content:"MEMOWNA LEARNING CYCLE";display:inline-flex;align-items:center;justify-content:center;margin:0 0 15px;border-radius:999px;font-weight:900;letter-spacing:.13em;white-space:nowrap}
.why-page .cycle-center strong{display:block;text-wrap:balance;word-break:keep-all}
.why-page .cycle-center strong em{font-style:normal;font-weight:900}
.why-page .cycle-center span{display:block;border-top:1px solid #dce9e6;font-weight:750;letter-spacing:.015em}
.why-page .cycle-arrows{position:absolute;inset:0;width:100%;height:100%;z-index:1;overflow:visible;filter:drop-shadow(0 7px 10px rgba(31,41,55,.08))}
.why-page .cycle-node{position:absolute;width:218px;height:146px;padding:15px 17px;background:rgba(255,255,255,.98);border:1px solid #dfe8e5;border-radius:20px;box-shadow:0 14px 34px rgba(31,41,55,.09);z-index:3;overflow:hidden}
.why-page .cycle-node::after{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:var(--primary)}.why-page .cycle-node.orange::after{background:var(--accent)}
.why-page .cycle-node.teal{border-color:#d4e9e6}.why-page .cycle-node.orange{border-color:#efe2ca}
.why-page .cycle-num{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;font-size:12px;font-weight:900;margin-bottom:5px;background:var(--primary-soft);color:#087f79}.why-page .orange .cycle-num{background:#fff5e5;color:#b96900}
.why-page .cycle-en{display:inline-block;margin-left:7px;color:#657184;font-size:10px;font-weight:900;letter-spacing:.15em;vertical-align:middle}.why-page .cycle-node h3{margin:3px 0 5px;font-size:15.5px;line-height:1.25;letter-spacing:-.045em}.why-page .cycle-node p{margin:0;color:#647083;font-size:12.2px;line-height:1.45}
.why-page .node-1{left:50%;transform:translateX(-50%)}.why-page .node-2{right:18px;top:82px}.why-page .node-3{right:18px;bottom:82px}.why-page .node-4{left:50%;transform:translateX(-50%)}.why-page .node-5{left:18px;bottom:82px}.why-page .node-6{left:18px;top:82px}
.why-page .cycle-note{max-width:860px;margin:22px auto 0;padding:15px 22px;border:1px solid #e5ece9;border-radius:16px;background:#fff;font-size:17px;font-weight:800;text-align:center;letter-spacing:-.025em;box-shadow:0 10px 26px rgba(31,41,55,.05)}
.why-page .efficiency{background:#fff}.why-page .eff-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:60px;align-items:center;margin-top:54px}
.why-page .eff-visual{padding:34px;border-radius:28px;background:linear-gradient(145deg,#edf9f7,#fff9ed);border:1px solid #d9e9e5}.why-page .eff-row{display:flex;align-items:center;gap:12px;padding:16px 18px;border-radius:14px;background:#fff;border:1px solid #e4ebe9;margin-top:12px}.why-page .eff-row:first-child{margin-top:0}.why-page .eff-check{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:var(--primary);color:#fff;font-weight:900}.why-page .eff-row.done{opacity:.5}.why-page .eff-row.focus{border-color:#f2bf67;box-shadow:0 8px 22px rgba(244,166,42,.12)}
.why-page .eff-copy h3{margin:0;font-size:clamp(32px,4vw,52px);line-height:1.18;letter-spacing:-.05em;word-break:keep-all;text-wrap:balance}.why-page .eff-copy p{max-width:680px;margin:24px 0 0;color:#566277;font-size:18px;line-height:1.9;word-break:keep-all;text-wrap:pretty}.why-page .eff-highlight{margin-top:28px;padding:22px 24px;border-left:5px solid var(--accent);border-radius:0 16px 16px 0;background:#fff7e8;font-size:22px;font-weight:850;line-height:1.55;word-break:keep-all}.why-page .eff-highlight small{display:block;margin-top:8px;color:#7a6241;font-size:14px;font-weight:700;line-height:1.55}
.why-page .benefit-stage{background:#f8faf9}.why-page .benefit-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-top:48px}.why-page .benefit{padding:26px 22px;background:#fff;border:1px solid #e2e9e7;border-radius:20px}.why-page .benefit b{display:block;font-size:18px;margin-bottom:9px}.why-page .benefit p{margin:0;color:#667386;font-size:15px;line-height:1.7}.why-page .benefit-icon{font-size:29px;display:block;margin-bottom:16px}
.why-page .why-cta{text-align:center;padding:96px 0 108px}.why-page .why-cta h2{margin-inline:auto}.why-page .why-cta p{margin:20px auto 30px;color:#647083;font-size:18px}.why-page .why-cta .btn{padding:15px 24px;font-size:17px}
@media(max-width:980px){.why-page .cycle-shell{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:30px}.why-page .cycle-center,.why-page .cycle-arrows{display:none}.why-page .cycle-node{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;width:100%;min-height:auto}.why-page .eff-grid{grid-template-columns:1fr;gap:34px}.why-page .benefit-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.why-page .why-wrap{width:min(100% - 28px,1160px)}.why-page .why-hero{padding:64px 0 54px}.why-page .why-section{padding:68px 0}.why-page .cycle-stage .why-section{padding:32px 0 36px}.why-page .cycle-shell{grid-template-columns:1fr}.why-page .benefit-grid{grid-template-columns:1fr}.why-page .eff-visual{padding:18px}.why-page .why-hero-sub{font-size:15px}}

.modal-backdrop{position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;padding:22px;background:rgba(15,23,42,.52);backdrop-filter:blur(3px)}
.modal-backdrop.active{display:flex}
.modal-card{width:min(1180px,100%);max-height:90vh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:0 24px 70px rgba(15,23,42,.24)}
.review-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:12px 0 16px}
.review-summary .mini-kpi{box-shadow:none}
.review-add-row{display:flex;gap:12px;align-items:end;justify-content:space-between;flex-wrap:wrap;margin-bottom:14px;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:#f7fbfb}
.review-add-copy strong{display:block;font-size:16px;color:var(--text)}
.review-add-copy p{margin:4px 0 0}
.review-filter-row{display:flex;gap:10px;align-items:end;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px}
.review-filter-row .field{flex:1;min-width:260px}
.review-selection-status{margin:-2px 0 12px;font-size:14px;color:var(--muted)}
.review-selection-status.over-limit{color:#d64545;font-weight:700}
#review-set-table tbody tr.review-hidden,#review-library-table tbody tr.review-library-hidden{display:none}
.review-helper-modal .modal-card{max-width:980px}
.review-library-search-row .upload-guide{min-width:210px;text-align:center}
.review-inline-empty{padding:24px 12px;text-align:center;color:var(--muted)}
.review-library-table-note{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}
.review-direct-input-note{margin:0 0 12px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#f7fbfb;color:var(--muted)}
#review-direct-input-table input{width:100%}
#review-direct-input-table td{vertical-align:top}
@media(max-width:720px){.modal-backdrop{padding:10px}.modal-card{padding:16px;max-height:94vh}.review-summary{grid-template-columns:1fr}.review-filter-row .field{min-width:100%}.review-add-row{padding:12px}.review-library-search-row .upload-guide{min-width:100%}}

@media(max-width:900px){
}
.payment-mode-pill{display:inline-flex;align-items:center;gap:6px;background:#f0fdfa;border:1px solid #99e2dc;border-radius:999px;padding:8px 12px;font-size:13px;font-weight:800;color:#0f766e;white-space:nowrap}
.plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}
.plan-option{position:relative;display:block;border:1px solid var(--line);border-radius:16px;background:#fff;padding:18px;cursor:pointer;transition:.18s ease;min-height:190px}
.plan-option:hover{border-color:#9adbd7;transform:translateY(-1px)}
.plan-option:has(input:checked){border:2px solid var(--primary);background:#f5fffd;box-shadow:0 10px 24px rgba(24,167,160,.10)}
.plan-option input{position:absolute;top:16px;right:16px;width:18px;height:18px;accent-color:var(--primary)}
.plan-name{display:flex;align-items:center;gap:8px;font-size:20px;font-weight:900;margin-bottom:8px}
.plan-price{font-size:28px;font-weight:900;color:#0f766e;margin:8px 0 12px}
.plan-option ul{margin:0;padding-left:20px;color:#4b5563;line-height:1.8}
.plan-option small{display:block;margin-top:10px;color:var(--muted);line-height:1.55}
.direct-payment-summary{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}
.payment-methods{display:grid;gap:10px;margin-top:14px}.payment-methods label{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:#fff}.payment-methods input{accent-color:var(--primary)}
.minimum-payment-note{font-size:13px;color:#92400e;margin-top:4px}
@media(max-width:800px){.plan-grid,.direct-payment-summary{grid-template-columns:1fr}.plan-option{min-height:auto}}
.output-choice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}
.output-choice{position:relative;display:flex;flex-direction:column;gap:8px;min-height:150px;padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff;cursor:pointer;transition:.18s ease}
.output-choice:hover{border-color:#9adbd7;transform:translateY(-1px)}
.output-choice:has(input:checked){border:2px solid var(--primary);background:#f5fffd;box-shadow:0 10px 24px rgba(24,167,160,.10)}
.output-choice input{position:absolute;top:16px;right:16px;width:18px;height:18px;accent-color:var(--primary)}
.output-choice-name{font-size:19px;font-weight:900;padding-right:28px}
.output-choice-price{font-size:24px;font-weight:900;color:#0f766e}
.output-choice small{margin-top:auto;color:var(--muted)}
.text-meter{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}
.text-meter-item{padding:14px 16px;border:1px solid #bde9e5;border-radius:14px;background:#f8fffd}
.text-meter-item b{display:block;margin-bottom:4px;color:#38605d}
.text-meter-item strong{font-size:22px;color:#0f766e}
.price-breakdown{display:grid;gap:7px;margin-top:10px;padding-top:10px;border-top:1px solid #dbe8e5;color:#4b5563}
.price-breakdown-row{display:flex;justify-content:space-between;gap:16px}
.pricing-rule-table{min-width:680px}
@media(max-width:800px){.output-choice-grid,.text-meter{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.output-choice-grid,.text-meter{grid-template-columns:1fr}}
.pricing-overview .money,
.output-option-card .money,
#estimated-payment,
#selected-price,
#pricing-total,
.price-box .money{font-size:24px !important;line-height:1.2 !important;}
.pricing-overview strong,
.output-option-card h3,
.output-option-card b{font-size:18px !important;}
.pricing-overview,
.output-option-card,
.pricing-summary,
.pricing-note{box-shadow:none !important;}
.output-option-card{padding:18px !important;}
.output-option-card .muted,
.pricing-overview .muted,
.pricing-summary .muted{font-size:14px !important;line-height:1.55 !important;}
.pricing-summary{align-items:start;}
.pricing-summary h3{font-size:20px !important;margin-bottom:8px;}
#pricing-section .money{font-size:26px !important;}
.preview-free-badge{font-size:13px !important;padding:7px 11px !important;}
#generator .text-meter-item{
  background:#fbfdfd;
  border-color:var(--line);
  padding:12px 14px;
}
#generator .text-meter-item b{
  color:#4b5563;
  font-size:13px;
  font-weight:700;
}
#generator .text-meter-item strong{
  color:#263642;
  font-size:18px;
  font-weight:800;
}
#generator .output-choice{
  min-height:138px;
  padding:16px;
  gap:6px;
}
#generator .output-choice:has(input:checked){
  border-width:1.5px;
  box-shadow:none;
}
#generator .output-choice-name{
  font-size:17px;
  font-weight:800;
}
#generator .output-choice-price{
  font-size:18px;
  font-weight:800;
  color:#374151;
}
#generator .output-choice small{
  font-size:13px;
  line-height:1.5;
}
#generator .direct-payment-summary .price-box{
  background:#fff;
  border-color:var(--line);
  padding:16px;
}
#generator .direct-payment-summary .price-box>b{
  font-size:13px;
  color:#4b5563;
}
#generator #generator-plan-name{
  font-size:20px !important;
  color:#263642;
}
#generator #generator-payment-amount{
  font-size:22px !important;
  color:#0f766e;
}
#generator .price-breakdown{
  font-size:13px;
}
#generator .generator-note{
  font-size:13px;
  line-height:1.65;
}
.mypage-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 18px}
.mypage-tabs button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:10px 14px;font-weight:800;color:var(--muted);cursor:pointer}
.download-policy-banner{margin:0 0 14px;padding:12px 14px;border:1px solid #b7e7e3;border-radius:12px;background:#f3fbfa;color:#245b58;font-size:14px}
@media(max-width:1100px){.nav button{padding-left:8px;padding-right:8px;font-size:14px}}
.why-page .cycle-shell{height:560px;margin-top:34px}
.why-page .cycle-center{
  border:2px solid #cfe9e5;
  z-index:5;
}
.why-page .node-1{top:0}
.why-page .node-4{bottom:0}
.why-page .node-2,.why-page .node-6{top:95px}
.why-page .node-3,.why-page .node-5{bottom:95px}
.why-page .cycle-note{line-height:1.55}
.why-page .why-hero-sub{max-width:1040px;word-break:keep-all;text-wrap:balance;line-height:1.75}
@media(max-width:980px){
  .why-page .cycle-shell{height:auto}
}
@media(max-width:900px){
}
.why-page .output-feature-stage{background:#fff}
.why-page .output-feature-grid{display:grid;grid-template-columns:.92fr 1.08fr;gap:58px;align-items:center;margin-top:48px}
.why-page .output-format-list{padding:28px;border-radius:28px;background:linear-gradient(145deg,#edf9f7,#fff9ed);border:1px solid #d9e9e5}
.why-page .output-format-row{display:flex;align-items:center;gap:16px;min-height:88px;padding:16px 18px;margin-top:12px;border:1px solid #e2e9e7;border-radius:16px;background:#fff;box-shadow:0 8px 22px rgba(31,41,55,.045)}
.why-page .output-format-row:first-child{margin-top:0}
.why-page .output-format-row.mp3,.why-page .output-format-row.pdf{border-left:5px solid var(--primary)}
.why-page .output-format-row.mp4,.why-page .output-format-row.anki{border-left:5px solid var(--accent)}
.why-page .output-format-icon{display:grid;place-items:center;width:46px;height:46px;flex:0 0 46px;border-radius:14px;background:#f7faf9;font-size:25px}
.why-page .output-format-row b{display:block;margin:0 0 3px;font-size:18px;line-height:1.25;white-space:nowrap}
.why-page .output-format-row p{margin:0;color:#617083;font-size:14.5px;line-height:1.55;word-break:keep-all}
.why-page .output-feature-badge{display:inline-flex;padding:7px 11px;border-radius:999px;background:#e8f8f6;color:#087f79;font-size:11px;font-weight:900;letter-spacing:.1em}
.why-page .output-feature-copy h3{margin:18px 0 0;font-size:clamp(31px,3.8vw,49px);line-height:1.2;letter-spacing:-.052em;word-break:keep-all}
.why-page .output-feature-copy>p{margin:24px 0 0;color:#566277;font-size:17.5px;line-height:1.9;word-break:keep-all}
.why-page .output-feature-highlight{margin-top:28px;padding:22px 24px;border-left:5px solid var(--accent);border-radius:0 16px 16px 0;background:#fff7e8;word-break:keep-all}
.why-page .output-feature-highlight strong{display:block;font-size:22px;line-height:1.5}
.why-page .output-feature-highlight small{display:block;margin-top:8px;color:#7a6241;font-size:14px;font-weight:700;line-height:1.55}
@media(max-width:980px){.why-page .output-feature-grid{grid-template-columns:1fr;gap:34px}}
@media(max-width:560px){.why-page .output-format-list{padding:16px}.why-page .output-format-row{align-items:flex-start}.why-page .output-format-row p{font-size:14px}}
@media(max-width:900px){
}
.why-page .cycle-center{
  background:linear-gradient(145deg,#ffffff 0%,#f5f7fc 100%);
  border-color:#d5dceb;
  box-shadow:0 22px 50px rgba(48,58,92,.14),0 0 0 10px rgba(79,95,159,.045);
}
.why-page .cycle-center::before{
  background:#edf0f8;
  color:#4f5f9f;
}
.why-page .cycle-center strong{color:#172036}
.why-page .cycle-center strong em{color:#4f5f9f}
.why-page .cycle-center span{
  width:100%;
  border-top-color:#dce1ee;
  color:#5d6780;
  white-space:normal;
}
.why-page .node-6 h3{font-size:14.8px;letter-spacing:-.055em}
.why-page .cycle-stage .why-lead{max-width:860px;word-break:keep-all;text-wrap:balance}
.why-page .why-cta p{max-width:760px;line-height:1.75;word-break:keep-all}
@media(max-width:900px){
}
.why-page .cycle-center{
  width:370px;
  height:204px;
  padding:17px 28px;
  border-radius:30px;
  overflow:hidden;
}
.why-page .cycle-center::before{
  margin-bottom:9px;
  padding:5px 12px;
  font-size:9.5px;
}
.why-page .cycle-center strong{
  font-size:21.5px;
  line-height:1.26;
  letter-spacing:-.04em;
}
.why-page .cycle-center strong em{
  display:inline;
  margin-top:0;
}
.why-page .cycle-center span{
  margin-top:9px;
  padding-top:8px;
  font-size:10.5px;
  line-height:1.3;
}
.why-page .cycle-node h3{
  white-space:normal;
  word-break:keep-all;
}
.why-page .cycle-node p{
  word-break:keep-all;
}
#generator .step > span{
  margin-right:10px;
  margin-bottom:12px;
  vertical-align:middle;
}
#generator .step > b{
  display:inline-block;
  margin-bottom:12px;
  vertical-align:middle;
  line-height:1.35;
}
#generator .step > p{
  margin:0;
  line-height:1.55;
}
@media(max-width:980px){
  .why-page .cycle-center{display:none}
}
#generator .steps .step{
  display:grid;
  align-content:start;
}
#generator .steps .step>span{
  grid-column:1;
  grid-row:1;
  margin:0;
}
#generator .steps .step>b{
  grid-column:2;
  grid-row:1;
  display:block;
  align-self:center;
  margin:0;
}
#generator .steps .step>p{
  grid-column:1 / -1;
  grid-row:2;
}
@media(max-width:900px){
  #generator .steps .step{min-height:auto;}
}
#home .hero p,#home .flow-card p{word-break:keep-all;text-wrap:balance;}
#home .flow-card h3{white-space:nowrap;font-size:18px;}
#home .flow-card p{line-height:1.65;min-height:54px;}
#generator .steps .step>b{white-space:nowrap;font-size:15px;line-height:1.35;}
#generator .steps .step>b.step-title-long{font-size:14px;letter-spacing:-.035em;}

#qna .editor-grid th,#qna .editor-grid td{padding:8px 10px;vertical-align:middle;}
#qna .editor-grid input{padding:7px 8px;line-height:1.3;}
#qna .editor-grid tbody tr{height:50px;}
#qna .editor-grid .origin-cell{white-space:nowrap;font-size:14px;color:#374151;}
#qna .editor-grid .btn.danger{padding:8px 12px;}
#qna .editor-grid th:nth-child(5){width:150px;}

#qna #card-library-table th,#qna #card-library-table td{padding:9px 12px;vertical-align:middle;white-space:nowrap;}
#qna #card-library-table tbody tr{height:54px;}
#qna #card-library-table .btn.danger{padding:8px 12px;}

@media(max-width:1100px){
  #generator .steps .step>b{white-space:normal;}
  #home .flow-card h3{white-space:normal;}
}
#generator .steps .step{
  grid-template-columns:34px minmax(0,1fr);
  grid-template-rows:48px auto;
  column-gap:13px;
  row-gap:12px;
  padding:16px 15px;
  min-height:146px;
}
#generator .steps .step>span{
  align-self:start;
}
#generator .steps .step>b,
#generator .steps .step>b.step-title-long{
  display:block;
  align-self:start;
  margin:1px 0 0;
  min-height:48px;
  font-size:16px;
  line-height:1.42;
  letter-spacing:-.025em;
  white-space:normal;
  word-break:keep-all;
}
#generator .steps .step>p{
  align-self:start;
  margin:0;
  font-size:14px;
  line-height:1.5;
  word-break:keep-all;
}
@media(max-width:1100px){
  #generator .steps .step{grid-template-rows:auto auto;min-height:auto;}
  #generator .steps .step>b,
  #generator .steps .step>b.step-title-long{min-height:0;}
}
.header-inner{position:relative}
.profile-wrap{position:relative}
.profile-button{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 13px;font-weight:800;color:var(--text)}
.profile-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:80;display:none;width:210px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 50px rgba(15,23,42,.16)}
.profile-menu.active{display:block}
.profile-menu button{display:block;width:100%;border:0;background:transparent;text-align:left;padding:11px 12px;border-radius:9px;color:var(--text)}
.profile-menu button:hover{background:var(--primary-soft);color:var(--primary)}
.profile-menu [hidden],.mobile-user-card [hidden]{display:none!important}
.logged-out-actions{display:none;gap:8px}

.mobile-drawer-backdrop{position:fixed;inset:0;z-index:70;display:none;background:rgba(15,23,42,.46)}
.mobile-drawer-backdrop.active{display:block}
.mobile-drawer{position:absolute;right:0;top:0;width:min(360px,88vw);height:100%;padding:22px;background:#fff;box-shadow:-18px 0 50px rgba(15,23,42,.2);overflow:auto}
.mobile-drawer-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:16px;border-bottom:1px solid var(--line)}
.mobile-drawer-nav{display:grid;gap:6px;margin-top:15px}
.mobile-drawer-nav button{border:0;background:transparent;text-align:left;padding:13px 12px;border-radius:10px;font-weight:700;color:#374151}
.mobile-drawer-nav button:hover{background:var(--primary-soft);color:var(--primary)}
.mobile-user-card{margin-top:18px;padding:14px;border-radius:14px;background:#f8fffd;border:1px solid #bde9e5}
.mobile-user-actions{display:flex;gap:8px;flex-wrap:wrap}
.mobile-menu{font-size:20px;min-width:44px}

.home-demo{display:grid;grid-template-columns:.95fr 1.05fr;gap:18px;margin:4px 0 22px;padding:22px;border:1px solid #cbe9e5;border-radius:20px;background:linear-gradient(135deg,#f6fffd,#fffaf0);box-shadow:var(--shadow)}
.home-demo-copy h3{margin:0 0 8px;font-size:23px}.home-demo-copy p{margin:0;color:var(--muted);line-height:1.7}
.demo-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.demo-side{padding:15px;border:1px solid var(--line);border-radius:14px;background:#fff}.demo-side b{display:block;margin-bottom:7px;color:var(--primary)}
.demo-output-line{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.demo-output-line span{padding:6px 9px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:13px;font-weight:800}
.trust-strip{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.trust-item{padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fff}.trust-item b{display:block;margin-bottom:4px}.trust-item small{color:var(--muted);line-height:1.55}
.text-link-row{display:flex;gap:16px;flex-wrap:wrap;margin-top:14px}.text-link-row button{border:0;background:transparent;padding:0;color:#4b5563;text-decoration:underline;text-underline-offset:4px}

.generator-note{margin-top:14px;padding:14px 16px;border:1px solid #bde9e5;border-radius:14px;background:#f6fffd;line-height:1.65;color:#365c59}
.preview-free{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:#ecfdf5;color:#047857;font-weight:800;font-size:13px}
.autosave-status{display:inline-flex;align-items:center;gap:6px;margin-left:8px;color:#047857;font-size:13px;font-weight:700}
.autosave-status.saving{color:#b45309}
tr.incomplete-row{background:#fff7ed!important}tr.incomplete-row input{border-color:#fb923c!important;background:#fffaf5!important}
.btn:disabled{cursor:not-allowed;opacity:.45;filter:grayscale(.15)}
.selection-count{display:inline-block;margin-left:5px;min-width:20px;text-align:center}

.market-mobile-list{display:none}.market-mobile-card{padding:16px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.045)}
.market-mobile-card+.market-mobile-card{margin-top:10px}.market-mobile-card h3{margin:0 0 8px;font-size:17px}.market-mobile-meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:13px}.market-mobile-price{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px}.market-mobile-price b{color:var(--primary)}
.market-detail-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.market-detail-meta span{padding:6px 9px;border-radius:999px;background:#f3f4f6;color:#4b5563;font-size:13px;font-weight:700}

.download-table .status-chip{display:inline-block;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:800}.status-chip.done{background:#dcfce7;color:#166534}.status-chip.processing{background:#fef3c7;color:#92400e}.status-chip.expired{background:#f3f4f6;color:#6b7280}
.mypage-notice{margin-top:16px;padding:14px 16px;border-radius:14px;border:1px solid #f4d7a0;background:#fffaf0;line-height:1.65}

.site-footer{border-top:1px solid var(--line);background:#fff;padding:34px 22px;color:#4b5563}.site-footer-inner{max-width:1280px;margin:auto;display:grid;grid-template-columns:1fr auto;gap:24px;align-items:start}.footer-brand{font-size:20px;font-weight:900;color:var(--text)}.footer-links{display:flex;gap:14px;flex-wrap:wrap}.footer-links button{border:0;background:transparent;padding:0;color:#4b5563}.footer-links button:hover{text-decoration:underline}.footer-note{grid-column:1/-1;padding-top:16px;border-top:1px solid var(--line);font-size:13px;color:var(--muted);line-height:1.7}
.policy-page{max-width:900px;margin:0 auto}.policy-page .card{line-height:1.8}.policy-page h3{margin-top:24px}

@media(max-width:900px){
 .home-demo{grid-template-columns:1fr}.trust-strip{grid-template-columns:1fr}
 .site-footer-inner{grid-template-columns:1fr}.footer-links{gap:10px 16px}
}
@media(max-width:760px){
 .market-list-wrap{display:none}.market-mobile-list{display:block;margin-top:14px}
 .market-list-footer{margin-top:16px}.market-title-rule{display:none}
 .demo-pair{grid-template-columns:1fr}
}
.generator-preview-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px;min-height:46px}
.generator-preview-row .preview-description{display:flex;align-items:center;min-height:40px;font-size:13px;line-height:1.55;color:var(--muted)}
.output-choice small{line-height:1.55}
@media(max-width:700px){.generator-preview-row{align-items:flex-start}.generator-preview-row .preview-description{width:100%;min-height:auto}}
.mypage-tabs button.active{background:var(--primary);border-color:var(--primary);color:#fff}
.checkout-page{max-width:700px;margin:44px auto}
.checkout-page .card{padding:30px}
.checkout-page table{min-width:0;table-layout:fixed}
.checkout-page th:nth-child(1),.checkout-page td:nth-child(1){width:24%}
.checkout-page th:nth-child(2),.checkout-page td:nth-child(2){width:54%;word-break:keep-all}
.checkout-page th:nth-child(3),.checkout-page td:nth-child(3){width:22%;text-align:center;white-space:nowrap}
.mobile-download-list{display:none}
.mobile-download-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 8px 22px rgba(31,41,55,.06)}
.mobile-download-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.mobile-download-head b{display:block;font-size:16px;margin-bottom:5px}
.mobile-download-head span:not(.status-chip){display:block;color:var(--muted);font-size:13px}
.mobile-download-card p{color:var(--muted);font-size:13px;line-height:1.55;margin:12px 0}
.mobile-download-actions{display:flex;gap:8px;flex-wrap:wrap}
.mobile-download-actions .btn{font-size:13px;padding:9px 11px}
@media(max-width:1200px){
  .nav{display:none!important}
  .mobile-menu{display:block!important;margin-left:auto}
  .header-actions{display:none!important}
  .hero{grid-template-columns:1fr;gap:24px}
  .hero h1{font-size:clamp(40px,6vw,52px);max-width:860px}
  .hero p{max-width:850px}
}
@media(max-width:700px){
  .checkout-page{max-width:none;margin:20px 0}
  .checkout-page .card{padding:18px}
  .checkout-page .table-wrap{overflow:visible}
  .checkout-page table{font-size:13px}
  .checkout-page th,.checkout-page td{padding:10px 8px}
  #mypage .download-table{display:none}
  #mypage .table-wrap:has(.download-table){display:none}
  .mobile-download-list{display:grid;gap:12px}
  .mypage-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .mypage-tabs button{width:100%;padding:10px 8px;font-size:13px}
}

/* =========================================================
   Memowna v31 UI polish
   1) 최근 생성 학습자료 표: 글자 크기와 수직 정렬 통일
   2) 학습자료 마켓: '자세히 보기' 버튼 잘림 방지
   ========================================================= */

/* 최근 생성한 학습자료 표 */
#mypage .download-table th,
#mypage .download-table td {
  vertical-align: middle;
  line-height: 1.45;
}

#mypage .download-table th {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

#mypage .download-table td {
  font-size: 15px;
}

#mypage .download-table tbody tr {
  min-height: 64px;
}

#mypage .download-table td:first-child {
  font-weight: 700;
}

#mypage .download-table td:last-child {
  white-space: nowrap;
}

#mypage .download-table .status-chip,
#mypage .download-table .btn {
  vertical-align: middle;
}

/* 작업 버튼을 한 줄에서 안정적으로 정렬 */
#mypage .download-table td:last-child {
  display: table-cell;
}

#mypage .download-table td:last-child .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  line-height: 1.2;
}

/* 학습자료 마켓의 보기 열과 버튼 */
.market-list th.market-view,
.market-list td.market-view {
  width: 112px;
  min-width: 112px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.market-list .market-view .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 92px;
  max-width: none;
  padding: 8px 12px;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  line-height: 1.25;
}

/* 화면 전체 여백은 기기 크기에 맞춰 유동적으로 유지 */
main {
  padding-left: clamp(16px, 2.2vw, 28px);
  padding-right: clamp(16px, 2.2vw, 28px);
}

@media (max-width: 900px) {
  .market-list th.market-view,
  .market-list td.market-view {
    width: 96px;
    min-width: 96px;
  }

  .market-list .market-view .btn {
    min-width: 76px;
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* 작은 화면에서는 표를 억지로 압축하지 않고 가로 스크롤로 보존 */
  .market-list {
    min-width: 1120px;
  }
}



/* =========================================================
   Memowna v32
   1) 내 카드 세트 표 정렬 완성
   2) 마켓 표의 상세 버튼 열 제거 및 화면 폭 맞춤
   ========================================================= */

/* 내 카드 세트: 모든 셀의 기준선과 높이를 통일 */
#qna #set-list-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

#qna #set-list-table th,
#qna #set-list-table td {
  box-sizing: border-box;
  height: 66px;
  padding: 12px 14px;
  vertical-align: middle;
  line-height: 1.35;
}

#qna #set-list-table th {
  height: 46px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

#qna #set-list-table td {
  font-size: 15px;
}

#qna #set-list-table th:first-child,
#qna #set-list-table td:first-child {
  width: 54px;
  padding-left: 16px;
  padding-right: 8px;
  text-align: center;
}

#qna #set-list-table th:nth-child(2) { width: 25%; }
#qna #set-list-table th:nth-child(3) { width: 23%; }
#qna #set-list-table th:nth-child(4) { width: 10%; }
#qna #set-list-table th:nth-child(5) { width: 15%; }
#qna #set-list-table th:nth-child(6) { width: 22%; }

#qna #set-list-table input[type="checkbox"] {
  display: block;
  margin: 0 auto;
}

#qna #set-list-table .set-name-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0;
  line-height: 1.35;
}

#qna #set-list-table .set-count,
#qna #set-list-table .set-date {
  white-space: nowrap;
}

#qna #set-list-table td:last-child {
  white-space: nowrap;
}

#qna #set-list-table td:last-child .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  line-height: 1.2;
}

/* 마켓: 별도 보기 열 없이 세트명 자체를 상세 링크로 사용 */
.market-list-wrap {
  overflow-x: hidden;
}

.market-list {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.market-list th:nth-child(1) { width: 20%; }
.market-list th:nth-child(2) { width: 7%; }
.market-list th:nth-child(3) { width: 10%; }
.market-list th:nth-child(4) { width: 7%; }
.market-list th:nth-child(5) { width: 21%; }
.market-list th:nth-child(6) { width: 8%; }
.market-list th:nth-child(7) { width: 9%; }
.market-list th:nth-child(8) { width: 9%; }
.market-list th:nth-child(9) { width: 9%; }

.market-list th,
.market-list td {
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-list .market-set-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: #10223b;
  font: inherit;
  font-weight: 800;
  text-align: left;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #9edfd8;
  text-underline-offset: 4px;
}

.market-list .market-set-link:hover,
.market-list .market-set-link:focus-visible {
  color: var(--primary);
  text-decoration-color: var(--primary);
  outline: none;
}

@media (max-width: 1180px) and (min-width: 701px) {
  /* 태블릿에서는 중요도가 낮은 설명 열만 숨겨 가로 스크롤을 막음 */
  .market-list th:nth-child(5),
  .market-list td:nth-child(5) {
    display: none;
  }

  .market-list th:nth-child(1) { width: 25%; }
  .market-list th:nth-child(2) { width: 8%; }
  .market-list th:nth-child(3) { width: 13%; }
  .market-list th:nth-child(4) { width: 8%; }
  .market-list th:nth-child(6) { width: 11%; }
  .market-list th:nth-child(7) { width: 12%; }
  .market-list th:nth-child(8) { width: 12%; }
  .market-list th:nth-child(9) { width: 11%; }
}

@media (max-width: 900px) {
  #qna #set-list-table {
    min-width: 840px;
  }

  #qna .table-wrap:has(#set-list-table) {
    overflow-x: auto;
  }
}


.engine-status {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #b9ddd3;
  border-radius: 14px;
  background: #f4fbf8;
}
.engine-status[hidden] { display: none; }
.engine-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.engine-status p { margin: 10px 0 6px; }
.engine-status .btn { display: inline-flex; margin-top: 14px; }


.history-message {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #b9ddd3;
  border-radius: 10px;
  background: #f4fbf8;
}
.history-message.loading { opacity: .8; }
.history-message.empty { border-style: dashed; }
.history-message.error {
  border-color: #efb7b7;
  background: #fff5f5;
}
.history-sub, .history-error {
  margin-top: 5px;
  font-size: 12px;
  color: #697386;
}
.history-error { color: #b42318; }
.download-table td { vertical-align: middle; }
.download-table a.btn { display: inline-flex; text-decoration: none; }


.engine-download-actions,
.history-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.engine-download-actions {
  margin-top: 14px;
}
.engine-download-actions .btn,
.history-download-actions .btn {
  display: inline-flex;
  margin-top: 0;
  text-decoration: none;
  white-space: nowrap;
}

.voice-catalog-note {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #b9ddd3;
  border-radius: 10px;
  background: #f4fbf8;
  color: #42615d;
  font-size: 13px;
  line-height: 1.55;
}


.voice-picker-panel {
  position: relative;
  grid-column: span 2;
  border: 1px solid #cfe7e2;
  border-radius: 14px;
  padding: 16px;
  background: #fbfefd;
}
.voice-picker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.voice-picker-title span {
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
}
.voice-search-label,
.recommended-voice-heading {
  display: block;
  margin: 12px 0 7px;
  font-size: 13px;
  font-weight: 700;
  color: #344b48;
}
.voice-search-input,
.all-voice-select {
  width: 100%;
}
.popular-language-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.popular-language-chip {
  border: 1px solid #9fd1c8;
  border-radius: 999px;
  padding: 6px 11px;
  background: white;
  color: #0f766e;
  cursor: pointer;
}
.popular-language-chip:hover {
  background: #e8f8f4;
}
.language-search-results {
  position: absolute;
  z-index: 30;
  left: 16px;
  right: 16px;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 5px;
  border: 1px solid #b9d8d2;
  border-radius: 10px;
  background: white;
  box-shadow: 0 12px 30px rgba(20, 60, 54, .14);
}
.language-search-results.open {
  display: block;
}
.language-result {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf4f2;
  background: white;
  text-align: left;
  cursor: pointer;
}
.language-result:hover {
  background: #f0faf7;
}
.language-empty,
.voice-load-error {
  padding: 12px;
  color: #8a4b4b;
}
.recommended-voice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.recommended-voice-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 106px;
  padding: 12px;
  border: 1px solid #bddbd5;
  border-radius: 11px;
  background: white;
  text-align: left;
  cursor: pointer;
}
.recommended-voice-card:hover,
.recommended-voice-card.selected {
  border-color: #0f9f8f;
  box-shadow: 0 0 0 2px rgba(15,159,143,.12);
}
.recommended-badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 2px 7px;
  background: #fff0bf;
  color: #8a6000;
  font-size: 11px;
  font-weight: 800;
}
.voice-card-actions {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}
.preview-inline {
  text-decoration: underline;
}
.voice-preview-current {
  margin-top: 9px;
}
.voice-preview-current.loading,
.preview-inline.loading {
  opacity: .65;
  pointer-events: none;
}
.voice-catalog-note {
  grid-column: span 2;
}
@media (max-width: 760px) {
  .voice-picker-panel,
  .voice-catalog-note {
    grid-column: span 1;
  }
  .recommended-voice-grid {
    grid-template-columns: 1fr;
  }
}

.voice-picker-columns{grid-column:span 2;display:grid;grid-template-columns:1fr 1fr;gap:16px}.voice-picker-panel.compact{grid-column:auto;padding:14px}.language-select-row{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:8px 0 3px}.selected-language-value{margin-top:3px;font-weight:800;color:#0f3d3b}.popular-language-row.compact{margin-top:7px}.recommended-voice-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.recommended-voice-card.compact{min-height:70px;padding:8px 10px;gap:3px}.recommended-voice-card.compact .recommended-badge{font-size:10px;padding:1px 6px}.all-voice-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}.all-voice-row .voice-search-label{grid-column:1/-1;margin-bottom:0}.language-picker-modal[hidden]{display:none}.language-picker-modal{position:fixed;inset:0;z-index:3000}.language-picker-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.48)}.language-picker-dialog{position:relative;width:min(680px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow:hidden;margin:24px auto;padding:20px;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(0,0,0,.24)}.language-picker-header{display:flex;justify-content:space-between;gap:18px;margin-bottom:14px}.language-picker-header h3{margin:0 0 4px}.language-picker-header p{margin:0;color:#687875;font-size:13px}.language-picker-close{width:36px;height:36px;border:0;border-radius:50%;background:#eef5f3;font-size:24px;cursor:pointer}.language-modal-popular{margin:14px 0 10px}.language-modal-results{max-height:430px;overflow-y:auto;border:1px solid #d6e7e3;border-radius:10px}body.modal-open{overflow:hidden}@media(max-width:900px){.voice-picker-columns{grid-template-columns:1fr}}@media(max-width:560px){.recommended-voice-grid.compact{grid-template-columns:1fr}.language-select-row{align-items:stretch;flex-direction:column}.all-voice-row{grid-template-columns:1fr}}


/* UI v38.3: stronger front/back separation and five quick languages */
.voice-picker-columns{gap:24px}
.voice-picker-panel.compact[data-side="front"]{
  border:2px solid #73cfc1;
  border-top:5px solid #11a999;
  background:linear-gradient(180deg,#f2fcfa 0%,#fbfefd 28%);
  box-shadow:0 8px 22px rgba(17,169,153,.08);
}
.voice-picker-panel.compact[data-side="back"]{
  border:2px solid #f1c879;
  border-top:5px solid #f5a623;
  background:linear-gradient(180deg,#fffaf0 0%,#fffefd 28%);
  box-shadow:0 8px 22px rgba(245,166,35,.08);
}
.voice-picker-panel.compact[data-side="front"] .voice-picker-title b{color:#087d72}
.voice-picker-panel.compact[data-side="back"] .voice-picker-title b{color:#b66a00}
.voice-picker-panel.compact[data-side="front"] .voice-picker-title span{background:#dff7f2;color:#087d72}
.voice-picker-panel.compact[data-side="back"] .voice-picker-title span{background:#fff0cf;color:#9a5d00}
.voice-picker-title span{padding:4px 8px;border-radius:999px}
@media(max-width:900px){.voice-picker-columns{gap:16px}}


/* UI v38.4: five flagged quick-language buttons */
.popular-language-row.compact {
  gap: 6px;
}
.popular-language-row.compact .popular-language-chip {
  padding: 6px 9px;
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 1180px) {
  .popular-language-row.compact .popular-language-chip {
    padding: 6px 8px;
    font-size: 12px;
  }
}


/* UI v38.5: clearer personalization controls and wider front/back separation */

/* Make the two independent voice-setting areas visually separate. */
.voice-picker-columns {
  gap: 40px;
}

/* Keep the four personalization settings visible and clearly interactive. */
#generator-speaking-rate,
#generator-repeat-count,
#generator-front-back-gap,
#generator-card-gap {
  min-height: 46px;
  border: 2px solid #7fa8a1;
  border-radius: 11px;
  background-color: #ffffff;
  color: #12201e;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75);
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    background-color .16s ease;
}

#generator-speaking-rate:hover,
#generator-repeat-count:hover,
#generator-front-back-gap:hover,
#generator-card-gap:hover {
  border-color: #169d8f;
  background-color: #fbfffe;
}

#generator-speaking-rate:focus,
#generator-repeat-count:focus,
#generator-front-back-gap:focus,
#generator-card-gap:focus {
  outline: none;
  border-color: #078c7f;
  box-shadow: 0 0 0 3px rgba(15, 159, 143, .18);
}

/* Slightly strengthen the labels so the four choices read as core settings. */
#generator-speaking-rate,
#generator-repeat-count,
#generator-front-back-gap,
#generator-card-gap {
  cursor: pointer;
}

/* Preserve comfortable spacing on tablets and stack naturally on mobile. */
@media (max-width: 1100px) {
  .voice-picker-columns {
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .voice-picker-columns {
    gap: 18px;
  }
}


/* UI v38.6: compact, color-coded direct card entry table */

/* Stronger frame around the direct-entry area. */
.generator-stack .direct-entry-wrap {
  border: 2px solid #a9c9c3;
  border-radius: 14px;
  background: #ffffff;
}

/* Reduce vertical whitespace so more rows are visible at once. */
.generator-stack .direct-entry-table th {
  padding: 9px 10px;
}

.generator-stack .direct-entry-table td {
  padding: 4px 7px;
  height: 48px;
  border-bottom: 1px solid #d9e5e2;
}

/* Neutral number column. */
.generator-stack .direct-entry-table th:first-child {
  background: #f5f7f8;
  border-right: 1px solid #d4dddf;
}

.generator-stack .direct-entry-table td:first-child {
  background: #fafbfc;
  border-right: 1px solid #d4dddf;
}

/* Front column follows the teal identity used for front-side voice settings. */
.generator-stack .direct-entry-table th:nth-child(2) {
  background: #e8f8f5;
  color: #08786f;
  border-left: 2px solid #31b5a9;
  border-right: 1px solid #9fd7cf;
}

.generator-stack .direct-entry-table td:nth-child(2) {
  background: #f7fdfb;
  border-left: 2px solid #66c9be;
  border-right: 1px solid #b6ddd7;
}

/* Back column follows the orange identity used for back-side voice settings. */
.generator-stack .direct-entry-table th:nth-child(3) {
  background: #fff4e3;
  color: #a65e00;
  border-left: 2px solid #f3aa2b;
}

.generator-stack .direct-entry-table td:nth-child(3) {
  background: #fffaf2;
  border-left: 2px solid #f6bd5c;
}

/* Make each editable field visibly clickable without adding excess height. */
.generator-stack .direct-entry-table input {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #b9cbc7;
  border-radius: 7px;
  background: rgba(255, 255, 255, .9);
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background-color .15s ease;
}

.generator-stack .direct-entry-table td:nth-child(2) input:hover {
  border-color: #35aa9f;
}

.generator-stack .direct-entry-table td:nth-child(3) input:hover {
  border-color: #e59a22;
}

.generator-stack .direct-entry-table td:nth-child(2) input:focus {
  border-color: #079689;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 159, 143, .14);
}

.generator-stack .direct-entry-table td:nth-child(3) input:focus {
  border-color: #df8b0d;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}

/* Keep the header and column distinction visible while scrolling. */
.generator-stack .direct-entry-table th:nth-child(2),
.generator-stack .direct-entry-table th:nth-child(3) {
  box-shadow: inset 0 -1px 0 rgba(67, 94, 89, .16);
}

@media (max-width: 900px) {
  .generator-stack .direct-entry-table td {
    height: 46px;
  }
}


/* UI v38.7: table alignment, representative voice previews and clearer controls */

/* Align card numbers with the editable text fields. */
.generator-stack .direct-entry-table td:first-child {
  vertical-align: middle;
  padding-top: 4px;
  padding-bottom: 4px;
  line-height: 36px;
}

.generator-stack .direct-entry-table td:nth-child(2),
.generator-stack .direct-entry-table td:nth-child(3) {
  vertical-align: middle;
}

/* Make tables across all pages easier to distinguish. */
.page table,
.card table,
.modal table {
  border: 1.5px solid #9fb5b1;
  border-collapse: separate;
  border-spacing: 0;
}

.page table th,
.card table th,
.modal table th {
  border-bottom: 1.5px solid #9fb5b1;
}

.page table th + th,
.page table td + td,
.card table th + th,
.card table td + td,
.modal table th + th,
.modal table td + td {
  border-left: 1px solid #c2d0cd;
}

.page table td,
.card table td,
.modal table td {
  border-bottom-color: #c9d6d3;
}

/* Strengthen input controls across the homepage without changing their layout. */
.page input:not([type="checkbox"]):not([type="radio"]),
.page select,
.page textarea,
.modal input:not([type="checkbox"]):not([type="radio"]),
.modal select,
.modal textarea {
  border: 1.5px solid #8ea9a4;
  background-color: #ffffff;
}

.page input:not([type="checkbox"]):not([type="radio"]):hover,
.page select:hover,
.page textarea:hover,
.modal input:not([type="checkbox"]):not([type="radio"]):hover,
.modal select:hover,
.modal textarea:hover {
  border-color: #4f8f86;
}

.page input:not([type="checkbox"]):not([type="radio"]):focus,
.page select:focus,
.page textarea:focus,
.modal input:not([type="checkbox"]):not([type="radio"]):focus,
.modal select:focus,
.modal textarea:focus {
  outline: none;
  border-color: #079689;
  box-shadow: 0 0 0 3px rgba(15, 159, 143, .14);
}

/* Preserve the separate orange focus identity for back-side card text. */
.generator-stack .direct-entry-table td:nth-child(3) input:focus {
  border-color: #df8b0d;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}

/* Let the longer free-regeneration explanation wrap cleanly. */
.generator-preview-row {
  align-items: center;
  flex-wrap: wrap;
}

.generator-preview-row .preview-description {
  flex: 1 1 420px;
  line-height: 1.55;
}


/* UI v38.8: provider-neutral Memowna voice names */
.recommended-voice-card b {
  letter-spacing: -0.01em;
}
.all-voice-select {
  font-weight: 650;
}
.voice-catalog-note::after {
  content: " 목소리 제공업체나 기술 등급은 화면에 표시하지 않습니다.";
  color: #55736e;
}


/* UI v39: finalized provider-neutral voice architecture */
.voice-catalog-note b {
  color: #0f766e;
}


/* UI v39.1: named materials, compact one-line history, regeneration count */
.generation-name-field {
  margin: 14px 0 16px;
  padding: 14px;
  border: 1.5px solid #9ccbc3;
  border-radius: 12px;
  background: #f6fcfa;
}
.generation-name-field label,
.generation-name-field small {
  display: block;
}
.generation-name-field input {
  width: 100%;
  margin: 7px 0 5px;
}
.required-mark { color: #d45b45; }

.download-table {
  table-layout: fixed;
  width: 100%;
}
.download-table th,
.download-table td {
  white-space: nowrap;
  vertical-align: middle;
}
.download-table th:nth-child(1) { width: 24%; }
.download-table th:nth-child(2) { width: 14%; }
.download-table th:nth-child(3) { width: 13%; }
.download-table th:nth-child(4) { width: 15%; }
.download-table th:nth-child(5) { width: 13%; }
.download-table th:nth-child(6) { width: 21%; }

.history-ellipsis,
.single-line-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-title { font-weight: 800; }
.history-title-cell,
.history-actions-cell { overflow: hidden; }
.history-actions-cell .btn {
  white-space: nowrap;
  padding-left: 11px;
  padding-right: 11px;
}
.history-actions-cell {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
}
.history-error-inline {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: #c0392b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.regen-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.regen-chip.available {
  border: 1px solid #8bd1c4;
  background: #eaf9f5;
  color: #08786f;
}
.regen-chip.exhausted,
.regen-chip.unavailable {
  border: 1px solid #d8dfdd;
  background: #f3f5f5;
  color: #7a8583;
}
.mobile-history-title { min-width: 0; max-width: 75%; }
.mobile-regeneration { margin: 8px 0; }

@media (max-width: 1100px) {
  .download-table th:nth-child(3),
  .download-table td:nth-child(3) {
    display: none;
  }
}


/* UI v39.2: unique Memowna voice names */
.all-voice-select option {
  white-space: nowrap;
}


/* UI v40: official voice IDs */
.recommended-voice-card b,
.voice-summary,
.all-voice-select option {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recommended-voice-card b {
  font-size: 14px;
}


/* v44 home fixed output samples */
.home-demo-experience{min-width:0}
.demo-side span{display:block;line-height:1.5}
.demo-result-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:14px;padding-top:13px;border-top:1px dashed #c9dedb}
.demo-result-heading b{font-size:16px;color:var(--text)}
.demo-result-heading span{font-size:12px;color:var(--muted);text-align:right}
.demo-output-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px}
.demo-output-button{display:flex;align-items:center;gap:8px;min-width:0;padding:10px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--text);text-decoration:none;text-align:left;cursor:pointer;font:inherit;transition:.16s ease}
.demo-output-button:hover{transform:translateY(-1px);border-color:#83cbc4;box-shadow:0 7px 18px rgba(20,87,82,.09)}
.demo-output-button.playing{border-color:var(--primary);background:#effcf9}
.demo-output-icon{font-size:20px;line-height:1;flex:0 0 auto}
.demo-output-button span:last-child{min-width:0}
.demo-output-button b,.demo-output-button small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.demo-output-button b{font-size:13px}.demo-output-button small{margin-top:3px;font-size:11px;color:var(--muted);font-weight:700}
.home-sample-modal{position:fixed;inset:0;z-index:1200;display:none;align-items:center;justify-content:center;padding:22px;background:rgba(8,20,25,.7);backdrop-filter:blur(4px)}
.home-sample-modal.active{display:flex}
.home-sample-dialog{width:min(920px,96vw);max-height:92vh;overflow:hidden;border-radius:20px;background:#fff;box-shadow:0 28px 80px rgba(0,0,0,.3)}
.home-sample-modal-head,.home-sample-modal-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px}
.home-sample-modal-head{border-bottom:1px solid var(--line)}.home-sample-modal-head h3{margin:6px 0 0}
.home-sample-close{width:40px;height:40px;border:1px solid var(--line);border-radius:50%;background:#fff;font-size:25px;cursor:pointer}
.home-sample-modal-body{height:min(66vh,650px);background:#111;display:flex;align-items:center;justify-content:center}
.home-sample-modal-body video{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;background:#000}
.home-sample-modal-body iframe{width:100%;height:100%;border:0;background:#fff}
.home-sample-modal-foot{border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
@media(max-width:900px){.demo-output-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.demo-result-heading{align-items:flex-start;flex-direction:column}.demo-result-heading span{text-align:left}}
@media(max-width:560px){.demo-output-actions{grid-template-columns:1fr 1fr}.home-sample-modal{padding:8px}.home-sample-modal-foot{align-items:flex-start;flex-direction:column}.home-sample-modal-body{height:65vh}}


/* =========================================================
   Memowna UI v45
   1) Consistent table outlines and centered headers
   2) Compact rows and internal scrolling for long lists
   3) Guided tooltips for the three card-management tabs
   ========================================================= */

/* The rounded wrapper owns the outside border so table corners never look broken. */
.table-wrap,
.market-list-wrap,
.editor-grid-wrap {
  border: 1.5px solid #9fb5b1;
  border-radius: 14px;
  background: #fff;
  overflow: auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

.table-wrap > table,
.market-list-wrap > table,
.editor-grid-wrap > table {
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0;
}

/* Finish the lower edge inside the rounded wrapper without a doubled line. */
.table-wrap tbody tr:last-child td,
.market-list-wrap tbody tr:last-child td,
.editor-grid-wrap tbody tr:last-child td {
  border-bottom: 0;
}

/* Header labels are navigational labels, so center them consistently. */
.page table thead th,
.card table thead th,
.modal table thead th {
  text-align: center;
  vertical-align: middle;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.25;
}

/* Compact list rows while preserving comfortable click targets. */
#qna #set-list-table th,
#qna #set-list-table td,
#qna #card-library-table th,
#qna #card-library-table td,
.market-list th,
.market-list td,
#mypage .download-table th,
#mypage .download-table td {
  padding-top: 9px;
  padding-bottom: 9px;
  vertical-align: middle;
}

#qna #set-list-table th { height: 42px; }
#qna #set-list-table td { height: 54px; }
#qna #card-library-table tbody tr { height: 56px; }
.market-list td { height: 54px; }

/* Long lists stay inside the content area instead of making the whole page excessively tall. */
#qna .table-wrap:has(#set-list-table) { max-height: 360px; }
#qna .table-wrap:has(#card-library-table) { max-height: 420px; }
.market-list-wrap { max-height: 440px; }
#mypage .table-wrap:has(.download-table) { max-height: 440px; }

/* Keep the header visible while scrolling a long table. */
#qna #set-list-table thead th,
#qna #card-library-table thead th,
.market-list thead th,
#mypage .download-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
}

/* Center structured values; leave narrative text left-aligned for readability. */
#qna #set-list-table td:first-child,
#qna #set-list-table td:nth-child(4),
#qna #set-list-table td:nth-child(5),
#qna #set-list-table td:nth-child(6),
#qna #card-library-table td:first-child,
#qna #card-library-table td:nth-child(2),
#qna #card-library-table td:nth-child(5),
#qna #card-library-table td:nth-child(6),
#qna #card-library-table td:nth-child(7),
#qna #card-library-table td:nth-child(8),
.market-list td:nth-child(2),
.market-list td:nth-child(3),
.market-list td:nth-child(4),
.market-list td:nth-child(6),
.market-list td:nth-child(7),
.market-list td:nth-child(8),
.market-list td:nth-child(9),
#mypage .download-table td:nth-child(2),
#mypage .download-table td:nth-child(3),
#mypage .download-table td:nth-child(4),
#mypage .download-table td:nth-child(5),
#mypage .download-table td:nth-child(6) {
  text-align: center;
}

/* Names and descriptive content remain left aligned. */
#qna #set-list-table td:nth-child(2),
#qna #set-list-table td:nth-child(3),
#qna #card-library-table td:nth-child(3),
#qna #card-library-table td:nth-child(4),
.market-list td:first-child,
.market-list td:nth-child(5),
#mypage .download-table td:first-child {
  text-align: left;
}

/* Accessible hover/focus explanations for first-time users. */
#qna .tabs .qna-tab-help {
  position: relative;
}
#qna .tabs .qna-tab-help::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 290px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #263238;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 22px rgba(15,23,42,.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index: 30;
}
#qna .tabs .qna-tab-help::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #263238;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, visibility .16s ease;
  z-index: 31;
}
#qna .tabs .qna-tab-help:hover::after,
#qna .tabs .qna-tab-help:focus-visible::after,
#qna .tabs .qna-tab-help:hover::before,
#qna .tabs .qna-tab-help:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
#qna .tabs .qna-tab-help:hover::before,
#qna .tabs .qna-tab-help:focus-visible::before {
  transform: translateX(-50%);
}

@media (max-width: 700px) {
  #qna .tabs .qna-tab-help::after { display: none; }
  #qna .tabs .qna-tab-help::before { display: none; }
  #qna .table-wrap:has(#set-list-table),
  #qna .table-wrap:has(#card-library-table),
  .market-list-wrap,
  #mypage .table-wrap:has(.download-table) { max-height: none; }
}


/* UI v46: payment action, voice selector polish and bulk-card number alignment */
#generator .payment-price-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
#generator .payment-price-box .generator-payment-button {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 850;
  justify-content: center;
  box-shadow: 0 7px 16px rgba(245, 158, 11, .18);
}
#generator .all-voice-row {
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: stretch;
}
#generator .all-voice-row .voice-search-label {
  grid-column: 1 / -1;
}
#generator .all-voice-select,
#generator .voice-preview-current {
  height: 44px;
  margin: 0;
  border-radius: 10px;
  box-sizing: border-box;
}
#generator .all-voice-select {
  min-width: 0;
  padding: 0 36px 0 12px;
  border: 1px solid #9fc8c2;
  background-color: #fff;
  font-size: 14px;
  line-height: 44px;
}
#generator .voice-preview-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 0 14px;
  border: 1px solid #bfd8d3;
  background: #f7faf9;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
#generator .voice-preview-current:hover {
  border-color: #19a99d;
  background: #ecfaf7;
  color: #0f766e;
}
.bulk-card-grid th:first-child,
.bulk-card-grid td:first-child {
  width: 64px;
  text-align: center;
  vertical-align: middle;
}
.bulk-card-grid td:first-child {
  height: 46px;
  padding: 0 8px;
  line-height: 1;
  font-weight: 650;
  color: #334155;
}
.bulk-card-grid th {
  text-align: center;
}
.bulk-card-grid th:nth-child(2),
.bulk-card-grid th:nth-child(3) {
  text-align: left;
}
@media (max-width: 560px) {
  #generator .all-voice-row {
    grid-template-columns: 1fr;
  }
  #generator .voice-preview-current {
    width: 100%;
  }
}


/* UI v47: generation history policy clarity and clean scroll border */
.history-table-shell{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}
.history-table-scroll{max-height:440px;overflow-y:auto;overflow-x:auto;scrollbar-gutter:stable;padding-right:5px}
.history-table-scroll .download-table{border:0;border-radius:0;margin:0}
.history-table-scroll .download-table thead th{position:sticky;top:0;z-index:3;background:#f7f9fa}
.history-table-scroll .download-table th:last-child,.history-table-scroll .download-table td:last-child{border-right:0}
.history-table-scroll .download-table tbody tr:last-child td{border-bottom:0}
.history-download-actions .btn{min-width:0;justify-content:center}
.regen-chip[tabindex="0"]:focus{outline:none;box-shadow:0 0 0 3px rgba(15,159,143,.16)}
@media(max-width:760px){.history-table-scroll{max-height:none;padding-right:0}}


/* Memowna UI v49 - editor action access and border polish */
.editor-top-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}
.editor-grid-shell{border:1.5px solid #9fb5b1;border-radius:14px;background:#fff;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}
.editor-grid-shell .editor-grid-wrap{border:0;border-radius:0;max-height:590px;overflow:auto;padding-right:6px;scrollbar-gutter:stable}
.editor-grid-shell .editor-grid{width:100%;min-width:1050px}
#qna .editor-grid th:nth-child(5),#qna .editor-grid th:nth-child(6),#qna .editor-grid td:nth-child(5),#qna .editor-grid td:nth-child(6){text-align:center;vertical-align:middle}
#qna .editor-grid td:nth-child(5) small{display:block;text-align:center}
#qna .editor-grid td:nth-child(6) .btn{margin-inline:auto}
@media(max-width:720px){.editor-top-actions{align-items:flex-start}.editor-top-actions .toolbar{width:100%}}

/* UI v50 — 마켓 판매 카드 상세 보호 및 선택/번호 정렬 */
#market-set-detail #market-card-table th:nth-child(1),
#market-set-detail #market-card-table td:nth-child(1),
#market-set-detail #market-card-table th:nth-child(2),
#market-set-detail #market-card-table td:nth-child(2) {
  text-align: center;
  vertical-align: middle;
}

#market-set-detail #market-card-table td:nth-child(1) input[type="checkbox"] {
  display: block;
  margin: 0 auto;
}

/* 판매 카드 원문은 드래그 선택·복사를 막고, 체크박스/버튼 조작은 유지합니다. */
#market-set-detail .market-protected-content,
#market-set-detail #market-card-table th,
#market-set-detail #market-card-table td {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#market-set-detail #market-card-table td,
#market-set-detail #market-card-table th {
  cursor: default;
}

#market-set-detail #market-card-table input,
#market-set-detail button,
#market-set-detail label {
  cursor: pointer;
}

/* =========================================================
   Memowna UI v51
   Global table density, corner-border continuity and market detail alignment
   ========================================================= */

/*
 * Every scrollable table keeps a small inner gutter between the scrollbar and
 * the rounded outer edge. A stronger inset keyline prevents the top/right
 * corners from looking faded or disconnected when a scrollbar is present.
 */
.table-wrap,
.market-list-wrap,
.direct-entry-wrap,
.editor-grid-wrap,
.bulk-card-grid-wrap,
.language-modal-results,
.history-table-scroll {
  scrollbar-gutter: stable;
}

.table-wrap,
.market-list-wrap,
.direct-entry-wrap,
.editor-grid-shell,
.bulk-card-grid-wrap,
.history-table-shell {
  border: 1.5px solid #91aaa5;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(145,170,165,.30),
    0 1px 0 rgba(255,255,255,.75);
  background-clip: padding-box;
}

/* Keep the right outline visible beside vertical scrollbars. */
.table-wrap,
.market-list-wrap,
.direct-entry-wrap,
.bulk-card-grid-wrap {
  padding-right: 5px;
}

.table-wrap > table,
.market-list-wrap > table,
.direct-entry-wrap > table,
.bulk-card-grid-wrap > table {
  border-right: 0 !important;
}

/* Compact, consistent table rhythm across all pages. */
.page table th,
.page table td,
.modal table th,
.modal table td {
  padding: 8px 10px;
  vertical-align: middle;
  line-height: 1.35;
}

.page table thead th,
.modal table thead th {
  min-height: 38px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.page table tbody tr,
.modal table tbody tr {
  height: 48px;
}

/* Inputs inside editor-style tables remain comfortable without inflating rows. */
.direct-entry-table input,
.editor-grid input,
.bulk-card-grid input {
  padding-top: 7px;
  padding-bottom: 7px;
  min-height: 36px;
}

/* Market detail: selection, number and disclosure-status columns are structured values. */
#market-set-detail #market-card-table th:nth-child(5),
#market-set-detail #market-card-table td:nth-child(5) {
  text-align: center;
  vertical-align: middle;
}

#market-set-detail #market-card-table td:nth-child(5) .badge {
  display: inline-block;
  margin-inline: auto;
}

/* Preserve rounded corners and a visible right edge in the generator/editor scroll tables. */
.direct-entry-wrap,
.editor-grid-shell,
.history-table-shell {
  overflow: hidden;
}

.direct-entry-wrap > .direct-entry-table,
.editor-grid-shell .editor-grid-wrap,
.history-table-shell .history-table-scroll {
  border: 0 !important;
  border-radius: 0 !important;
}

.direct-entry-wrap {
  overflow: auto;
}

/* The inner scrolling regions receive their own right breathing room. */
.editor-grid-shell .editor-grid-wrap,
.history-table-shell .history-table-scroll {
  padding-right: 6px;
}

@media (max-width: 700px) {
  .table-wrap,
  .market-list-wrap,
  .direct-entry-wrap,
  .bulk-card-grid-wrap,
  .editor-grid-shell .editor-grid-wrap,
  .history-table-shell .history-table-scroll {
    padding-right: 3px;
  }

  .page table th,
  .page table td,
  .modal table th,
  .modal table td {
    padding: 7px 8px;
  }
}

/* UI v52: actionable free remix control */
.regen-action { cursor: pointer; font: inherit; }
.regen-action:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20, 168, 160, .18); }
.regen-action:focus-visible { outline: 3px solid rgba(20, 168, 160, .22); outline-offset: 2px; }


/* =========================================================
   Memowna UI v53 — compact generation history
   ========================================================= */
#mypage .download-table{table-layout:fixed;min-width:940px}
#mypage .download-table th:nth-child(1){width:25%}
#mypage .download-table th:nth-child(2){width:25%}
#mypage .download-table th:nth-child(3){width:16%}
#mypage .download-table th:nth-child(4){width:34%}
#mypage .download-table tbody tr{height:54px;min-height:54px}
#mypage .download-table th,#mypage .download-table td{padding:7px 9px}
.history-period-cell{display:grid;grid-template-columns:1fr;gap:2px;font-size:13px;line-height:1.25;text-align:center}
.history-period-cell span{display:block;white-space:nowrap}
.history-period-cell b{color:#56615f;font-size:11px;margin-right:4px}
.history-actions-cell{overflow:visible!important}
.history-format-actions{display:grid;grid-template-columns:repeat(4,minmax(64px,1fr));gap:5px;width:100%;align-items:center}
.history-format-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:0;height:32px;padding:4px 7px;border:1px solid #d8e1df;border-radius:9px;background:#fff;color:#0b5fd7;font-size:12px;font-weight:800;line-height:1;text-decoration:none;white-space:nowrap}
.history-format-button.is-ready:hover{border-color:#63bdb3;background:#f0fbf9;transform:translateY(-1px)}
.history-format-button.is-disabled{background:#f4f6f6;color:#a6afad;border-color:#e3e8e7;cursor:not-allowed;opacity:.72}
.history-format-actions.failed .history-format-button{opacity:.48}
@media(max-width:1100px){
  #mypage .download-table th:nth-child(3),#mypage .download-table td:nth-child(3){display:table-cell}
  .history-format-actions{grid-template-columns:repeat(2,minmax(74px,1fr))}
  #mypage .download-table tbody tr{height:66px}
}


/* =========================================================
   Memowna UI v54 — compact one-line generation history
   ========================================================= */
#mypage .download-table{table-layout:fixed;min-width:980px}
#mypage .download-table th:nth-child(1){width:24%}
#mypage .download-table th:nth-child(2){width:13%}
#mypage .download-table th:nth-child(3){width:13%}
#mypage .download-table th:nth-child(4){width:13%}
#mypage .download-table th:nth-child(5){width:37%}
#mypage .download-table tbody tr{height:46px;min-height:46px}
#mypage .download-table th{padding:7px 8px;line-height:1.15}
#mypage .download-table td{padding:5px 8px;line-height:1.15}
.history-created-cell,.history-expiry-cell{text-align:center;white-space:nowrap;font-size:13px}
.history-expiry-cell{font-weight:800;color:#0f766e}
.history-expiry-cell.is-expired{color:#8a9492}
.regen-chip{min-width:52px;height:28px;padding:3px 9px;font-size:12px;line-height:1;border-radius:999px;white-space:nowrap}
.history-format-actions{display:grid;grid-template-columns:repeat(4,minmax(56px,1fr));gap:4px;width:100%;align-items:center}
.history-format-button{height:28px;padding:3px 6px;border-radius:8px;font-size:11.5px;gap:3px}
.history-format-button span{line-height:1}
.history-actions-cell{padding-top:4px!important;padding-bottom:4px!important}
@media(max-width:1100px){
  .history-format-actions{grid-template-columns:repeat(4,minmax(54px,1fr))}
  #mypage .download-table tbody tr{height:48px}
}


/* =========================================================
   Memowna UI v55 — fit history table and improve subpage flow
   ========================================================= */
#mypage .history-table-scroll{
  overflow-x:hidden!important;
}
#mypage .download-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
#mypage .download-table th:nth-child(1){width:23%!important}
#mypage .download-table th:nth-child(2){width:12%!important}
#mypage .download-table th:nth-child(3){width:12%!important}
#mypage .download-table th:nth-child(4){width:12%!important}
#mypage .download-table th:nth-child(5){width:41%!important}
#mypage .download-table tbody tr{
  height:42px!important;
  min-height:42px!important;
}
#mypage .download-table th{
  padding:6px 7px!important;
}
#mypage .download-table td{
  padding:4px 7px!important;
}
.history-format-actions{
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:center;
  gap:4px!important;
  width:100%;
  min-width:0;
}
.history-format-button{
  flex:1 1 0;
  min-width:0!important;
  max-width:78px;
  height:26px!important;
  padding:2px 4px!important;
  font-size:11px!important;
  border-radius:7px!important;
  overflow:hidden;
}
.history-format-button span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.regen-chip{
  min-width:48px!important;
  height:26px!important;
  padding:2px 7px!important;
}
#mypage .history-table-shell,
#mypage .history-table-scroll{
  width:100%;
  max-width:100%;
}
.subpage-title-group{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.subpage-title-group h2{margin:0}
.mypage-back-button{
  padding:8px 11px;
  white-space:nowrap;
}
@media(max-width:900px){
  #mypage .history-table-scroll{overflow-x:auto!important}
  #mypage .download-table{min-width:760px!important}
  .subpage-title-group{align-items:flex-start;flex-direction:column;gap:8px}
}


/* =========================================================
   Memowna UI v56 — compact download actions and terminology
   ========================================================= */
#mypage .download-table th:nth-child(1){width:24%!important}
#mypage .download-table th:nth-child(2){width:12%!important}
#mypage .download-table th:nth-child(3){width:11%!important}
#mypage .download-table th:nth-child(4){width:11%!important}
#mypage .download-table th:nth-child(5){width:42%!important}
#mypage .download-table th:last-child,
#mypage .download-table td:last-child{
  padding-left:3px!important;
  padding-right:3px!important;
}
.history-format-actions{
  justify-content:flex-start!important;
  gap:3px!important;
}
.history-format-button{
  flex:0 0 auto!important;
  max-width:none!important;
  height:25px!important;
  padding:2px 6px!important;
  font-size:10.5px!important;
  gap:2px!important;
}
.history-format-button span{
  overflow:visible!important;
  text-overflow:clip!important;
}
.history-format-button:nth-child(1){min-width:49px!important}
.history-format-button:nth-child(2){min-width:49px!important}
.history-format-button:nth-child(3){min-width:47px!important}
.history-format-button:nth-child(4){min-width:98px!important}

.engine-status #generator-engine-detail:empty{display:none}
.engine-download-actions{
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
}
.engine-download-actions .engine-download-button{
  min-height:38px;
  padding:8px 13px;
  border-color:#9ccfc7;
  background:#fff;
  color:#075f58;
  font-weight:800;
}
.engine-download-actions .engine-download-button:hover{
  background:#eefaf8;
  border-color:#25a89c;
}
.engine-history-link{
  margin-top:10px;
}

/* UI v57: generation issue reporting */
.history-title-button{border:0;background:transparent;padding:0;font:inherit;font-weight:800;color:inherit;text-align:left;cursor:pointer}.history-title-button:hover{text-decoration:underline;color:#0f9f99}.generation-issue-modal{display:none;position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:1400;align-items:center;justify-content:center;padding:20px}.generation-issue-modal.active{display:flex}.generation-issue-dialog{width:min(560px,100%);background:#fff;border-radius:18px;border:1px solid #b7d8d4;box-shadow:0 24px 70px rgba(15,23,42,.22);padding:22px}.generation-issue-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:8px}.generation-issue-head h3{margin:8px 0 0}.generation-issue-close{border:0;background:#f3f5f5;border-radius:10px;width:38px;height:38px;font-size:24px;cursor:pointer}.generation-issue-dialog .field{margin-top:14px}.generation-issue-dialog select,.generation-issue-dialog textarea{width:100%;box-sizing:border-box;border:1px solid #9bb9b6;border-radius:10px;padding:11px 12px;font:inherit}.generation-issue-policy{margin-top:14px;padding:13px 14px;border-radius:12px;background:#f4fbfa;border:1px solid #bde6e1;font-size:13px;line-height:1.55}.generation-issue-policy p{margin:5px 0}.generation-issue-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}


/* =========================================================
   Memowna UI v59 — right-side My Page navigation and compact history
   ========================================================= */
.subpage-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.subpage-header > h2{margin:0}
.subpage-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin-left:auto;
}
.mypage-back-button{order:0}

#mypage .download-table th:nth-child(1){width:35%!important}
#mypage .download-table th:nth-child(2){width:13%!important}
#mypage .download-table th:nth-child(3){width:12%!important}
#mypage .download-table th:nth-child(4){width:12%!important}
#mypage .download-table th:nth-child(5){width:28%!important}
#mypage .download-table th:last-child,
#mypage .download-table td:last-child{
  padding-left:4px!important;
  padding-right:4px!important;
}
.history-format-actions{
  justify-content:flex-start!important;
  width:max-content!important;
  max-width:100%;
}
.regen-chip{
  min-width:72px!important;
  padding-left:9px!important;
  padding-right:9px!important;
}

@media(max-width:900px){
  .subpage-header{align-items:flex-start}
  .subpage-header-actions{flex-wrap:wrap}
  #mypage .download-table{min-width:820px!important}
}


/* UI v60: lock free-regeneration mode to assembly-only controls */
.free-regeneration-banner{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  margin:0 0 16px;padding:14px 16px;border:1px solid #72cfc6;border-radius:14px;
  background:#effbf9;color:#17353a;
}
.free-regeneration-banner[hidden]{display:none!important}
.free-regeneration-banner p{margin:4px 0 0;color:#49646a;font-size:14px}
.free-regeneration-active .voice-picker-panel,
.free-regeneration-active .source-switch,
.free-regeneration-active .output-choice{position:relative}
.free-regeneration-active .voice-picker-panel::after,
.free-regeneration-active .output-choice::after{
  content:'무료 재생성에서는 변경할 수 없습니다.';
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  padding:12px;text-align:center;font-size:13px;font-weight:700;color:#657378;
  background:rgba(244,247,247,.82);border-radius:inherit;opacity:0;pointer-events:none;
  transition:opacity .15s ease;
}
.free-regeneration-active .voice-picker-panel:hover::after,
.free-regeneration-active .output-choice:hover::after{opacity:1}
.free-regeneration-active #direct-entry-body input[readonly]{background:#f4f7f7;color:#33464b;cursor:not-allowed}
.free-regeneration-active #direct-entry-body tr{cursor:grab}
.free-regeneration-active #direct-entry-body tr:active{cursor:grabbing}
.free-order-handle{display:inline-block;margin-right:7px;color:#9aaeb2;font-weight:900;letter-spacing:-2px}
.free-order-dragging{opacity:.55}
.free-order-target{outline:2px solid #16b3a7;outline-offset:-2px}
.free-regeneration-active .generator-format:disabled + .output-choice-name,
.free-regeneration-active .generator-format:disabled ~ *{opacity:.72}
@media(max-width:700px){.free-regeneration-banner{align-items:flex-start;flex-direction:column}}


/* =========================================================
   Memowna UI v61 — payment/seller table alignment and seller summary
   ========================================================= */
.payment-history-table th,
.payment-history-table td,
.seller-products-table th,
.seller-products-table td{
  vertical-align:middle;
}
.payment-history-table td{text-align:center}
.payment-history-table td:nth-child(3){text-align:left}
.seller-products-table td{text-align:center}
.seller-products-table td:first-child{text-align:left}
.seller-summary-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-height:176px;
}
.seller-summary-card .kpi{margin-top:10px}
.seller-summary-card .muted{margin-top:8px}
.seller-summary-card .seller-detail-button,
.seller-summary-actions{margin-top:auto}
.seller-summary-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
@media (max-width:760px){
  .seller-summary-card{min-height:auto}
}


/* =========================================================
   Memowna UI v62 — compact sticky generator progress guide
   ========================================================= */
#generator .steps{
  position:sticky;
  top:72px;
  z-index:18;
  margin:14px 0 18px;
  padding:0;
  border-radius:16px;
  transition:padding .18s ease,background .18s ease,box-shadow .18s ease;
}
#generator .steps .step{
  min-height:104px;
  grid-template-columns:31px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:10px;
  row-gap:7px;
  padding:13px 14px 12px;
  align-content:center;
  cursor:pointer;
  transition:min-height .18s ease,padding .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
#generator .steps .step>span{
  width:28px;
  height:28px;
  font-size:14px;
}
#generator .steps .step>b,
#generator .steps .step>b.step-title-long{
  min-height:0;
  margin:0;
  font-size:15px;
  line-height:1.32;
  align-self:center;
}
#generator .steps .step>p{
  margin:0;
  font-size:13px;
  line-height:1.38;
}
#generator .steps .step:hover,
#generator .steps .step:focus-visible{
  border-color:#83d6cf;
  box-shadow:0 7px 18px rgba(15,118,110,.09);
  outline:none;
}
#generator .steps .step.active{
  border-color:var(--primary);
  background:#f2fbfa;
  box-shadow:0 7px 18px rgba(15,118,110,.10);
}
#generator .steps.is-compact{
  padding:7px;
  background:rgba(255,255,255,.97);
  border:1px solid #dce9e6;
  box-shadow:0 10px 28px rgba(31,41,55,.12);
  backdrop-filter:blur(10px);
}
#generator .steps.is-compact .step{
  min-height:52px;
  padding:8px 10px;
  grid-template-columns:26px minmax(0,1fr);
  grid-template-rows:auto;
  column-gap:8px;
  border-radius:11px;
  box-shadow:none;
}
#generator .steps.is-compact .step>span{
  width:24px;
  height:24px;
  font-size:12px;
}
#generator .steps.is-compact .step>b,
#generator .steps.is-compact .step>b.step-title-long{
  grid-row:1;
  font-size:13px;
  line-height:1.22;
}
#generator .steps.is-compact .step>b br{display:none}
#generator .steps.is-compact .step>p{display:none}
#generator [data-generator-section]{scroll-margin-top:145px}

@media(max-width:900px){
  #generator .steps{
    display:flex;
    overflow-x:auto;
    gap:8px;
    top:64px;
    padding-bottom:4px;
    scrollbar-width:thin;
  }
  #generator .steps .step{
    flex:0 0 230px;
    min-height:86px;
  }
  #generator .steps.is-compact{padding:6px}
  #generator .steps.is-compact .step{flex-basis:190px;min-height:48px}
  #generator [data-generator-section]{scroll-margin-top:128px}
}
@media(max-width:560px){
  #generator .section-title{margin-bottom:10px}
  #generator .steps .step{flex-basis:205px;padding:11px 12px}
  #generator .steps.is-compact .step{flex-basis:174px}
}

/* =========================================================
   Memowna UI v64 - Compact 10-row market list
   ========================================================= */
#market > .card { padding: 18px 22px; }
#market .toolbar { gap: 8px; margin: 0 0 12px; }
#market .toolbar input,
#market .toolbar select,
#market .toolbar .btn {
  min-height: 38px;
  height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}
#market .market-list-wrap {
  margin-top: 10px;
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
}
#market .market-list th {
  height: 34px;
  padding: 6px 8px;
  font-size: 12.5px;
  line-height: 1.15;
}
#market .market-list td {
  height: 40px;
  padding: 5px 8px;
  font-size: 13.5px;
  line-height: 1.2;
}
#market .market-list tbody tr { height: 40px; }
#market .market-list .set-desc { line-height: 1.2; }
#market .market-list-footer {
  margin-top: 10px;
  min-height: 38px;
}
#market .market-list-footer .btn {
  min-height: 36px;
  height: 36px;
  padding: 6px 12px;
}
#market .market-page-size {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
#market .market-page-size label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
#market .market-page-size select {
  height: 34px;
  min-height: 34px;
  padding: 4px 28px 4px 9px;
  border-radius: 9px;
}
@media (max-width:700px){
  #market > .card { padding: 14px; }
  #market .market-page-size { width:100%; justify-content:space-between; }
}


/* =========================================================
   Memowna UI v65
   Full market-card preview and compact detail rows
   ========================================================= */
#market-set-detail #market-card-table {
  table-layout: fixed;
}
#market-set-detail #market-card-table th,
#market-set-detail #market-card-table td {
  padding: 6px 10px;
  min-height: 34px;
  height: 36px;
  line-height: 1.25;
  vertical-align: middle;
}
#market-set-detail #market-card-table thead th {
  height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
}
#market-set-detail #market-card-table th:nth-child(1),
#market-set-detail #market-card-table td:nth-child(1) { width: 64px; }
#market-set-detail #market-card-table th:nth-child(2),
#market-set-detail #market-card-table td:nth-child(2) { width: 68px; }
#market-set-detail #market-card-table th:nth-child(3),
#market-set-detail #market-card-table td:nth-child(3),
#market-set-detail #market-card-table th:nth-child(4),
#market-set-detail #market-card-table td:nth-child(4) { width: auto; }
#market-set-detail #market-card-table td:nth-child(3),
#market-set-detail #market-card-table td:nth-child(4) {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#market-set-detail .table-wrap {
  max-height: 430px;
}
#market-set-detail .toolbar {
  margin-top: 12px !important;
}
#market-set-detail > .muted {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.45;
}


/* =========================================================
   Memowna UI v66
   Market selection controls and card-level copyright reports
   ========================================================= */
#market-set-detail .market-selection-toolbar {
  display:flex;
  align-items:center;
  gap:10px;
}
#market-set-detail .market-select-all-label {
  display:inline-flex;
  align-items:center;
  gap:7px;
  cursor:pointer;
  min-height:34px;
  margin:0;
  padding:0 2px;
  font-weight:700;
  white-space:nowrap;
}
#market-set-detail .market-select-all-label input {
  margin:0;
  width:16px;
  height:16px;
  flex:0 0 auto;
}
#market-set-detail #market-card-table th:nth-child(5),
#market-set-detail #market-card-table td:nth-child(5) {
  width:70px;
  text-align:center;
  vertical-align:middle;
  padding-left:5px;
  padding-right:5px;
}
#market-set-detail #market-card-table tbody tr {
  height:36px;
}
#market-set-detail #market-card-table tbody td {
  height:36px;
  max-height:36px;
}
#market-set-detail #market-card-table td:nth-child(5) {
  white-space:nowrap;
}
#market-set-detail .market-card-check-disabled {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
  vertical-align:middle;
  cursor:not-allowed;
}
#market-set-detail .market-card-check-disabled .market-card-check {
  margin:0;
  pointer-events:none;
  cursor:not-allowed;
  opacity:.55;
}
#market-set-detail .market-card-report-btn {
  min-width:46px;
  height:27px;
  padding:3px 8px;
  border:1px solid #fecaca;
  border-radius:8px;
  background:#fff5f5;
  color:#c62828;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
#market-set-detail .market-card-report-btn:hover,
#market-set-detail .market-card-report-btn:focus-visible {
  background:#fee2e2;
  border-color:#fca5a5;
  outline:none;
}
#copyright-report textarea[readonly],
#copyright-report input[readonly] {
  background:#f8fafc;
  color:#334155;
}

/* =========================================================
   Memowna UI v67
   Compact and consistent My Learning Cards tables
   ========================================================= */

/* Normalize all selection checkboxes in the My Learning Cards area. */
#qna input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  accent-color: var(--primary);
  box-sizing: border-box;
}

/* My Card Sets: compact rows while preserving readability. */
#qna #set-list-table th,
#qna #set-list-table td {
  height: 42px;
  min-height: 42px;
  padding: 6px 10px;
  line-height: 1.25;
  vertical-align: middle;
}
#qna #set-list-table th {
  height: 36px;
  min-height: 36px;
  padding-top: 5px;
  padding-bottom: 5px;
}
#qna #set-list-table td:last-child .btn {
  min-height: 32px;
  height: 32px;
  padding: 5px 10px;
  line-height: 1.15;
}
#qna #set-list-table .set-name-link {
  min-height: 0;
  line-height: 1.25;
}

/* Card Set Editor: restore normal checkboxes and reduce excessive row/input height. */
#qna .editor-grid th,
#qna .editor-grid td {
  height: 40px;
  min-height: 40px;
  padding: 4px 8px;
  line-height: 1.2;
  vertical-align: middle;
}
#qna .editor-grid thead th {
  height: 36px;
  min-height: 36px;
  padding-top: 5px;
  padding-bottom: 5px;
}
#qna .editor-grid tbody tr {
  height: 40px;
}
#qna .editor-grid input[type="text"] {
  height: 32px;
  min-height: 32px;
  padding: 5px 8px;
  line-height: 1.2;
  border-color: #9fbab7;
  background: #fff;
}
#qna .editor-grid .drag-handle {
  font-size: 17px;
  line-height: 1;
}
#qna .editor-grid .origin-cell {
  font-size: 13px;
  line-height: 1.2;
}
#qna .editor-grid .btn.danger {
  min-height: 30px;
  height: 30px;
  padding: 4px 9px;
  font-size: 13px;
}

/* Card Library: compact every row and action consistently. */
#qna #card-library-table th,
#qna #card-library-table td {
  height: 40px;
  min-height: 40px;
  padding: 5px 9px;
  line-height: 1.2;
  vertical-align: middle;
}
#qna #card-library-table thead th {
  height: 36px;
  min-height: 36px;
}
#qna #card-library-table tbody tr {
  height: 40px;
}
#qna #card-library-table .btn.danger {
  min-height: 30px;
  height: 30px;
  padding: 4px 9px;
  font-size: 13px;
}

/* Keep checkbox columns centered in all three submenus. */
#qna #set-list-table th:first-child,
#qna #set-list-table td:first-child,
#qna .editor-grid th:first-child,
#qna .editor-grid td:first-child,
#qna #card-library-table th:first-child,
#qna #card-library-table td:first-child {
  text-align: center;
  vertical-align: middle;
}
#qna #set-list-table th:first-child input,
#qna #set-list-table td:first-child input,
#qna .editor-grid th:first-child input,
#qna .editor-grid td:first-child input,
#qna #card-library-table th:first-child input,
#qna #card-library-table td:first-child input {
  display: block;
  margin: 0 auto;
}

/* Do not let scroll wrappers add visual height around compact tables. */
#qna .editor-grid-wrap,
#qna .table-wrap {
  scrollbar-gutter: stable;
}

@media (max-width: 700px) {
  #qna #set-list-table th,
  #qna #set-list-table td,
  #qna .editor-grid th,
  #qna .editor-grid td,
  #qna #card-library-table th,
  #qna #card-library-table td {
    padding-left: 7px;
    padding-right: 7px;
  }
}


/* UI first-release shared density and dialog standards */
table thead tr{height:var(--table-header-height)}
table tbody tr{height:var(--table-row-height)}
table th,table td{padding:6px 10px;vertical-align:middle}
table input:not([type="checkbox"]),table select{min-height:34px;height:34px;padding-top:5px;padding-bottom:5px}
.btn.small,table .btn{min-height:var(--small-action-height);padding:5px 9px}
input:not([type="checkbox"]):not([type="radio"]),select{min-height:var(--control-height)}
.memowna-dialog-backdrop{position:fixed;inset:0;z-index:10000;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.55);backdrop-filter:blur(2px)}
.memowna-dialog-backdrop.active{display:flex}
.memowna-dialog-card{width:min(520px,100%);display:flex;gap:16px;background:#fff;border:1px solid #dbe7e4;border-radius:18px;padding:22px;box-shadow:0 24px 70px rgba(15,23,42,.25)}
.memowna-dialog-icon{width:40px;height:40px;flex:0 0 40px;border-radius:50%;display:grid;place-items:center;background:var(--primary-soft);color:#0f766e;font-size:20px;font-weight:900}
.memowna-dialog-backdrop[data-type="error"] .memowna-dialog-icon{background:#fee2e2;color:#b91c1c}
.memowna-dialog-backdrop[data-type="confirm"] .memowna-dialog-icon{background:#fff4d8;color:#9a5b00}
.memowna-dialog-content{min-width:0;flex:1}.memowna-dialog-content h3{margin:2px 0 10px}.memowna-dialog-message{white-space:pre-line;line-height:1.65;color:#374151;overflow-wrap:anywhere}
.memowna-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.dialog-open{overflow:hidden}
.memowna-truncated-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:help}
@media(max-width:768px){.memowna-truncated-text{cursor:pointer}.memowna-dialog-card{padding:18px}.memowna-dialog-icon{width:34px;height:34px;flex-basis:34px}}


/* Memowna UI v1.0.5 — per-generation whole ZIP download */
#mypage .download-table{min-width:1080px!important}
#mypage .download-table th:nth-child(1){width:29%!important}
#mypage .download-table th:nth-child(2){width:12%!important}
#mypage .download-table th:nth-child(3){width:10%!important}
#mypage .download-table th:nth-child(4){width:11%!important}
#mypage .download-table th:nth-child(5){width:38%!important}
.history-format-actions{display:grid!important;grid-template-columns:repeat(5,minmax(54px,1fr))!important;gap:3px!important;width:100%!important;max-width:none!important}
.history-format-button{width:100%;max-width:none!important;justify-content:center}
.history-bundle-button{border-color:#f0b34a!important;color:#8a5300!important;background:#fffaf0!important}
.history-bundle-button.is-ready:hover{border-color:#e79a18!important;background:#fff3d6!important}
@media(max-width:1100px){.history-format-actions{grid-template-columns:repeat(5,minmax(52px,1fr))!important}}

/* Memowna UI v1.0.6 — keep all five history download buttons on one line */
#mypage .download-table{
  min-width:1040px!important;
}
#mypage .download-table th:nth-child(1){width:28%!important}
#mypage .download-table th:nth-child(2){width:9%!important}
#mypage .download-table th:nth-child(3){width:9%!important}
#mypage .download-table th:nth-child(4){width:10%!important}
#mypage .download-table th:nth-child(5){width:44%!important}
#mypage .download-table th:nth-child(2),
#mypage .download-table td:nth-child(2),
#mypage .download-table th:nth-child(3),
#mypage .download-table td:nth-child(3),
#mypage .download-table th:nth-child(4),
#mypage .download-table td:nth-child(4){
  padding-left:4px!important;
  padding-right:4px!important;
}
.history-format-actions{
  display:grid!important;
  grid-template-columns:52px 52px 50px minmax(108px,1fr) 82px!important;
  column-gap:4px!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
}
.history-format-button,
.history-format-button:nth-child(1),
.history-format-button:nth-child(2),
.history-format-button:nth-child(3),
.history-format-button:nth-child(4),
.history-bundle-button{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
.history-format-button span{
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}
@media(max-width:1100px){
  #mypage .download-table{min-width:1040px!important}
}

/* Memowna UI v1.0.7 — desktop history table without horizontal scrolling */
#mypage .history-table-shell,
#mypage .history-table-scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}
#mypage .download-table{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
}
#mypage .download-table th:nth-child(1){width:25%!important}
#mypage .download-table th:nth-child(2){width:8%!important}
#mypage .download-table th:nth-child(3){width:9%!important}
#mypage .download-table th:nth-child(4){width:10%!important}
#mypage .download-table th:nth-child(5){width:48%!important}
#mypage .download-table th,
#mypage .download-table td{
  padding-left:5px!important;
  padding-right:5px!important;
}
#mypage .download-table th:nth-child(2),
#mypage .download-table td:nth-child(2),
#mypage .download-table th:nth-child(3),
#mypage .download-table td:nth-child(3),
#mypage .download-table th:nth-child(4),
#mypage .download-table td:nth-child(4){
  padding-left:2px!important;
  padding-right:2px!important;
  font-size:13px!important;
}
#mypage .history-created-cell{
  font-variant-numeric:tabular-nums;
  letter-spacing:-.35px;
}
#mypage .history-actions-cell{
  overflow:visible!important;
  padding-left:3px!important;
  padding-right:3px!important;
}
.history-format-actions{
  display:grid!important;
  grid-template-columns:47px 47px 45px minmax(96px,1fr) 72px!important;
  gap:3px!important;
  align-items:center!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
.history-format-button,
.history-format-button:nth-child(1),
.history-format-button:nth-child(2),
.history-format-button:nth-child(3),
.history-format-button:nth-child(4),
.history-bundle-button{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:25px!important;
  padding:2px 3px!important;
  font-size:10px!important;
  gap:1px!important;
  box-sizing:border-box!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
.history-format-button span{
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}
.regen-chip{
  min-width:0!important;
  max-width:100%!important;
  padding-left:5px!important;
  padding-right:5px!important;
  font-size:10.5px!important;
  white-space:nowrap!important;
}
@media (min-width:901px) and (max-width:1366px){
  #mypage .download-table th{font-size:13px!important}
  #mypage .download-table td{font-size:13px!important}
  #mypage .download-table th:nth-child(1){width:24%!important}
  #mypage .download-table th:nth-child(2){width:8%!important}
  #mypage .download-table th:nth-child(3){width:9%!important}
  #mypage .download-table th:nth-child(4){width:10%!important}
  #mypage .download-table th:nth-child(5){width:49%!important}
  .history-format-actions{grid-template-columns:45px 45px 43px minmax(92px,1fr) 68px!important;gap:2px!important}
  .history-format-button,.history-bundle-button{font-size:9.5px!important;padding-left:2px!important;padding-right:2px!important}
}
@media(max-width:900px){
  #mypage .history-table-scroll{overflow-x:hidden!important}
  #mypage .download-table{min-width:0!important}
}

/* Memowna UI v1.0.8 — balanced one-line history downloads */
#mypage .download-table th:nth-child(1){width:33%!important}
#mypage .download-table th:nth-child(2){width:8%!important}
#mypage .download-table th:nth-child(3){width:9%!important}
#mypage .download-table th:nth-child(4){width:10%!important}
#mypage .download-table th:nth-child(5){width:40%!important}
#mypage .history-actions-cell{padding-left:5px!important;padding-right:5px!important}
.history-format-actions{
  display:grid!important;
  grid-template-columns:44px 44px 42px 118px 72px!important;
  gap:4px!important;
  justify-content:center!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
}
.history-format-button,
.history-bundle-button{
  height:27px!important;
  padding:2px 4px!important;
  font-size:10.5px!important;
  line-height:1!important;
  gap:2px!important;
}
.history-format-button:nth-child(4){
  min-width:118px!important;
  max-width:118px!important;
}
.history-bundle-button{
  min-width:72px!important;
  max-width:72px!important;
}
@media (min-width:901px) and (max-width:1366px){
  #mypage .download-table th:nth-child(1){width:32%!important}
  #mypage .download-table th:nth-child(2){width:8%!important}
  #mypage .download-table th:nth-child(3){width:9%!important}
  #mypage .download-table th:nth-child(4){width:10%!important}
  #mypage .download-table th:nth-child(5){width:41%!important}
  .history-format-actions{grid-template-columns:42px 42px 40px 114px 70px!important;gap:3px!important}
  .history-format-button,.history-bundle-button{font-size:10px!important}
  .history-format-button:nth-child(4){min-width:114px!important;max-width:114px!important}
  .history-bundle-button{min-width:70px!important;max-width:70px!important}
}

/* Memowna UI v1.0.10 — finalized compact download component */
#mypage .download-table th:nth-child(1){width:34%!important}
#mypage .download-table th:nth-child(2){width:8%!important}
#mypage .download-table th:nth-child(3){width:9%!important}
#mypage .download-table th:nth-child(4){width:10%!important}
#mypage .download-table th:nth-child(5){width:39%!important}
#mypage .history-actions-cell{padding-left:6px!important;padding-right:6px!important}
.history-format-actions{
  display:grid!important;
  grid-template-columns:48px 48px 48px 82px 58px!important;
  gap:5px!important;
  justify-content:center!important;
  align-items:center!important;
  width:max-content!important;
  max-width:100%!important;
  margin:0 auto!important;
}
.history-format-button,
.history-bundle-button{
  min-width:0!important;
  max-width:none!important;
  width:100%!important;
  height:29px!important;
  padding:3px 5px!important;
  border-radius:7px!important;
  font-size:11px!important;
  line-height:1!important;
  gap:3px!important;
  justify-content:center!important;
  white-space:nowrap!important;
  box-sizing:border-box!important;
}
.history-format-button:nth-child(4),
.history-bundle-button{
  min-width:0!important;
  max-width:none!important;
}
.history-format-button span{overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important}
.history-bundle-button{font-weight:800!important}
@media (min-width:901px) and (max-width:1366px){
  #mypage .download-table th:nth-child(1){width:33%!important}
  #mypage .download-table th:nth-child(2){width:8%!important}
  #mypage .download-table th:nth-child(3){width:9%!important}
  #mypage .download-table th:nth-child(4){width:10%!important}
  #mypage .download-table th:nth-child(5){width:40%!important}
  .history-format-actions{grid-template-columns:46px 46px 46px 78px 56px!important;gap:4px!important}
  .history-format-button,.history-bundle-button{font-size:10.5px!important;padding-left:4px!important;padding-right:4px!important}
}

/* UI v1.0.10: free-regeneration exit and mobile ordering */
.free-order-cell{display:flex;align-items:center;justify-content:center;gap:5px;min-width:82px}
.free-order-number{min-width:18px;text-align:center}
.free-order-buttons{display:none;gap:2px}
.free-order-button{width:24px;height:24px;padding:0;border:1px solid #b8d6d2;border-radius:6px;background:#fff;color:#176b65;font-size:10px;line-height:1;cursor:pointer}
.free-order-button:disabled{opacity:.35;cursor:not-allowed}
@media(max-width:700px){
  .free-regeneration-banner .btn{width:100%}
  .free-order-handle{display:none}
  .free-order-buttons{display:inline-flex}
  .free-regeneration-active #direct-entry-body tr,.free-regeneration-active #direct-entry-body tr:active{cursor:default}
}


/* UI v1.0.11: persistent free-regeneration status and navigation reset */
.free-regeneration-active #free-regeneration-banner{
  position:sticky;
  top:72px;
  z-index:45;
  box-shadow:0 8px 22px rgba(20,88,82,.12);
}
@media(max-width:1100px){
  .free-regeneration-active #free-regeneration-banner{top:64px}
}
@media(max-width:700px){
  .free-regeneration-active #free-regeneration-banner{
    top:58px;
    padding:10px 12px;
    gap:10px;
  }
  .free-regeneration-active #free-regeneration-banner p{font-size:12px;line-height:1.45}
}

.checkout-actions{display:grid;grid-template-columns:minmax(110px,.32fr) minmax(220px,1fr);gap:12px;margin-top:16px}
.checkout-actions .btn{width:100%;min-height:46px}
@media(max-width:640px){.checkout-actions{grid-template-columns:1fr}.checkout-actions #checkout-confirm-button{order:1}.checkout-actions #checkout-cancel-button{order:2}}

/* UI v1.0.16 — retention-policy state consistency */
.history-bundle-button.is-disabled,
.history-bundle-button:disabled{
  border-color:#e3e8e7!important;
  background:#f4f6f6!important;
  color:#a6afad!important;
  cursor:not-allowed!important;
  opacity:.72!important;
}
.regen-chip.regen-expired{
  min-width:64px!important;
  border-color:#d8dfdd!important;
  background:#f3f5f5!important;
  color:#7a8583!important;
}


/* UI v1.0.17 — Why Memowna section-based scroll experience */
@media (min-width:981px){
  html.why-scroll-snap{
    scroll-snap-type:y proximity;
    scroll-padding-top:var(--why-header-offset,70px);
  }
  .why-page .why-snap-section{
    scroll-snap-align:start;
    scroll-snap-stop:always;
    scroll-margin-top:var(--why-header-offset,70px);
    min-height:calc(100svh - var(--why-header-offset,70px));
  }
  .why-page .why-hero,
  .why-page .cycle-stage,
  .why-page .output-feature-stage{
    display:flex;
    align-items:center;
  }
  .why-page .why-hero>.why-wrap,
  .why-page .cycle-stage>.why-wrap,
  .why-page .output-feature-stage>.why-wrap{
    width:min(1160px,calc(100% - 40px));
  }
  .why-page .why-cta{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height:max(420px,calc(100svh - var(--why-header-offset,70px) - 228px));
  }
}

/* Common notebook-height PCs: keep each story block visually coherent without shrinking text excessively. */
@media (min-width:981px) and (max-height:950px){
  .why-page .why-hero{padding:42px 0 38px}
  .why-page .cycle-stage .why-section{padding:24px 0 28px}
  .why-page .cycle-stage h2{font-size:clamp(30px,3.3vw,43px)}
  .why-page .cycle-shell{height:500px;margin-top:20px}
  .why-page .node-2,.why-page .node-6{top:80px}
  .why-page .node-3,.why-page .node-5{bottom:80px}
  .why-page .cycle-center{width:350px;height:188px}
  .why-page .output-feature-stage .why-section{padding:28px 0}
  .why-page .output-feature-grid{margin-top:20px;gap:46px}
  .why-page .output-format-list{padding:20px}
  .why-page .output-format-row{min-height:76px;padding:12px 16px;margin-top:9px}
  .why-page .output-format-icon{width:42px;height:42px;flex-basis:42px;font-size:23px}
  .why-page .output-feature-copy h3{margin-top:14px;font-size:clamp(31px,3.3vw,43px)}
  .why-page .output-feature-copy>p{margin-top:18px;font-size:16px;line-height:1.75}
  .why-page .output-feature-highlight{margin-top:20px;padding:18px 22px}
  .why-page .why-cta{padding:72px 0 82px}
}

@media (max-width:700px){
  .why-page{margin-left:-14px;margin-right:-14px}
}

@media (prefers-reduced-motion:reduce){
  html.why-scroll-snap{scroll-snap-type:none}
}



/* UI v1.0.19 — Why Memowna desktop wheel navigation
   JS resolves each meaningful wheel gesture to the next/previous story section.
   CSS proximity snap remains as a fallback for scrollbar/keyboard scrolling. */
@media (min-width:981px){
  html.why-scroll-snap.why-wheel-scrolling{
    scroll-behavior:smooth;
  }
}

/* UI v1.0.18 — market category/topic taxonomy */
.market-filter-toolbar > input,
.market-filter-toolbar > select { flex:1 1 150px; min-width:0; }
.market-filter-toolbar #market-keyword-filter { flex-basis:210px; }
.market-filter-toolbar #market-seller-filter { flex-basis:120px; }
.market-filter-toolbar #market-filter-button { flex:0 0 auto; }
.market-filter-hidden, .market-page-hidden { display:none !important; }
.market-filter-empty { margin:14px 0 4px; padding:16px; border:1px dashed var(--line); border-radius:12px; background:#fbfdfc; color:var(--muted); text-align:center; font-weight:700; }
.seller-product-modal-card { width:min(780px,100%); }
.seller-product-modal-head { align-items:flex-start; }
.seller-product-modal-head h3 { margin:6px 0 6px; }
.seller-product-modal-head p { margin:0; }
.seller-product-form-grid { margin-top:16px; }
.seller-product-span-2 { grid-column:1 / -1; }
.seller-product-rights-check { display:flex; align-items:flex-start; gap:9px; margin-top:16px; padding:13px 14px; border:1px solid #d7e7e3; border-radius:12px; background:#f7fffd; font-size:14px; line-height:1.55; }
.seller-product-rights-check input { margin-top:3px; accent-color:var(--primary); }
.seller-product-modal-actions { justify-content:flex-end; margin:18px 0 0; }
.seller-product-taxonomy { display:block; margin-top:4px; color:var(--muted); font-size:12px; font-weight:600; }
.seller-product-edit-btn { margin-top:7px; border:0; padding:3px 7px; border-radius:7px; background:var(--primary-soft); color:#0f766e; font-size:12px; font-weight:800; }
.seller-products-table td:first-child { min-width:220px; }
#seller-topic-search-wrap small,
#seller-topic-suggestion-wrap small { display:block; margin-top:6px; line-height:1.45; }
@media(max-width:720px){
  .market-filter-toolbar > input,
  .market-filter-toolbar > select,
  .market-filter-toolbar #market-filter-button { flex:1 1 100%; width:100%; }
  .seller-product-form-grid { grid-template-columns:1fr; }
  .seller-product-span-2 { grid-column:auto; }
  .seller-product-modal-actions { display:grid; grid-template-columns:1fr 1fr; }
  .seller-product-modal-actions .btn { width:100%; }
}

/* UI v1.0.18 — seller taxonomy modal finishing */
.seller-product-modal-head .btn { white-space:nowrap; flex:0 0 auto; }
.seller-product-modal-card { padding:18px 20px; max-height:calc(100vh - 32px); }
.seller-product-form-grid { gap:12px 14px; margin-top:12px; }
.seller-product-form-grid .field textarea { min-height:76px; }
.seller-product-rights-check { margin-top:12px; padding:10px 12px; }
.seller-product-modal-actions { margin-top:14px; }
@media(max-width:720px){
  .seller-product-modal-card { padding:16px; max-height:calc(100vh - 20px); }
  .seller-product-modal-head { gap:10px; }
  .seller-product-modal-head .btn { padding:9px 11px; }
}


/* UI v1.0.20 — Market checkout compact summary and purchased-card handoff */
#market-checkout.market-checkout-page{
  max-width:680px;
  margin:44px auto;
}
#market-checkout .card{padding:30px}
#market-checkout .market-checkout-table-wrap{
  overflow:hidden;
  max-width:100%;
}
#market-checkout .market-checkout-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
#market-checkout .market-checkout-table th,
#market-checkout .market-checkout-table td{
  min-width:0;
  vertical-align:middle;
}
#market-checkout .market-checkout-table th:nth-child(1),
#market-checkout .market-checkout-table td:nth-child(1){width:50%}
#market-checkout .market-checkout-table th:nth-child(2),
#market-checkout .market-checkout-table td:nth-child(2){width:20%;text-align:center;white-space:nowrap}
#market-checkout .market-checkout-table th:nth-child(3),
#market-checkout .market-checkout-table td:nth-child(3){width:30%;text-align:center;white-space:nowrap}
#market-checkout .market-checkout-content-cell{overflow:hidden}
#market-checkout .market-checkout-title{
  display:block;
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  cursor:help;
  outline:none;
}
#market-checkout .market-checkout-title:focus-visible{
  border-radius:6px;
  box-shadow:0 0 0 3px rgba(20,184,166,.18);
}
#card-library-table tbody tr.recent-market-purchase td{
  background:#ecfdf9;
  transition:background-color 1.2s ease;
}
@media(max-width:700px){
  #market-checkout.market-checkout-page{max-width:none;margin:20px 0}
  #market-checkout .card{padding:18px}
  #market-checkout .market-checkout-table th,
  #market-checkout .market-checkout-table td{padding:10px 7px;font-size:13px}
  #market-checkout .market-checkout-table th:nth-child(1),
  #market-checkout .market-checkout-table td:nth-child(1){width:48%}
  #market-checkout .market-checkout-table th:nth-child(2),
  #market-checkout .market-checkout-table td:nth-child(2){width:22%}
  #market-checkout .market-checkout-table th:nth-child(3),
  #market-checkout .market-checkout-table td:nth-child(3){width:30%}
}


/* UI v1.0.21 — Why Memowna vertical balance */
/* The four-format story block is taller than the other Why sections.
   Give it its own compact rhythm so the visual center stays aligned instead of
   inheriting the generic 88px section padding. */
@media (min-width:981px){
  .why-page .output-feature-stage .why-section{
    padding:42px 0;
  }
  .why-page .output-feature-grid{
    margin-top:30px;
  }
}
@media (min-width:981px) and (max-height:1050px){
  .why-page .output-feature-stage .why-section{
    padding:24px 0 28px;
  }
  .why-page .output-feature-grid{
    margin-top:18px;
  }
}


/* =========================================================
   Memowna UI v1.0.24 — final UI stabilization
   Header alignment, set→generator handoff, mobile summary cards.
   ========================================================= */
/* Every table header shares one visual axis. Body alignment remains content-specific. */
table thead th{
  text-align:center;
  vertical-align:middle;
}
.pricing-rule-table td{
  text-align:center;
  vertical-align:middle;
}
#qna #set-list-table td:nth-child(4),
#qna #set-list-table td:nth-child(5),
#qna #set-list-table td:nth-child(6){text-align:center}

/* Card Set Editor: keep drag handle + 1~50 order number on one line. */
#qna .editor-grid th:nth-child(2){width:82px}
#qna .editor-grid td:nth-child(2){
  text-align:center;
  white-space:nowrap;
}
#qna .editor-grid td:nth-child(2) .drag-handle,
#qna .editor-grid td:nth-child(2) .row-number{
  display:inline-block;
  vertical-align:middle;
}
#qna .editor-grid td:nth-child(2) .drag-handle{margin-right:4px}

/* Subpage headings never split awkwardly on narrow screens. */
.subpage-header h2{white-space:nowrap}

@media(max-width:700px){
  .subpage-header{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }
  .subpage-header h2{width:100%;margin:0}
  .subpage-header-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
    gap:8px;
  }
  .subpage-header-actions .btn{width:100%;margin:0;white-space:nowrap}

  /* My Card Sets becomes a mobile card list instead of an undiscoverable horizontal table. */
  #qna .table-wrap:has(#set-list-table){overflow:visible;max-height:none}
  #qna #set-list-table{display:block;width:100%;min-width:0;border-collapse:separate}
  #qna #set-list-table thead{display:none}
  #qna #set-list-table tbody{display:grid;gap:10px}
  #qna #set-list-table tbody tr{
    display:grid;
    grid-template-columns:34px minmax(0,1fr) auto;
    grid-template-rows:auto auto auto auto;
    gap:5px 10px;
    height:auto;
    min-height:0;
    padding:14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    box-shadow:0 6px 18px rgba(15,23,42,.04);
  }
  #qna #set-list-table tbody td{
    display:block;
    width:auto!important;
    height:auto;
    min-height:0;
    padding:0;
    border:0;
    text-align:left;
    overflow:visible;
  }
  #qna #set-list-table tbody td:nth-child(1){grid-column:1;grid-row:1 / 4;padding-top:3px;text-align:center}
  #qna #set-list-table tbody td:nth-child(2){grid-column:2 / 4;grid-row:1;font-weight:800}
  #qna #set-list-table tbody td:nth-child(3){grid-column:2 / 4;grid-row:2;color:var(--muted);font-size:13px}
  #qna #set-list-table tbody td:nth-child(4){grid-column:2;grid-row:3;text-align:left;font-size:13px;color:#475569}
  #qna #set-list-table tbody td:nth-child(4)::before{content:'카드 ';color:var(--muted);font-weight:600}
  #qna #set-list-table tbody td:nth-child(5){grid-column:3;grid-row:3;text-align:right;font-size:13px;color:#475569}
  #qna #set-list-table tbody td:nth-child(5)::before{content:'수정 ';color:var(--muted);font-weight:600}
  #qna #set-list-table tbody td:nth-child(6){grid-column:1 / 4;grid-row:4;margin-top:5px}
  #qna #set-list-table tbody td:nth-child(6) .btn{width:100%;height:36px;min-height:36px}

  /* Pricing: all price choices are visible at once with no inner horizontal swipe. */
  .pricing-rule-table{display:block;width:100%;min-width:0}
  .pricing-rule-table thead{display:none}
  .pricing-rule-table tbody{display:grid;gap:10px}
  .pricing-rule-table tbody tr{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px 14px;
    height:auto;
    padding:14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
  }
  .pricing-rule-table tbody td{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    height:auto;
    min-height:0;
    padding:0;
    border:0;
    text-align:right;
    font-size:13px;
  }
  .pricing-rule-table tbody td:first-child{
    grid-column:1 / -1;
    padding-bottom:8px;
    border-bottom:1px solid #edf1f0;
    font-weight:850;
    font-size:14px;
    text-align:left;
  }
  .pricing-rule-table tbody td::before{content:attr(data-label);color:var(--muted);font-size:12px;font-weight:700;text-align:left}
  .pricing-rule-table tbody td:first-child::before{display:none}

  /* Payment history: compact receipt cards; no clipped '결제 내역' heading or hidden columns. */
  #payments .table-wrap{overflow:visible}
  .payment-history-table{display:block;width:100%;min-width:0}
  .payment-history-table thead{display:none}
  .payment-history-table tbody{display:grid;gap:10px}
  .payment-history-table tbody tr{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px 14px;
    height:auto;
    padding:14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
  }
  .payment-history-table tbody td{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
    height:auto;
    min-height:0;
    padding:0;
    border:0;
    text-align:right!important;
    font-size:13px;
  }
  .payment-history-table tbody td:nth-child(3){grid-column:1 / -1;text-align:right!important}
  .payment-history-table tbody td::before{content:attr(data-label);color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap;text-align:left}

  /* Seller products also stay readable without a hidden horizontal table. */
  #seller .table-wrap:has(.seller-products-table){overflow:visible}
  .seller-products-table{display:block;width:100%;min-width:0}
  .seller-products-table thead{display:none}
  .seller-products-table tbody{display:grid;gap:10px}
  .seller-products-table tbody tr{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px 14px;
    height:auto;
    padding:14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
  }
  .seller-products-table tbody td{
    display:block;
    min-width:0!important;
    height:auto;
    min-height:0;
    padding:0;
    border:0;
    text-align:right;
    font-size:13px;
  }
  .seller-products-table tbody td:first-child{grid-column:1 / -1;text-align:left;padding-bottom:8px;border-bottom:1px solid #edf1f0}
  .seller-products-table tbody td:not(:first-child)::before{display:block;margin-bottom:3px;color:var(--muted);font-size:12px;font-weight:700;text-align:right}
  .seller-products-table tbody td:nth-child(2)::before{content:'상품·판매 카드'}
  .seller-products-table tbody td:nth-child(3)::before{content:'판매액'}
  .seller-products-table tbody td:nth-child(4)::before{content:'수수료'}
  .seller-products-table tbody td:nth-child(5)::before{content:'정산 상태'}
}

/* v1.0.24 mobile card readability refinement after visual QA */
@media(max-width:700px){
  .pricing-rule-table tbody tr{gap:10px}
  .pricing-rule-table tbody td:not(:first-child){
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:3px;
    min-height:48px;
    padding:8px 10px;
    border-radius:9px;
    background:#f8faf9;
    text-align:left;
    line-height:1.25;
  }
  .pricing-rule-table tbody td:not(:first-child)::before{
    display:block;
    margin:0;
    color:var(--muted);
    font-size:11px;
    font-weight:750;
    line-height:1.2;
  }

  .payment-history-table tbody tr{gap:10px 12px}
  .payment-history-table tbody td{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:3px;
    min-width:0;
    text-align:left!important;
    line-height:1.35;
  }
  .payment-history-table tbody td:nth-child(3),
  .payment-history-table tbody td:nth-child(6){grid-column:1 / -1}
  .payment-history-table tbody td::before{
    display:block;
    margin:0;
    color:var(--muted);
    font-size:11px;
    font-weight:750;
    line-height:1.2;
  }
  .payment-history-table tbody td:nth-child(3){
    padding:8px 0;
    border-top:1px solid #edf1f0;
    border-bottom:1px solid #edf1f0;
  }

  .seller-products-table tbody tr{gap:10px 12px}
  .seller-products-table tbody td:not(:first-child){
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:3px;
    min-width:0!important;
    padding:7px 9px;
    border-radius:9px;
    background:#f8faf9;
    text-align:left;
    line-height:1.3;
  }
  .seller-products-table tbody td:not(:first-child)::before{
    margin:0;
    text-align:left;
    font-size:11px;
    line-height:1.2;
  }
}

/* v1.0.24 mobile table-row height reset: shared density tokens must not cap card layouts. */
@media(max-width:700px){
  .pricing-rule-table tbody tr,
  .payment-history-table tbody tr,
  .seller-products-table tbody tr,
  #qna #set-list-table tbody tr{
    height:auto!important;
    min-height:0!important;
  }
}


/* =========================================================
   Memowna UI v1.0.26 — Market cart and minimum-payment flow
   ========================================================= */
.header-cart-button{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 11px;font-weight:800;white-space:nowrap;color:var(--text)}
.header-cart-button:hover{border-color:#a9ddd8;background:var(--primary-soft);color:var(--primary)}
.cart-count-badge{display:inline-grid;place-items:center;min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:var(--accent);color:#fff;font-size:12px;font-weight:900;line-height:1}
.mobile-drawer-nav .cart-count-badge{margin-left:5px}
.market-cart-page-button{white-space:nowrap}
.market-cart-page{max-width:1020px;margin:0 auto}
.market-cart-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}
.market-cart-overview>div{border:1px solid var(--line);border-radius:14px;padding:14px 16px;background:#fbfdfc}
.market-cart-overview span{display:block;font-size:13px;margin-bottom:5px}
.market-cart-overview strong{display:block;font-size:20px}
.market-cart-overview .money{font-size:22px}
.market-cart-table-wrap{overflow:hidden}
.market-cart-table{min-width:0;table-layout:fixed}
.market-cart-table th,.market-cart-table td{vertical-align:middle}
.market-cart-table th:nth-child(1),.market-cart-table td:nth-child(1){width:43%}
.market-cart-table th:nth-child(2),.market-cart-table td:nth-child(2){width:17%;text-align:center;white-space:nowrap}
.market-cart-table th:nth-child(3),.market-cart-table td:nth-child(3){width:12%;text-align:center;white-space:nowrap}
.market-cart-table th:nth-child(4),.market-cart-table td:nth-child(4){width:16%;text-align:center;white-space:nowrap}
.market-cart-table th:nth-child(5),.market-cart-table td:nth-child(5){width:12%;text-align:center;white-space:nowrap}
.market-cart-title-cell{overflow:hidden}
.market-cart-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:help}
.market-cart-remove{padding:7px 10px;font-size:13px}
.market-cart-empty{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;min-height:150px;border:1px dashed #cfdad6;border-radius:14px;color:var(--muted);background:#fbfdfc}
.market-cart-empty[hidden]{display:none}
.market-cart-empty b{color:var(--text)}
.market-cart-checkout-box{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px;padding:18px;border:1px solid #f6d99b;background:#fffdf7;border-radius:16px}
.market-cart-checkout-box .money{margin-top:4px}
.market-cart-checkout-box .btn{min-width:190px;min-height:48px}
.market-minimum-message{margin:7px 0 0;color:#b45309;font-size:13px;font-weight:700}
.market-minimum-message.is-ready{color:#047857}
#market-checkout.market-checkout-page{max-width:820px;margin:44px auto}
#market-checkout .market-checkout-table-wrap{overflow:hidden;max-width:100%}
#market-checkout .market-checkout-table{width:100%;min-width:0;table-layout:fixed}
#market-checkout .market-checkout-table th,#market-checkout .market-checkout-table td{min-width:0;vertical-align:middle}
#market-checkout .market-checkout-table th:nth-child(1),#market-checkout .market-checkout-table td:nth-child(1){width:44%}
#market-checkout .market-checkout-table th:nth-child(2),#market-checkout .market-checkout-table td:nth-child(2){width:20%;text-align:center;white-space:nowrap}
#market-checkout .market-checkout-table th:nth-child(3),#market-checkout .market-checkout-table td:nth-child(3){width:14%;text-align:center;white-space:nowrap}
#market-checkout .market-checkout-table th:nth-child(4),#market-checkout .market-checkout-table td:nth-child(4){width:22%;text-align:center;white-space:nowrap}
#market-checkout .market-checkout-content-cell{overflow:hidden}
#market-checkout .market-checkout-title{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:help}
.market-payment-heading{margin:18px 0 10px}
.market-payment-methods{margin-bottom:14px}
.market-purchase-policy-box{border:1px solid #f3d69a;background:#fffaf0;border-radius:14px;padding:14px 16px;margin-top:14px}
.market-purchase-policy-box b{display:block;margin-bottom:6px;font-size:14px;line-height:1.45}
.market-purchase-policy-box p{margin:0;color:#5f6672;font-size:13px;line-height:1.65}
.market-purchase-policy-box .market-phase2-payment-note{margin-top:8px;padding-top:8px;border-top:1px dashed #e7c57e;color:#9a5b05;font-size:12px;font-weight:800}
.market-checkout-agreement{display:flex;align-items:flex-start;gap:8px;margin-top:14px;font-size:13px;font-weight:700;line-height:1.6}
.market-checkout-agreement input{margin-top:4px;flex:0 0 auto}
.market-checkout-total-box{margin-top:14px}
.market-checkout-actions{margin-top:16px}
.payment-issue-button{padding:7px 9px;font-size:12px;white-space:nowrap}
.payment-history-table th:nth-child(7),.payment-history-table td:nth-child(7){text-align:center;white-space:nowrap}
.recent-market-payment td{background:#ecfdf9}

@media(max-width:1100px) and (min-width:901px){.header-cart-label{display:none}.header-cart-button{padding:9px}}
@media(max-width:700px){
  .market-cart-page{max-width:none;margin:0}
  .market-cart-overview{grid-template-columns:1fr 1fr}
  .market-cart-overview>div:last-child{grid-column:1/-1}
  .market-cart-table-wrap{border:0;overflow:visible}
  .market-cart-table{display:block;min-width:0;background:transparent}
  .market-cart-table thead{display:none}
  .market-cart-table tbody{display:grid;gap:10px}
  .market-cart-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;height:auto!important;min-height:0!important;border:1px solid var(--line);border-radius:14px;padding:13px;background:#fff;box-shadow:0 4px 14px rgba(31,41,55,.04)}
  .market-cart-table tbody td{display:flex!important;justify-content:space-between;align-items:center;gap:12px;width:auto!important;height:auto!important;min-height:0!important;padding:3px 0!important;border:0!important;text-align:right!important;white-space:normal!important;overflow:visible!important}
  .market-cart-table tbody td::before{content:attr(data-label);font-size:12px;font-weight:800;color:var(--muted);text-align:left;white-space:nowrap}
  .market-cart-table tbody td:nth-child(1),.market-cart-table tbody td:nth-child(5){grid-column:1/-1}
  .market-cart-title{max-width:68%;text-align:right}
  .market-cart-checkout-box{align-items:stretch;flex-direction:column}
  .market-cart-checkout-box .btn{width:100%;min-width:0}
  #market-checkout.market-checkout-page{max-width:none;margin:20px 0}
  #market-checkout .card{padding:18px}
  #market-checkout .market-checkout-table-wrap{border:0;overflow:visible}
  #market-checkout .market-checkout-table{display:block;min-width:0;background:transparent}
  #market-checkout .market-checkout-table thead{display:none}
  #market-checkout .market-checkout-table tbody{display:grid;gap:10px}
  #market-checkout .market-checkout-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;height:auto!important;min-height:0!important;border:1px solid var(--line);border-radius:14px;padding:13px;background:#fff}
  #market-checkout .market-checkout-table tbody td{display:flex!important;justify-content:space-between;align-items:center;gap:12px;width:auto!important;height:auto!important;min-height:0!important;padding:3px 0!important;border:0!important;text-align:right!important;white-space:normal!important;overflow:visible!important}
  #market-checkout .market-checkout-table tbody td::before{content:attr(data-label);font-size:12px;font-weight:800;color:var(--muted);text-align:left;white-space:nowrap}
  #market-checkout .market-checkout-table tbody td:nth-child(1){grid-column:1/-1}
  #market-checkout .market-checkout-title{max-width:68%;text-align:right}
}

/* v1.0.27 — explain the market minimum without making it look like a Memowna upsell rule. */
.market-minimum-row{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;margin-top:7px}
.market-minimum-row .market-minimum-message{margin:0;flex:1 1 420px}
.market-minimum-help{appearance:none;border:0;background:transparent;padding:0;color:#64748b;font:inherit;font-size:12px;font-weight:700;text-decoration:underline;text-underline-offset:3px;cursor:pointer;white-space:nowrap}
.market-minimum-help:hover,.market-minimum-help:focus-visible{color:#0f766e}
@media(max-width:640px){.market-minimum-row{gap:7px}.market-minimum-help{font-size:12px}}
.market-cart-header .subpage-header-actions{flex:0 0 auto}
.market-cart-header .subpage-header-actions .btn{white-space:nowrap}

/* UI v1.0.28 — Home section-based scroll experience.
   Desktop advances one story block at a time; mobile keeps natural scrolling. */
.market-cart-intro{line-height:1.65}
@media (min-width:981px){
  html.home-scroll-snap{
    scroll-snap-type:y proximity;
    scroll-padding-top:var(--home-header-offset,70px);
  }
  #home .home-snap-section{
    scroll-snap-align:start;
    scroll-snap-stop:always;
    scroll-margin-top:var(--home-header-offset,70px);
    min-height:calc(100svh - var(--home-header-offset,70px));
    display:flex;
    flex-direction:column;
    justify-content:center;
    width:100%;
  }
  #home .home-story-hero .hero{width:100%;padding:32px 0}
  #home .home-story-demo .home-demo{width:100%;margin:0}
  #home .home-story-cycle>.trust-strip,
  #home .home-story-cycle>.flow,
  #home .home-story-cycle>.card{width:100%}
  html.home-scroll-snap.home-wheel-scrolling{scroll-behavior:smooth}
}
@media (min-width:981px) and (max-height:950px){
  #home .home-story-hero .hero{padding:20px 0}
  #home .home-story-demo .home-demo{padding:20px}
  #home .home-story-cycle .trust-strip{margin:8px 0 10px}
  #home .home-story-cycle .trust-item{padding:11px 14px}
  #home .home-story-cycle .flow{margin:12px 0 14px;gap:14px}
  #home .home-story-cycle .flow-card{padding:18px 16px}
  #home .home-story-cycle .flow-card .big-icon{font-size:34px;margin-bottom:7px}
  #home .home-story-cycle .flow-card h3{margin-bottom:8px}
  #home .home-story-cycle .flow-card p{margin:0 0 12px;line-height:1.5;min-height:48px}
  #home .home-story-cycle>.card{padding:17px 20px}
  #home .home-story-cycle>.card h3{margin-bottom:8px}
  #home .home-story-cycle>.card p{margin:0 0 12px}
}
@media (prefers-reduced-motion:reduce){
  html.home-scroll-snap{scroll-snap-type:none}
}



/* UI v1.0.29 — Home now uses two story sections.
   The value proposition and input/result demo form one continuous first story. */
@media (min-width:981px){
  #home .home-story-intro{gap:14px}
  #home .home-story-intro>.hero,
  #home .home-story-intro>.home-demo{width:100%;margin:0}
  #home .home-story-intro>.hero{padding:12px 0}
}
@media (min-width:981px) and (max-height:950px){
  #home .home-story-intro{gap:10px}
  #home .home-story-intro>.hero{padding:0}
  #home .home-story-intro>.hero h1{font-size:48px;line-height:1.08;margin-bottom:14px}
  #home .home-story-intro>.hero p{font-size:17px;line-height:1.55;margin-top:0;margin-bottom:12px}
  #home .home-story-intro .hero-card{padding:20px;border-radius:22px}
  #home .home-story-intro .output-format-grid{gap:9px;margin-top:14px}
  #home .home-story-intro .output-format{padding:12px 14px}
  #home .home-story-intro .hero-output-note{margin-top:12px;padding:10px 12px}
  #home .home-story-intro>.home-demo{padding:16px 18px;gap:14px}
  #home .home-story-intro .home-demo-copy h3{font-size:21px;margin-bottom:5px}
  #home .home-story-intro .home-demo-copy p{line-height:1.55}
  #home .home-story-intro .demo-side{padding:11px 13px}
  #home .home-story-intro .demo-side b{margin-bottom:4px}
  #home .home-story-intro .demo-result-heading{margin-top:8px;padding-top:8px}
  #home .home-story-intro .demo-output-actions{margin-top:7px;gap:7px}
  #home .home-story-intro .demo-output-button{min-height:48px;padding:8px 10px}
}


/* UI v1.0.30 — Engine-backed generation progress. */
.engine-progress{margin:12px 0 8px;padding:12px 14px;border:1px solid #c8e7df;border-radius:12px;background:#fff}
.engine-progress[hidden]{display:none}
.engine-progress-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:13px}
.engine-progress-meta b{font-size:15px;color:#087e73}
.engine-progress-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#566274}
.engine-progress-track{height:12px;overflow:hidden;border-radius:999px;background:#e7eeec;box-shadow:inset 0 0 0 1px rgba(7,126,115,.08)}
.engine-progress-track>span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#12aaa1,#f5a623);transition:width .28s ease}
.engine-progress.is-complete .engine-progress-track>span{background:#12aaa1}
.engine-progress.is-failed .engine-progress-track>span{background:#d85c5c}
.history-progress-block{margin-top:7px;max-width:270px}
.history-progress-line{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#596575}
.history-progress-line b{color:#087e73;white-space:nowrap}
.history-progress-line span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-progress-track{height:6px;margin-top:4px;border-radius:999px;background:#e8efed;overflow:hidden}
.history-progress-track>span{display:block;height:100%;border-radius:999px;background:#18aaa0}
@media(max-width:768px){
  .engine-progress-meta{align-items:flex-start;flex-direction:column;gap:3px}
  .history-progress-block{max-width:none;width:100%;margin-top:8px}
}


/* UI v1.0.33 — My Page is the single generation queue/progress/download surface. */
#mypage .history-actions-cell .history-progress-block{margin:0;width:100%;max-width:none}
#mypage .history-actions-cell .history-progress-line{font-size:12px;gap:10px}
#mypage .history-actions-cell .history-progress-line b{font-size:12px}
#mypage .history-actions-cell .history-progress-track{height:7px;margin-top:6px}
.history-generation-state{display:flex;flex-direction:column;gap:5px;width:100%;padding:3px 4px}
.history-generation-state>small{font-size:10.5px;line-height:1.3;color:#6b7280;text-align:left}
.history-generation-failed{display:flex;align-items:center;justify-content:center;gap:7px;min-height:30px;padding:5px 8px;border:1px solid #f0b6b6;border-radius:8px;background:#fff4f4;color:#a63a3a;font-size:11.5px;overflow:hidden}
.history-generation-failed b{white-space:nowrap}
.history-generation-failed span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:768px){
  .history-generation-state{padding:2px 0}
  .history-generation-state>small{text-align:left}
  .history-generation-failed{justify-content:flex-start}
}


/* UI v1.0.38 real account authentication states */
.auth-status-note{min-height:20px;margin:8px 0 14px;font-size:13px;color:var(--muted)}
.auth-status-note:empty{display:none}
.auth-status-note.error{display:block;color:#b42318;background:#fff4f2;border:1px solid #fecaca;border-radius:10px;padding:9px 10px}
.auth-status-note.success{display:block;color:#067647;background:#ecfdf3;border:1px solid #a7f3d0;border-radius:10px;padding:9px 10px}
.auth-consent{display:flex;gap:8px;align-items:flex-start;margin-top:14px;line-height:1.45}
.auth-consent input{margin-top:3px;flex:0 0 auto}
.auth-consent-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-top:14px}
.auth-consent-row .auth-consent{margin-top:0;min-width:0;flex:1}
.auth-policy-link{flex:0 0 auto;border:0;background:transparent;padding:0;color:#0f766e;font:inherit;font-weight:800;text-decoration:underline;text-underline-offset:3px;line-height:1.45;cursor:pointer}
.auth-policy-link:hover,.auth-policy-link:focus-visible{color:#115e59}
@media(max-width:560px){.auth-consent-row{gap:8px}.auth-policy-link{font-size:.92rem}}
.auth-submit-button:disabled{cursor:wait;opacity:.72}
.auth .field small{display:block;margin-top:5px}

/* =========================================================
   Memowna UI v1.0.43 — user-facing card ID removal
   Card IDs remain internal in row data/Firestore and are not displayed.
   ========================================================= */
#qna #card-library-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
#qna #card-library-table th:first-child { width: 4%; }
#qna #card-library-table th:nth-child(2) { width: 28%; }
#qna #card-library-table th:nth-child(3) { width: 30%; }
#qna #card-library-table th:nth-child(4) { width: 13%; }
#qna #card-library-table th:nth-child(5) { width: 8%; }
#qna #card-library-table th:nth-child(6) { width: 10%; }
#qna #card-library-table th:nth-child(7) { width: 7%; }
#qna #card-library-table td:nth-child(2),
#qna #card-library-table td:nth-child(3),
#qna #card-library-table td:nth-child(4),
#qna #card-library-table td:nth-child(5),
#qna #card-library-table td:nth-child(6) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#qna .table-wrap:has(#card-library-table) { overflow-x: hidden; }
@media (max-width: 700px) {
  #qna .table-wrap:has(#card-library-table) { overflow-x: auto; }
  #qna #card-library-table { min-width: 760px; }
}


/* =========================================================
   Memowna UI v1.0.45 — card-library alignment and history list management
   ========================================================= */
#qna #card-library-table thead th:nth-child(2),
#qna #card-library-table thead th:nth-child(3) { text-align:center; }
#qna #card-library-table tbody td:nth-child(2),
#qna #card-library-table tbody td:nth-child(3) { text-align:left; }
.mypage-history-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.download-table .history-manage-head{width:86px;min-width:86px}
.history-manage-cell{width:86px;min-width:86px;text-align:center;white-space:nowrap}
.history-manage-cell .history-hide-select{vertical-align:middle;margin:0 5px 0 0}
.history-delete-button{border:0;border-radius:8px;background:#fee2e2;color:#c52b2b;font-weight:800;font-size:11px;padding:5px 7px;cursor:pointer}
.history-delete-button:hover{background:#fecaca}
.history-delete-disabled{font-size:10.5px;color:#8a989b;white-space:nowrap}
.mobile-history-delete{margin-left:auto}
@media(max-width:700px){
  .mypage-history-toolbar{width:100%;justify-content:stretch}
  .mypage-history-toolbar .btn{flex:1}
  #hide-history-selected-action{display:none}
}


/* =========================================================
   Memowna UI v1.0.50 — Toss Payments test checkout Phase 2
   ========================================================= */
.market-toss-payment-wrap{margin:10px 0 4px;border:1px solid #dce9e6;border-radius:16px;background:#fff;overflow:hidden}
.market-toss-payment-method,.market-toss-payment-agreement{min-height:72px}
.market-toss-payment-agreement{border-top:1px solid #edf3f1}
.market-payment-provider-note{margin:0;padding:10px 14px 12px;border-top:1px solid #edf3f1;font-size:12px;line-height:1.5}
.market-payment-provider-note[data-tone=ok]{color:#087e73;background:#f4fffc}
.market-payment-provider-note[data-tone=error]{color:#b42318;background:#fff7f6}
#market-checkout-confirm-button[aria-busy=true]{cursor:wait;opacity:.75}
@media(max-width:700px){
  .market-toss-payment-wrap{border-radius:14px}
  .market-payment-provider-note{padding:9px 12px 11px}
}

/* UI v1.0.57: server-backed purchase history and purchase-issue state */
.status-review{color:#a16207;font-weight:700}.status-error{color:#b42318;font-weight:700}.payment-issue-button:disabled{opacity:.68;cursor:not-allowed}


/* UI v1.0.66 — market single-card pricing + rating removal + popularity sort */
.market-filter-toolbar #market-sort-order { flex:0 1 130px; }
.market-list { min-width:980px; }
.market-list th:nth-child(1) { width:23%; }
.market-list th:nth-child(2) { width:8%; }
.market-list th:nth-child(3) { width:11%; }
.market-list th:nth-child(4) { width:8%; }
.market-list th:nth-child(5) { width:28%; }
.market-list th:nth-child(6) { width:10%; }
.market-list th:nth-child(7) { width:12%; }
.market-list .market-unit-price { font-weight:850; color:var(--primary); text-align:center; }
.market-mobile-price > div > b { color:var(--primary); }
#seller-product-unit-price + small { display:block; margin-top:6px; line-height:1.45; }
@media(max-width:720px){
  .market-filter-toolbar #market-sort-order { flex:1 1 100%; width:100%; }
}


/* UI v1.0.71 Seller Entity Phase 5B registration/status foundation */
.seller-registration-card{max-width:1100px;margin-left:auto;margin-right:auto}
.seller-registration-card .form-grid{margin-top:14px}
.seller-private-field small{display:block;margin-top:6px;color:var(--muted,#667085);line-height:1.45}
.seller-agreement-box{margin:16px 0;padding:14px 16px;border:1px solid var(--line,#e5e7eb);border-radius:12px;background:var(--surface-soft,#fafafa)}
.seller-agreement-box label{display:block;margin:8px 0;line-height:1.5}
.seller-status-value{font-size:1.35rem;font-weight:800;margin:8px 0}
.seller-profile-details{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1.45fr) repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.seller-profile-details>div{padding:12px;border:1px solid var(--line,#e5e7eb);border-radius:10px;min-width:0}
.seller-profile-details span,.seller-profile-details strong{display:block}
.seller-profile-details strong{margin-top:6px;overflow-wrap:anywhere}
.seller-safety-notice{margin-top:16px;padding:14px 16px;border-radius:12px;background:#fff8e7;border:1px solid #f3d48a}
.seller-safety-notice p{margin:6px 0 0;line-height:1.55}
#market-detail-content-accuracy-note>b,
#market-intermediary-disclosure>b,
#market-content-accuracy-disclosure>b{font-size:14px;line-height:1.45}
#market-detail-content-accuracy-note p,
#market-intermediary-disclosure p,
#market-content-accuracy-disclosure p{font-size:13px;line-height:1.65}
@media (max-width: 900px){.seller-profile-details{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 560px){.seller-profile-details{grid-template-columns:1fr}.seller-registration-card{padding:16px}}


/* UI v1.0.72 Phase 5C — buyer-facing purchase contract confirmation. */
.payment-history-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.payment-history-actions .btn{white-space:nowrap}
.market-contract-confirmation-dialog{width:min(900px,96vw);max-height:92vh;overflow:hidden;display:flex;flex-direction:column}
.market-contract-confirmation-body{overflow:auto;padding:2px 2px 10px}
.contract-confirmation-document{color:#18212f;font-size:13px;line-height:1.55}
.contract-confirmation-title{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border-bottom:2px solid #213547;padding:4px 0 14px;margin-bottom:14px}
.contract-confirmation-title h2{margin:2px 0 0;font-size:24px}.contract-confirmation-brand{font-weight:900;letter-spacing:.02em;color:#0f766e}.contract-confirmation-doc-id{text-align:right;font-size:11px;color:var(--muted);word-break:break-all}.contract-confirmation-doc-id strong{color:#18212f}
.contract-confirmation-lead{padding:11px 13px;border:1px solid #c9e4e1;background:#f7fffd;border-radius:10px}
.contract-confirmation-document section{margin-top:18px}.contract-confirmation-document h4{margin:0 0 9px;font-size:15px}
.contract-confirmation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:10px;overflow:hidden;margin:0}
.contract-confirmation-grid>div{display:grid;grid-template-columns:130px minmax(0,1fr);border-bottom:1px solid var(--line)}.contract-confirmation-grid>div:nth-child(odd){border-right:1px solid var(--line)}.contract-confirmation-grid>div:nth-last-child(-n+2){border-bottom:0}.contract-confirmation-grid dt,.contract-confirmation-grid dd{margin:0;padding:9px 10px}.contract-confirmation-grid dt{font-weight:800;background:#f7f9fb}.contract-confirmation-grid dd{word-break:break-word}
.contract-confirmation-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:10px}.contract-confirmation-table-wrap table{width:100%;border-collapse:collapse;min-width:700px}.contract-confirmation-table-wrap th,.contract-confirmation-table-wrap td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:center;vertical-align:middle}.contract-confirmation-table-wrap td:first-child,.contract-confirmation-table-wrap td:nth-child(2){text-align:left}.contract-confirmation-table-wrap th{background:#f7f9fb}.contract-confirmation-table-wrap tr:last-child td{border-bottom:0}
.contract-confirmation-caution{margin:9px 0 0;padding:9px 11px;background:#fffaf0;border:1px solid #f0d6a2;border-radius:9px;font-size:12px}.contract-confirmation-footer{margin-top:20px;padding-top:10px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
@media(max-width:720px){.payment-history-actions{justify-content:flex-end}.market-contract-confirmation-dialog{width:100%;max-height:96vh;padding:16px}.contract-confirmation-grid{grid-template-columns:1fr}.contract-confirmation-grid>div,.contract-confirmation-grid>div:nth-child(odd){border-right:0;border-bottom:1px solid var(--line)}.contract-confirmation-grid>div:last-child{border-bottom:0}.contract-confirmation-title{flex-direction:column}.contract-confirmation-doc-id{text-align:left}.contract-confirmation-table-wrap table{min-width:640px}}
@media print{
  @page{size:A4;margin:12mm 12mm 14mm}
  body>*:not(#market-contract-confirmation-modal){display:none!important}
  #market-contract-confirmation-modal{display:block!important;position:static!important;background:#fff!important;padding:0!important}
  #market-contract-confirmation-modal .market-contract-confirmation-dialog{width:100%!important;max-height:none!important;overflow:visible!important;border:0!important;box-shadow:none!important;padding:0!important}
  #market-contract-confirmation-modal .market-contract-confirmation-body{overflow:visible!important;padding:0!important}
  .contract-confirmation-no-print{display:none!important}

  /* UI v1.0.74 — print/PDF layout hardening only. */
  .contract-confirmation-document{font-size:9.5pt;line-height:1.42;color:#000}
  .contract-confirmation-title{gap:12px;padding:2px 0 9px;margin-bottom:9px;break-inside:avoid-page;page-break-inside:avoid}
  .contract-confirmation-title h2{font-size:19pt;margin-top:1px}
  .contract-confirmation-doc-id{font-size:8.5pt;max-width:46%;word-break:break-all}
  .contract-confirmation-lead{margin:0;padding:8px 10px;border-radius:7px;break-inside:avoid-page;page-break-inside:avoid}
  .contract-confirmation-document section{margin-top:11px}
  .contract-confirmation-document h4{font-size:11pt;margin:0 0 6px;break-after:avoid-page;page-break-after:avoid}

  /* Short contract sections should move as a unit instead of being fragmented.
     The purchase-item section (2nd section) may span pages when many items exist. */
  .contract-confirmation-document section:not(:nth-of-type(2)){break-inside:avoid-page;page-break-inside:avoid}
  .contract-confirmation-grid{grid-template-columns:repeat(2,minmax(0,1fr));break-inside:avoid-page;page-break-inside:avoid;border-radius:7px}
  .contract-confirmation-grid>div{grid-template-columns:37mm minmax(0,1fr);break-inside:avoid-page;page-break-inside:avoid}
  .contract-confirmation-grid dt,.contract-confirmation-grid dd{padding:6px 8px}
  .contract-confirmation-grid dt{white-space:nowrap;word-break:keep-all}
  .contract-confirmation-grid dd{word-break:keep-all;overflow-wrap:anywhere}

  .contract-confirmation-table-wrap{overflow:visible!important;border-radius:7px;break-inside:auto;page-break-inside:auto}
  .contract-confirmation-table-wrap table{width:100%!important;min-width:0!important;table-layout:fixed}
  .contract-confirmation-table-wrap thead{display:table-header-group}
  .contract-confirmation-table-wrap tr{break-inside:avoid-page;page-break-inside:avoid}
  .contract-confirmation-table-wrap th,.contract-confirmation-table-wrap td{padding:6px 7px;word-break:keep-all;overflow-wrap:normal}
  .contract-confirmation-table-wrap th:nth-child(1){width:29%}
  .contract-confirmation-table-wrap th:nth-child(2){width:39%}
  .contract-confirmation-table-wrap th:nth-child(3){width:9%}
  .contract-confirmation-table-wrap th:nth-child(4){width:12%}
  .contract-confirmation-table-wrap th:nth-child(5){width:11%}
  .contract-confirmation-table-wrap th:nth-child(3),
  .contract-confirmation-table-wrap td:nth-child(3),
  .contract-confirmation-table-wrap th:nth-child(4),
  .contract-confirmation-table-wrap td:nth-child(4),
  .contract-confirmation-table-wrap th:nth-child(5),
  .contract-confirmation-table-wrap td:nth-child(5){white-space:nowrap}
  .contract-confirmation-table-wrap td:nth-child(1),
  .contract-confirmation-table-wrap td:nth-child(2){overflow-wrap:anywhere}
  .contract-confirmation-table-wrap small{font-size:8pt;line-height:1.35}

  .contract-confirmation-caution{margin-top:6px;padding:7px 9px;font-size:8.5pt;break-inside:avoid-page;page-break-inside:avoid}
  .contract-confirmation-footer{margin-top:12px;padding-top:7px;font-size:8pt;break-inside:avoid-page;page-break-inside:avoid}
}


/* =========================================================
   Memowna UI v1.0.73 — payment history desktop readability hotfix
   Keep short semantic fields on one line and reserve wrapping for the content column.
   Mobile (<=700px) keeps the existing receipt-card layout unchanged.
   ========================================================= */
@media (min-width:701px){
  .payment-history-table th,
  .payment-history-table td{
    word-break:keep-all;
    overflow-wrap:normal;
  }
  .payment-history-table th:nth-child(1),
  .payment-history-table td:nth-child(1),
  .payment-history-table th:nth-child(2),
  .payment-history-table td:nth-child(2),
  .payment-history-table th:nth-child(4),
  .payment-history-table td:nth-child(4),
  .payment-history-table th:nth-child(5),
  .payment-history-table td:nth-child(5),
  .payment-history-table th:nth-child(6),
  .payment-history-table td:nth-child(6),
  .payment-history-table th:nth-child(7),
  .payment-history-table td:nth-child(7){
    white-space:nowrap;
  }
  .payment-history-table th:nth-child(3),
  .payment-history-table td:nth-child(3){
    white-space:normal;
  }
}
@media (min-width:1100px){
  .payment-history-table{
    width:100%;
    min-width:0;
    table-layout:fixed;
  }
  .payment-history-table th,
  .payment-history-table td{
    padding-left:10px;
    padding-right:10px;
  }
  .payment-history-table th:nth-child(1){width:8.5%}
  .payment-history-table th:nth-child(2){width:7.5%}
  .payment-history-table th:nth-child(3){width:34%}
  .payment-history-table th:nth-child(4){width:11%}
  .payment-history-table th:nth-child(5){width:7%}
  .payment-history-table th:nth-child(6){width:16.5%}
  .payment-history-table th:nth-child(7){width:15.5%}
}

/* v1.0.85 seller agreement/readiness */
.seller-agreement-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.seller-agreement-heading p{margin:0}
.seller-agreement-hash{font-size:.78rem;word-break:break-all}
.seller-terms-details{margin:12px 0;border:1px solid var(--line,#e5e7eb);border-radius:10px;background:var(--surface,#fff)}
.seller-terms-details summary{cursor:pointer;padding:11px 12px;font-weight:700}
.seller-terms-content{max-height:360px;overflow:auto;border-top:1px solid var(--line,#e5e7eb);padding:14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:.9rem}
.seller-rights-text{margin:10px 0 4px;line-height:1.55}
.seller-agreement-update{margin-top:16px;padding:14px 16px;border:1px solid var(--line,#e5e7eb);border-radius:12px;background:var(--surface-soft,#fafafa)}
.seller-agreement-update label{display:block;margin:8px 0;line-height:1.5}
.seller-agreement-update .btn{margin-top:8px}
@media (max-width:560px){.seller-terms-content{max-height:300px;padding:12px}.seller-agreement-heading{display:block}.seller-agreement-hash{display:block;margin-top:4px}}


/* =========================================================
   Memowna UI v1.0.90 — compact six-column payment history
   Keep transaction type visible, move payment method to detail view,
   keep normal statuses short, and keep management actions on one line.
   ========================================================= */
@media (min-width:701px){
  .payment-history-table{width:100%;min-width:0;table-layout:fixed}
  .payment-history-table th,.payment-history-table td{padding:4px 8px;line-height:1.2}
  .payment-history-table tbody tr{height:38px;min-height:38px}
  .payment-history-table th:nth-child(1){width:8.5%}
  .payment-history-table th:nth-child(2){width:8%}
  .payment-history-table th:nth-child(3){width:40%}
  .payment-history-table th:nth-child(4){width:8%}
  .payment-history-table th:nth-child(5){width:16%}
  .payment-history-table th:nth-child(6){width:19.5%}
  .payment-history-table th:nth-child(1),.payment-history-table td:nth-child(1),
  .payment-history-table th:nth-child(2),.payment-history-table td:nth-child(2),
  .payment-history-table th:nth-child(4),.payment-history-table td:nth-child(4),
  .payment-history-table th:nth-child(5),.payment-history-table td:nth-child(5),
  .payment-history-table th:nth-child(6),.payment-history-table td:nth-child(6){white-space:nowrap}
  .payment-history-table th:nth-child(3),.payment-history-table td:nth-child(3){white-space:normal}
  .payment-history-actions{flex-wrap:nowrap;gap:5px}
  .payment-history-actions .btn,.payment-generation-history-button{min-height:28px;padding:4px 8px;font-size:12px;line-height:1.1;white-space:nowrap}
}
@media (max-width:700px){
  .payment-history-table tbody td:nth-child(3),
  .payment-history-table tbody td:nth-child(5),
  .payment-history-table tbody td:nth-child(6){grid-column:1 / -1}
  .payment-history-actions{flex-wrap:wrap;justify-content:flex-start}
}
.generation-history-payment-target{outline:3px solid rgba(15,118,110,.28);outline-offset:-2px;background:#f0fdfa!important;transition:background .2s ease,outline-color .2s ease}


/* =========================================================
   Memowna UI v1.0.91 — low-risk visual polish
   Generator step alignment, clearer source button, simpler market filters,
   compact sticky subpage headers, history table grid repair, cycle hover,
   and first-screen content discovery cues.
   ========================================================= */

/* 1) Compact generator progress: keep number and title vertically centered. */
#generator .steps.is-compact .step{
  align-content:center;
  align-items:center;
}
#generator .steps.is-compact .step>span{
  align-self:center;
}
#generator .steps.is-compact .step>b,
#generator .steps.is-compact .step>b.step-title-long{
  align-self:center;
  margin:0;
}

/* 2) Non-selected source mode must still read as an actionable button. */
.source-switch button:not(.active){
  border-color:#aebfbc;
  color:#172033;
  box-shadow:0 1px 0 rgba(15,23,42,.03);
}
.source-switch button:not(.active):hover,
.source-switch button:not(.active):focus-visible{
  border-color:#6f9691;
  background:#f8fbfa;
  outline:none;
}

/* 3) Market toolbar expands naturally after removing the low-value card-count filter. */
#market .toolbar #market-keyword-filter{flex:1 1 220px;min-width:190px}
#market .toolbar #market-category-filter,
#market .toolbar #market-topic-filter{flex:1 1 150px;min-width:135px}
#market .toolbar #market-seller-filter{flex:1 1 130px;min-width:120px}
#market .toolbar #market-sort-order{flex:0 1 130px;min-width:115px}

/* 4/5) Keep only the compact page identity/actions visible beneath the global header. */
.payments-sticky-summary,
.mypage-sticky-summary{
  position:sticky;
  top:70px;
  z-index:17;
  margin-top:0;
  padding:10px 4px;
  background:rgba(247,250,249,.96);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(145,170,165,.28);
}
.payments-sticky-summary{margin-bottom:12px}
.mypage-sticky-summary{margin-bottom:12px}
@media(max-width:700px){
  .payments-sticky-summary,
  .mypage-sticky-summary{top:62px;padding:8px 2px}
  .mypage-sticky-summary .muted{display:none}
}

/* 5) Generation-history table: one continuous grid, centered vertically. */
#mypage .history-table-shell{
  border:1.5px solid #91aaa5;
  box-shadow:inset 0 0 0 1px rgba(145,170,165,.18);
}
#mypage .history-table-scroll{
  padding-right:0;
  scrollbar-gutter:stable;
}
#mypage .download-table{
  border-collapse:separate;
  border-spacing:0;
}
#mypage .download-table th,
#mypage .download-table td{
  vertical-align:middle!important;
  border-right:1px solid #c5d2d0;
  border-bottom:1px solid #c5d2d0;
}
#mypage .download-table th:last-child,
#mypage .download-table td:last-child{border-right:0}
#mypage .download-table tbody tr:last-child td{border-bottom:0}
#mypage .download-table .history-title-cell{
  vertical-align:middle!important;
}
#mypage .download-table .history-title-button{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  line-height:1.25;
}

/* 6) Learning Cycle: gentle emphasis without disturbing the circular layout. */
.why-page .cycle-node{
  scale:1;
  transition:scale .18s ease,box-shadow .18s ease,border-color .18s ease,filter .18s ease;
  transform-origin:center;
  outline:none;
}
.why-page .cycle-node:hover,
.why-page .cycle-node:focus-visible{
  scale:1.055;
  z-index:7;
  box-shadow:0 20px 46px rgba(31,41,55,.16);
  border-color:#78cfc7;
  filter:saturate(1.04);
}
.why-page .cycle-node.orange:hover,
.why-page .cycle-node.orange:focus-visible{border-color:#efbd68}

/* 7) Home / Why: first-screen cue that disappears as soon as the user scrolls. */
.home-story-intro,
.why-page .why-hero{position:relative}
.page-scroll-cue{
  position:fixed;
  left:50%;
  bottom:18px;
  z-index:19;
  display:inline-flex;
  align-items:center;
  gap:7px;
  transform:translateX(-50%);
  padding:8px 13px;
  border:1px solid #b8d7d3;
  border-radius:999px;
  background:rgba(255,255,255,.94);
  color:#35514f;
  box-shadow:0 8px 24px rgba(31,41,55,.10);
  font-size:12.5px;
  font-weight:800;
  backdrop-filter:blur(8px);
  transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
  animation:memowna-scroll-cue 1.8s ease-in-out infinite;
}
.page-scroll-cue b{font-size:18px;line-height:.8;color:var(--primary)}
.page-scroll-cue:hover,
.page-scroll-cue:focus-visible{
  border-color:#70bbb5;
  color:#0f766e;
  outline:none;
  box-shadow:0 10px 28px rgba(15,118,110,.14);
}
.page-scroll-cue.is-hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateX(-50%) translateY(8px);
  animation:none;
}
@keyframes memowna-scroll-cue{
  0%,100%{translate:0 0}
  50%{translate:0 4px}
}
@media(max-width:700px){
  .page-scroll-cue{bottom:12px;font-size:12px;padding:7px 11px}
}
@media(prefers-reduced-motion:reduce){
  .page-scroll-cue{animation:none}
  .why-page .cycle-node{transition:none}
}


/* =========================================================
   Memowna UI v1.0.93 — page context / Why cue / step-number hotfix
   ========================================================= */

/* Keep the page identity visible on long primary pages, matching My Page. */
.page-context-sticky{
  position:sticky;
  top:70px;
  z-index:17;
  margin-top:0;
  margin-bottom:12px;
  padding:10px 4px;
  background:rgba(247,250,249,.96);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(145,170,165,.28);
}
@media(max-width:700px){
  .page-context-sticky{top:62px;padding:8px 2px}
  #qna .page-context-sticky .muted,
  #market .page-context-sticky .muted,
  #market .page-context-sticky .market-title-rule{display:none}
}

/* Generator has a second sticky layer (the progress guide), so keep it below the page title. */
#generator .steps{top:132px}
#generator [data-generator-section]{scroll-margin-top:205px}
@media(max-width:900px){
  #generator .steps{top:116px}
  #generator [data-generator-section]{scroll-margin-top:188px}
}
@media(max-width:560px){
  #generator .steps{top:112px}
  #generator [data-generator-section]{scroll-margin-top:180px}
}

/* Force the glyph itself into the optical center of every circular step badge. */
#generator .steps .step>span,
#generator .steps.is-compact .step>span{
  display:grid!important;
  place-items:center!important;
  align-self:center!important;
  justify-self:center!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
  text-align:center!important;
}

/* Each Why snap-section owns its own fixed cue; JS exposes only the current section's cue. */
.why-page .why-snap-section{position:relative}

/* =========================================================
   Memowna UI v1.0.94 — generator/market clarity polish
   ========================================================= */

/* Progress guide is navigation, not a checklist: keep 1·2·3·4 visible at all times. */
#generator .steps .step.complete>span,
#generator .steps .step.complete>span::after{
  content:normal!important;
  font-size:inherit!important;
  background:var(--primary)!important;
}

/* Voice fixed samples: one light helper line instead of an internal cache/API explanation box. */
#generator .voice-sample-helper{
  margin:10px 2px 0;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.45;
}

/* Market: preserve page identity and active search controls while browsing long result lists. */
#market{
  --market-sticky-top:70px;
  --market-context-height:0px;
  --market-filter-height:0px;
}
#market .market-filter-toolbar{
  position:sticky;
  top:calc(var(--market-sticky-top) + var(--market-context-height));
  z-index:16;
  margin:0 -2px 12px;
  padding:10px 2px;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid rgba(145,170,165,.24);
  box-shadow:0 8px 18px rgba(31,41,55,.06);
  backdrop-filter:blur(10px);
}
#market .market-list th{
  top:calc(var(--market-sticky-top) + var(--market-context-height) + var(--market-filter-height));
  z-index:15;
}
@media(max-width:700px){
  #market .market-filter-toolbar{
    position:static;
    margin:0 0 12px;
    padding:0;
    border-bottom:0;
    box-shadow:none;
    backdrop-filter:none;
  }
}



/* =========================================================
   Memowna UI v1.0.95 — market sticky-header repair / stronger cycle focus
   ========================================================= */

/* Market results scroll inside .market-list-wrap.
   Keep the column header pinned to the top of that inner scroll container;
   page-level sticky offsets must not be added here. */
#market .market-list thead th,
#market .market-list th{
  top:0!important;
}

/* Make Learning Cycle hover/focus unmistakable while preserving layout. */
.why-page .cycle-node{
  cursor:default;
  transition:scale .2s ease,translate .2s ease,box-shadow .2s ease,border-color .2s ease,filter .2s ease,background .2s ease;
}
.why-page .cycle-node:hover,
.why-page .cycle-node:focus-visible,
.why-page .cycle-node.is-auto-emphasis{
  scale:1.12;
  translate:0 -7px;
  z-index:10;
  background:#fff;
  box-shadow:0 28px 62px rgba(31,41,55,.24),0 0 0 4px rgba(24,167,160,.08);
  border-color:#39b9ae;
  filter:saturate(1.12);
}
.why-page .cycle-node.orange:hover,
.why-page .cycle-node.orange:focus-visible,
.why-page .cycle-node.orange.is-auto-emphasis{
  border-color:#efa629;
  box-shadow:0 28px 62px rgba(31,41,55,.22),0 0 0 4px rgba(244,166,42,.10);
}

/* The center message is the core proposition: give it its own strong focus state. */
.why-page .cycle-center{
  cursor:default;
  scale:1;
  transition:scale .2s ease,box-shadow .2s ease,border-color .2s ease,background .2s ease,filter .2s ease;
  outline:none;
}
.why-page .cycle-center:hover,
.why-page .cycle-center:focus-visible,
.why-page .cycle-center.is-auto-emphasis{
  scale:1.09;
  z-index:11;
  background:linear-gradient(145deg,#ffffff 0%,#f1f3ff 100%);
  border-color:#8292ce;
  box-shadow:0 34px 78px rgba(48,58,92,.26),0 0 0 7px rgba(79,95,159,.09);
  filter:saturate(1.08);
}
.why-page .cycle-center:hover strong em,
.why-page .cycle-center:focus-visible strong em,
.why-page .cycle-center.is-auto-emphasis strong em{
  color:#394c9a;
}

/* Guide first-time visitors through the Learning Cycle without adding controls. */
.why-page .cycle-node.is-auto-emphasis .cycle-num{
  transform:scale(1.08);
  box-shadow:0 0 0 5px rgba(24,167,160,.10);
}
.why-page .cycle-node.orange.is-auto-emphasis .cycle-num{
  box-shadow:0 0 0 5px rgba(244,166,42,.12);
}
.why-page .cycle-center.is-auto-emphasis strong{
  color:#111a32;
}

@media(prefers-reduced-motion:reduce){
  .why-page .cycle-node,
  .why-page .cycle-center{transition:none}
}


/* =========================================================
   Memowna UI v1.0.96 — Market column-header viewport sticky repair
   ========================================================= */
/*
   The desktop Market shows all 10 results in the normal page flow.
   Do not let the wrapper become a scroll container: otherwise sticky <th>
   is scoped to that wrapper and disappears under the page-level sticky stack.
*/
@media(min-width:701px){
  #market .market-list-wrap{
    overflow:visible!important;
  }
  #market .market-list thead th,
  #market .market-list th{
    position:sticky!important;
    top:calc(var(--market-sticky-top) + var(--market-context-height) + var(--market-filter-height))!important;
    z-index:15!important;
    background:#f8fafc!important;
    box-shadow:0 1px 0 #c5d2d0,0 6px 12px rgba(31,41,55,.05);
  }
}


/* =========================================================
   Memowna UI v1.0.97 — Market border continuity / detail-header sticky hotfix
   ========================================================= */
/* The Market result wrapper stays in normal page flow for viewport sticky headers.
   Draw one independent rounded outline and one explicit cell grid so corners do not
   look disconnected when the header becomes sticky. */
@media(min-width:701px){
  #market .market-list-wrap{
    position:relative;
    padding-right:0!important;
    border:0!important;
    border-radius:14px;
    background:#fff;
    box-shadow:none!important;
  }
  #market .market-list-wrap::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:18;
    pointer-events:none;
    border:1.5px solid #91aaa5;
    border-radius:14px;
    box-shadow:inset 0 0 0 1px rgba(145,170,165,.18);
  }
  #market .market-list{
    border-collapse:separate!important;
    border-spacing:0!important;
  }
  #market .market-list th,
  #market .market-list td{
    border-right:1px solid #c5d2d0;
    border-bottom:1px solid #c5d2d0;
  }
  #market .market-list th:last-child,
  #market .market-list td:last-child{
    border-right:0;
  }
  #market .market-list tbody tr:last-child td{
    border-bottom:0;
  }
  #market .market-list thead th:first-child{
    border-top-left-radius:12px;
  }
  #market .market-list thead th:last-child{
    border-top-right-radius:12px;
  }
}

/* Selected-set detail cards scroll inside their own table wrapper.
   Keep the column labels visible while the card rows move underneath. */
#market-set-detail .table-wrap{
  position:relative;
}
#market-set-detail #market-card-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:5!important;
  background:#f8fafc!important;
  box-shadow:0 1px 0 #c5d2d0,0 5px 10px rgba(31,41,55,.04);
}

/* =========================================================
   Memowna UI v1.0.98 — Market opaque sticky stack / 20-set default
   ========================================================= */
/*
   Keep the Market sticky layers visually solid. Sticky offsets are measured from
   element boxes, not margins, so remove inter-layer margins that can expose rows
   moving underneath. Each layer owns an opaque background and a strict z-order.
*/
@media(min-width:701px){
  #market .page-context-sticky{
    z-index:19!important;
    margin-bottom:0!important;
    background:var(--bg)!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    box-shadow:0 1px 0 rgba(145,170,165,.30),0 8px 18px rgba(31,41,55,.035);
    isolation:isolate;
  }
  #market .market-filter-toolbar{
    z-index:18!important;
    margin:0 -2px 0!important;
    background:#fff!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    box-shadow:0 1px 0 #c5d2d0,0 8px 16px rgba(31,41,55,.045);
    isolation:isolate;
  }
  #market .market-list thead th,
  #market .market-list th{
    z-index:17!important;
    background:#f8fafc!important;
    opacity:1!important;
    background-clip:padding-box;
  }
}


/* =========================================================
   Memowna UI v1.0.99 — Market preview watermark / cart review-edit
   ========================================================= */
.market-preview-protection-note{
  display:flex;
  align-items:center;
  gap:7px;
  margin:12px 0 10px;
  padding:9px 12px;
  border:1px solid #cfe9e6;
  border-radius:11px;
  background:#f7fffe;
  color:#52666a;
  font-size:12.5px;
  font-weight:700;
  line-height:1.45;
}
#market-set-detail .market-card-table-wrap{
  position:relative;
  isolation:isolate;
}
#market-set-detail .market-card-table-wrap #market-card-table{
  position:relative;
  z-index:1;
}
#market-set-detail .market-watermark-layer{
  position:absolute;
  z-index:6;
  top:34px;
  right:0;
  bottom:auto;
  left:0;
  overflow:hidden;
  pointer-events:none;
  display:grid;
  grid-template-columns:repeat(var(--market-watermark-columns,3),minmax(0,1fr));
  grid-auto-rows:var(--market-watermark-row-height,48px);
  align-content:start;
  padding:10px 4px;
}
#market-set-detail .market-watermark-stamp{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  color:rgba(16,111,102,.11);
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
  white-space:nowrap;
  transform:rotate(-19deg);
  transform-origin:center;
  text-shadow:0 1px 0 rgba(255,255,255,.72);
  user-select:none;
}
.market-cart-table th:nth-child(1),.market-cart-table td:nth-child(1){width:36%}
.market-cart-table th:nth-child(2),.market-cart-table td:nth-child(2){width:14%}
.market-cart-table th:nth-child(3),.market-cart-table td:nth-child(3){width:10%}
.market-cart-table th:nth-child(4),.market-cart-table td:nth-child(4){width:14%}
.market-cart-table th:nth-child(5),.market-cart-table td:nth-child(5){width:26%}
.market-cart-actions{display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.market-cart-edit,.market-cart-remove{min-height:34px;padding:6px 9px;font-size:12.5px}
@media(max-width:700px){
  #market-set-detail .market-watermark-layer{grid-template-columns:repeat(var(--market-watermark-columns,2),minmax(0,1fr));grid-auto-rows:var(--market-watermark-row-height,44px)}
  #market-set-detail .market-watermark-stamp{font-size:9.5px}
  .market-cart-actions{justify-content:flex-end;flex-wrap:wrap}
}


/* =========================================================
   Memowna UI v1.0.100 — shared long-page sticky context / table-head standard
   ========================================================= */
/*
   Apply only to long subpages that benefit from persistent context.
   Existing Market/My Page specialized sticky systems remain untouched.
*/
.standard-sticky-page{
  --standard-page-sticky-top:70px;
  --standard-page-header-height:62px;
}
.standard-sticky-page>.standard-sticky-page-header{
  position:sticky;
  top:var(--standard-page-sticky-top);
  z-index:18;
  margin-top:0;
  margin-bottom:0;
  padding:10px 4px;
  background:var(--bg);
  border-bottom:1px solid rgba(145,170,165,.30);
  box-shadow:0 7px 16px rgba(31,41,55,.035);
  isolation:isolate;
}
@media(min-width:721px){
  .standard-sticky-page .standard-sticky-table-wrap{
    overflow:visible;
  }
  .standard-sticky-page .standard-sticky-table-wrap thead th{
    position:sticky;
    top:calc(var(--standard-page-sticky-top) + var(--standard-page-header-height));
    z-index:17;
    background:#f8fafc;
    opacity:1;
    background-clip:padding-box;
    box-shadow:0 1px 0 #c5d2d0,0 6px 12px rgba(31,41,55,.045);
  }
}
/* Seller Center uses the same compact page identity/action rule as Payments. */
.seller-sticky-summary{margin-bottom:12px}
/* Payment list no longer needs the always-visible policy note; details/actions carry it. */
#payments>.standard-sticky-page-header{margin-bottom:12px}
@media(max-width:720px){
  .standard-sticky-page>.standard-sticky-page-header{
    top:var(--standard-page-sticky-top);
    padding:8px 2px;
  }
  /* Payment/Seller tables already switch to compact mobile layouts; do not force sticky thead. */
}


/* =========================================================
   Memowna UI v1.0.101 — continuous table outer-frame standard
   ========================================================= */
/*
   One visual owner for every desktop table frame:
   the wrapper draws the rounded outer border; the table only draws its inner grid.
   This prevents clipped/open-looking corners and doubled edges, including sticky tables.
*/
@media(min-width:721px){
  .table-wrap,
  .market-list-wrap,
  .direct-entry-wrap,
  .editor-grid-shell,
  .bulk-card-grid-wrap,
  .history-table-shell,
  .contract-confirmation-table-wrap{
    position:relative;
    border:1.5px solid #91aaa5!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:inset 0 0 0 1px rgba(145,170,165,.18)!important;
    background-clip:padding-box;
  }

  /* No artificial gutter between table content and the right frame. */
  .table-wrap,
  .market-list-wrap,
  .direct-entry-wrap,
  .bulk-card-grid-wrap{
    padding-right:0!important;
  }

  /* The wrapper owns the outer edge; tables keep only their internal grid. */
  .table-wrap>table,
  .market-list-wrap>table,
  .direct-entry-wrap>table,
  .bulk-card-grid-wrap>table,
  .editor-grid-shell table,
  .history-table-shell table,
  .contract-confirmation-table-wrap>table{
    border:0!important;
    border-radius:0!important;
    margin:0!important;
    box-shadow:none!important;
  }

  /* Avoid a doubled lower edge where the last row meets the wrapper frame. */
  .table-wrap>table tbody tr:last-child>td,
  .market-list-wrap>table tbody tr:last-child>td,
  .direct-entry-wrap>table tbody tr:last-child>td,
  .bulk-card-grid-wrap>table tbody tr:last-child>td,
  .editor-grid-shell table tbody tr:last-child>td,
  .history-table-shell table tbody tr:last-child>td,
  .contract-confirmation-table-wrap>table tbody tr:last-child>td{
    border-bottom:0!important;
  }

  /* Initial (non-stuck) top corners visually follow the outer rounded frame. */
  .table-wrap>table thead tr:first-child>th:first-child,
  .market-list-wrap>table thead tr:first-child>th:first-child,
  .direct-entry-wrap>table thead tr:first-child>th:first-child,
  .bulk-card-grid-wrap>table thead tr:first-child>th:first-child,
  .editor-grid-shell table thead tr:first-child>th:first-child,
  .history-table-shell table thead tr:first-child>th:first-child,
  .contract-confirmation-table-wrap>table thead tr:first-child>th:first-child{
    border-top-left-radius:12px;
  }
  .table-wrap>table thead tr:first-child>th:last-child,
  .market-list-wrap>table thead tr:first-child>th:last-child,
  .direct-entry-wrap>table thead tr:first-child>th:last-child,
  .bulk-card-grid-wrap>table thead tr:first-child>th:last-child,
  .editor-grid-shell table thead tr:first-child>th:last-child,
  .history-table-shell table thead tr:first-child>th:last-child,
  .contract-confirmation-table-wrap>table thead tr:first-child>th:last-child{
    border-top-right-radius:12px;
  }

  /* v1.0.97 used a second pseudo outline for Market; the common wrapper frame now owns it. */
  #market .market-list-wrap::after{display:none!important;}
}

/* =========================================================
   Memowna UI v1.0.102 — sticky-table frame closure hotfix
   ========================================================= */
/*
   v1.0.101 gave the wrapper ownership of the border, but sticky table cell
   backgrounds could still visually reach into the rounded-corner area.
   For viewport-sticky tables, clip descendants to the rounded shape without
   creating a new scroll container, then paint one final overlay frame above
   all cells. This keeps sticky behavior while making every corner visibly closed.
*/
@media(min-width:721px){
  .standard-sticky-page .standard-sticky-table-wrap{
    position:relative;
    overflow:visible!important;
    border:0!important;
    border-radius:14px!important;
    background:#fff!important;
    clip-path:inset(0 round 14px);
    box-shadow:none!important;
    isolation:isolate;
  }
  .standard-sticky-page .standard-sticky-table-wrap::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:80;
    pointer-events:none;
    box-sizing:border-box;
    border:1.5px solid #91aaa5;
    border-radius:14px;
    box-shadow:inset 0 0 0 1px rgba(145,170,165,.14);
  }
  .standard-sticky-page .standard-sticky-table-wrap>table{
    width:100%;
    border:0!important;
    border-collapse:separate!important;
    border-spacing:0!important;
    border-radius:0!important;
    margin:0!important;
    box-shadow:none!important;
    background:#fff;
  }
  .standard-sticky-page .standard-sticky-table-wrap>table thead tr:first-child>th:first-child{
    border-top-left-radius:12px!important;
  }
  .standard-sticky-page .standard-sticky-table-wrap>table thead tr:first-child>th:last-child{
    border-top-right-radius:12px!important;
  }
  .standard-sticky-page .standard-sticky-table-wrap>table tbody tr:last-child>td:first-child{
    border-bottom-left-radius:12px!important;
  }
  .standard-sticky-page .standard-sticky-table-wrap>table tbody tr:last-child>td:last-child{
    border-bottom-right-radius:12px!important;
  }
}


/* =========================================================
   Memowna UI v1.0.105 — Home Focus Loop, polished home story
   Home section 2 explains the consumer value in one visual flow:
   skip what is already mastered, keep what needs review, add what is new,
   then rebuild around what matters now.
   ========================================================= */
#home .home-story-focus{
  position:relative;
  padding:24px 0;
}
#home .home-focus-shell{
  width:100%;
  min-height:640px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:38px 48px 36px;
  border:1px solid #c8e7e2;
  border-radius:30px;
  background:
    radial-gradient(circle at 10% 12%,rgba(20,184,166,.13),transparent 30%),
    radial-gradient(circle at 91% 84%,rgba(249,158,11,.12),transparent 31%),
    linear-gradient(135deg,#f7fffd 0%,#ffffff 49%,#fffaf1 100%);
  box-shadow:0 24px 60px rgba(15,23,42,.08);
  overflow:hidden;
}
#home .home-focus-heading{
  max-width:920px;
  margin:0 auto;
  text-align:center;
}
#home .home-focus-eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 11px;
  border-radius:999px;
  background:#e6faf6;
  color:#0f766e;
  font-size:11px;
  font-weight:900;
  letter-spacing:.16em;
}
#home .home-focus-heading h2{
  margin:14px 0 12px;
  font-size:46px;
  line-height:1.08;
  letter-spacing:-.055em;
  color:#1f2937;
  word-break:keep-all;
}
#home .home-focus-heading h2 em{
  color:var(--primary);
  font-style:normal;
}
#home .home-focus-heading>p{
  margin:0 auto;
  max-width:790px;
  color:#607083;
  font-size:17px;
  line-height:1.7;
  word-break:keep-all;
}
#home .home-focus-heading>p b{color:#24364b}

#home .home-focus-flow{
  width:100%;
  max-width:1100px;
  margin:30px auto 0;
  display:grid;
  grid-template-columns:minmax(0,.95fr) 120px minmax(0,1.05fr);
  gap:22px;
  align-items:stretch;
}
#home .home-focus-inputs{
  display:grid;
  gap:11px;
  align-content:center;
}
#home .home-focus-state{
  min-height:92px;
  display:grid;
  grid-template-columns:50px minmax(0,1fr);
  gap:14px;
  align-items:center;
  padding:15px 18px;
  border:1px solid #dbe7e8;
  border-radius:18px;
  background:rgba(255,255,255,.94);
  box-shadow:0 10px 26px rgba(15,23,42,.055);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
#home .home-focus-state:hover{
  transform:translateY(-2px);
  box-shadow:0 15px 30px rgba(15,23,42,.085);
}
#home .home-focus-state .state-icon{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:15px;
  font-size:23px;
  font-weight:950;
}
#home .home-focus-state small{
  display:block;
  margin-bottom:3px;
  font-size:9px;
  font-weight:950;
  letter-spacing:.16em;
}
#home .home-focus-state strong{
  display:block;
  color:#1f2937;
  font-size:16px;
  line-height:1.3;
}
#home .home-focus-state p{
  margin:4px 0 0;
  color:#758195;
  font-size:12px;
  line-height:1.45;
}
#home .home-focus-state.learned{opacity:.78}
#home .home-focus-state.learned .state-icon{background:#eef2f5;color:#64748b}
#home .home-focus-state.learned small{color:#7b8797}
#home .home-focus-state.review{border-color:#b9e3dd;background:#f8fffd}
#home .home-focus-state.review .state-icon{background:#def7f3;color:#0f766e}
#home .home-focus-state.review small{color:#0f766e}
#home .home-focus-state.new{border-color:#f2d29c;background:#fffaf2}
#home .home-focus-state.new .state-icon{background:#fff0d1;color:#b45309}
#home .home-focus-state.new small{color:#b45309}

#home .home-focus-rebuild{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#607083;
  text-align:center;
}
#home .home-focus-rebuild>span{
  color:#0f766e;
  font-size:9px;
  font-weight:950;
  letter-spacing:.16em;
}
#home .rebuild-orb{
  display:grid;
  place-items:center;
  width:84px;
  height:84px;
  border:1px solid #9fd9d2;
  border-radius:50%;
  background:linear-gradient(145deg,#e8fbf8,#ffffff);
  box-shadow:0 14px 30px rgba(15,118,110,.15),inset 0 0 0 9px rgba(20,184,166,.055);
}
#home .rebuild-orb b{
  color:var(--primary);
  font-size:38px;
  line-height:1;
}
#home .home-focus-rebuild small{
  font-size:11px;
  font-weight:800;
  color:#64748b;
}

#home .home-focus-result{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:27px 28px;
  border:1px solid #9edbd3;
  border-radius:24px;
  background:
    radial-gradient(circle at 88% 12%,rgba(249,158,11,.12),transparent 28%),
    linear-gradient(145deg,#edfffb 0%,#ffffff 55%,#fffaf2 100%);
  box-shadow:0 18px 42px rgba(15,118,110,.10);
  transition:transform .18s ease,box-shadow .18s ease;
}
#home .home-focus-result:hover{
  transform:translateY(-3px);
  box-shadow:0 23px 46px rgba(15,118,110,.15);
}
#home .focus-result-kicker{
  color:#0f766e;
  font-size:9px;
  font-weight:950;
  letter-spacing:.15em;
}
#home .home-focus-result h3{
  margin:8px 0 17px;
  color:#1f2937;
  font-size:28px;
  letter-spacing:-.035em;
}
#home .focus-result-chips{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
#home .focus-result-chips span{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:11px 12px;
  border-radius:14px;
  font-size:14px;
  font-weight:900;
  text-align:center;
}
#home .focus-result-chips .review-chip{background:#ddf7f2;color:#0f766e}
#home .focus-result-chips .new-chip{background:#fff0d0;color:#a95708}
#home .focus-result-message{
  margin-top:18px;
  padding-top:17px;
  border-top:1px dashed #cddfdc;
}
#home .focus-result-message span{
  display:block;
  color:#758195;
  font-size:13px;
}
#home .focus-result-message strong{
  display:block;
  margin-top:4px;
  color:#203047;
  font-size:20px;
  line-height:1.35;
}
#home .focus-result-message strong::first-letter{color:var(--primary)}

#home .home-focus-footer{
  width:100%;
  max-width:1100px;
  margin:24px auto 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding-top:20px;
  border-top:1px solid rgba(148,163,184,.28);
}
#home .home-focus-footer>p{
  margin:0;
  min-width:0;
  color:#617084;
  line-height:1.45;
}
#home .home-focus-footer>p b{
  display:block;
  color:#24364b;
  font-size:15px;
}
#home .home-focus-footer>p span{
  display:block;
  margin-top:4px;
  font-size:12px;
  word-break:keep-all;
}
#home .home-focus-actions{
  flex:0 0 auto;
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
#home .home-focus-actions .btn{white-space:nowrap}

@media(max-width:1120px){
  #home .home-focus-shell{padding:34px;min-height:0}
  #home .home-focus-heading h2{font-size:40px}
  #home .home-focus-flow{grid-template-columns:1fr 90px 1fr;gap:14px}
  #home .rebuild-orb{width:72px;height:72px}
  #home .rebuild-orb b{font-size:32px}
  #home .home-focus-result{padding:23px}
}
@media(max-width:820px){
  #home .home-story-focus{padding:14px 0}
  #home .home-focus-shell{padding:26px 20px;border-radius:22px}
  #home .home-focus-heading h2{font-size:34px;letter-spacing:-.045em}
  #home .home-focus-heading>p{font-size:15.5px;line-height:1.65}
  #home .home-focus-flow{grid-template-columns:1fr;gap:13px;margin-top:24px}
  #home .home-focus-rebuild{flex-direction:row;gap:9px}
  #home .rebuild-orb{width:48px;height:48px}
  #home .rebuild-orb b{font-size:24px}
  #home .home-focus-rebuild>span{display:none}
  #home .home-focus-footer{align-items:stretch;flex-direction:column;gap:14px}
  #home .home-focus-actions{display:grid;grid-template-columns:1fr;justify-content:stretch}
  #home .home-focus-actions .btn{width:100%}
}
@media(max-width:520px){
  #home .home-focus-shell{padding:22px 15px}
  #home .home-focus-heading h2{font-size:30px}
  #home .home-focus-state{grid-template-columns:44px minmax(0,1fr);padding:13px 14px;min-height:82px}
  #home .home-focus-state .state-icon{width:42px;height:42px}
  #home .home-focus-result{padding:20px 17px}
  #home .home-focus-result h3{font-size:24px}
  #home .focus-result-chips{grid-template-columns:1fr}
}


/* =========================================================
   Memowna UI v1.0.106 — Home Focus Loop contrast + Why typography
   Sharpen section 2 to match Home hero brand language and keep
   Why output-section secondary headline visibly subordinate.
   ========================================================= */
#home .home-focus-shell{
  border-color:rgba(20,167,160,.34);
  background:
    linear-gradient(145deg,rgba(20,184,166,.085) 0%,rgba(255,255,255,.97) 52%,rgba(249,158,11,.095) 100%);
  box-shadow:0 22px 54px rgba(31,41,55,.095);
}
#home .home-focus-eyebrow{
  background:#dcf6f2;
  color:#0b756f;
  border:1px solid rgba(20,167,160,.12);
}
#home .home-focus-heading h2 em{color:#128f89}
#home .home-focus-heading>p{color:#526176}
#home .home-focus-state{
  border-color:#cfdedd;
  background:#fff;
  box-shadow:0 10px 24px rgba(31,41,55,.07);
}
#home .home-focus-state.learned{
  opacity:1;
  border-color:#d3dce1;
  background:#fbfcfd;
}
#home .home-focus-state.learned .state-icon{background:#e9eef2;color:#526171}
#home .home-focus-state.learned small{color:#667587}
#home .home-focus-state.review{
  border-color:#8fd3cb;
  background:#f4fcfa;
}
#home .home-focus-state.new{
  border-color:#efc276;
  background:#fff8ed;
}
#home .home-focus-rebuild{color:#46586d}
#home .rebuild-orb{
  border-color:#77c9c0;
  background:linear-gradient(145deg,#dff8f4,#ffffff);
  box-shadow:0 14px 30px rgba(15,118,110,.18),inset 0 0 0 9px rgba(20,184,166,.07);
}
#home .home-focus-result{
  border-color:rgba(20,184,166,.28);
  background:linear-gradient(145deg,rgba(20,184,166,.13),rgba(249,158,11,.16));
  box-shadow:0 18px 42px rgba(31,41,55,.11);
}
#home .home-focus-result:hover{box-shadow:0 24px 48px rgba(31,41,55,.15)}
#home .focus-result-kicker{color:#0b756f}
#home .focus-result-chips .review-chip{
  background:#d8f4ef;
  color:#0b756f;
  border:1px solid rgba(20,167,160,.12);
}
#home .focus-result-chips .new-chip{
  background:#ffebc6;
  color:#9c5208;
  border:1px solid rgba(244,166,42,.14);
}
#home .focus-result-message{border-top-color:#b9d8d4}
#home .focus-result-message span{color:#657489}
#home .home-focus-footer{border-top-color:rgba(100,116,139,.25)}

.why-page .output-feature-copy .output-feature-subheadline{
  margin:16px 0 0;
  font-size:clamp(30px,2.65vw,36px);
  line-height:1.18;
  letter-spacing:-.045em;
  word-break:keep-all;
}
.why-page .output-feature-copy .output-feature-subheadline>span{
  display:block;
  white-space:nowrap;
}
@media(max-width:1100px){
  .why-page .output-feature-copy .output-feature-subheadline{font-size:clamp(29px,3vw,34px)}
}
@media(max-width:980px){
  .why-page .output-feature-copy .output-feature-subheadline>span{white-space:normal}
}
@media(max-width:560px){
  .why-page .output-feature-copy .output-feature-subheadline{font-size:29px;line-height:1.22}
}

/* UI v1.0.115 — signup legal policy modal */
.signup-legal-dialog{width:min(780px,100%);max-height:min(86vh,820px);display:flex;flex-direction:column}
.signup-legal-content{margin-top:8px;padding:16px 18px;border:1px solid #d7e4e2;border-radius:12px;background:#fbfdfd;white-space:pre-wrap;line-height:1.75;overflow:auto;min-height:220px;max-height:58vh;outline:none}
.signup-legal-content:focus-visible{box-shadow:0 0 0 3px rgba(15,159,153,.15)}
.signup-legal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
@media(max-width:560px){.signup-legal-dialog{max-height:90vh;padding:18px}.signup-legal-content{padding:14px;max-height:60vh}.signup-legal-actions{flex-direction:column-reverse}.signup-legal-actions .btn{width:100%}}


/* =========================================================
   Memowna UI v1.0.117 — review modal alignment + history grid geometry
   Visual-only hotfix: no data, API, entitlement, payment, or generation changes.
   ========================================================= */
#review-library-modal .modal-card{width:min(1180px,100%);max-width:1180px}
#review-library-table{width:100%;min-width:1040px;table-layout:fixed}
#review-library-table th,
#review-library-table td{vertical-align:middle;white-space:nowrap;word-break:keep-all}
#review-library-table th:nth-child(1),#review-library-table td:nth-child(1){width:6%;text-align:center}
#review-library-table th:nth-child(2),#review-library-table td:nth-child(2){width:25%}
#review-library-table th:nth-child(3),#review-library-table td:nth-child(3){width:27%}
#review-library-table th:nth-child(4),#review-library-table td:nth-child(4){width:19%}
#review-library-table th:nth-child(5),#review-library-table td:nth-child(5){width:23%}
#review-library-table td:nth-child(n+2){overflow:hidden;text-overflow:ellipsis}
#review-library-table .review-library-table-note{display:inline;margin:0 0 0 7px;white-space:nowrap;line-height:inherit}

#review-direct-input-table td{vertical-align:middle}
#review-direct-input-table th:first-child,
#review-direct-input-table td:first-child{text-align:center;white-space:nowrap}

#review-set-table th:first-child,
#review-set-table td:first-child{width:58px;min-width:58px;text-align:center;white-space:nowrap!important;word-break:keep-all!important}
#review-set-table thead th{white-space:nowrap;word-break:keep-all}

#mypage .download-table{width:100%!important;table-layout:fixed!important}
#mypage .download-table col.history-col-title{width:28%}
#mypage .download-table col.history-col-created{width:8%}
#mypage .download-table col.history-col-expiry{width:9%}
#mypage .download-table col.history-col-regen{width:10%}
#mypage .download-table col.history-col-actions{width:36%}
#mypage .download-table col.history-col-manage{width:9%}
#mypage .download-table th,
#mypage .download-table td{box-sizing:border-box}
#mypage .download-table th:nth-child(1),#mypage .download-table td:nth-child(1),
#mypage .download-table th:nth-child(2),#mypage .download-table td:nth-child(2),
#mypage .download-table th:nth-child(3),#mypage .download-table td:nth-child(3),
#mypage .download-table th:nth-child(4),#mypage .download-table td:nth-child(4),
#mypage .download-table th:nth-child(5),#mypage .download-table td:nth-child(5),
#mypage .download-table th:nth-child(6),#mypage .download-table td:nth-child(6){width:auto!important}
#mypage .download-table .history-manage-head,
#mypage .download-table .history-manage-cell{width:auto!important;min-width:0!important}
@media(max-width:900px){
  #review-library-modal .modal-card{max-width:100%}
  #review-library-table{min-width:920px}
}


/* =========================================================
   Memowna UI v1.0.118 — generation history grid hard alignment
   Visual-only hotfix. The colgroup owns geometry; inset grid lines do not
   participate in width calculation, preventing legacy border drift.
   ========================================================= */
#mypage .history-table-shell{overflow:hidden!important}
#mypage .history-table-scroll{
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  scrollbar-gutter:auto!important;
  padding-right:0!important;
}
#mypage .history-table-scroll .download-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  border:0!important;
}
#mypage .history-table-scroll .download-table col.history-col-title{width:28%!important}
#mypage .history-table-scroll .download-table col.history-col-created{width:8%!important}
#mypage .history-table-scroll .download-table col.history-col-expiry{width:9%!important}
#mypage .history-table-scroll .download-table col.history-col-regen{width:10%!important}
#mypage .history-table-scroll .download-table col.history-col-actions{width:36%!important}
#mypage .history-table-scroll .download-table col.history-col-manage{width:9%!important}
#mypage .history-table-scroll .download-table th,
#mypage .history-table-scroll .download-table td{
  width:auto!important;
  min-width:0!important;
  box-sizing:border-box!important;
  border-right:0!important;
  border-bottom:0!important;
  box-shadow:inset -1px 0 #c5d2d0,inset 0 -1px #c5d2d0;
}
#mypage .history-table-scroll .download-table th:last-child,
#mypage .history-table-scroll .download-table td:last-child{
  box-shadow:inset 0 -1px #c5d2d0;
}
#mypage .history-table-scroll .download-table tbody tr:last-child td{
  box-shadow:inset -1px 0 #c5d2d0;
}
#mypage .history-table-scroll .download-table tbody tr:last-child td:last-child{box-shadow:none}
#mypage .history-table-scroll .download-table .history-manage-head,
#mypage .history-table-scroll .download-table .history-manage-cell{
  width:auto!important;
  min-width:0!important;
}

/* =========================================================
   Memowna UI v1.0.119 — generation history fixed row height
   Visual-only hotfix. Every desktop history data row uses one fixed
   height; long failure details are clipped to one ellipsis line.
   ========================================================= */
#mypage .history-table-scroll .download-table tbody tr{
  height:50px!important;
  min-height:50px!important;
  max-height:50px!important;
}
#mypage .history-table-scroll .download-table tbody td{
  height:50px!important;
  max-height:50px!important;
  padding-top:4px!important;
  padding-bottom:4px!important;
  vertical-align:middle!important;
  overflow:hidden!important;
}
#mypage .history-table-scroll .download-table .history-title-cell,
#mypage .history-table-scroll .download-table .history-actions-cell,
#mypage .history-table-scroll .download-table .history-manage-cell{
  vertical-align:middle!important;
}
#mypage .history-table-scroll .download-table .history-title-button,
#mypage .history-table-scroll .download-table .history-error,
#mypage .history-table-scroll .download-table .history-error-inline,
#mypage .history-table-scroll .download-table .history-generation-failed span,
#mypage .history-table-scroll .download-table .history-generation-state>small{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#mypage .history-table-scroll .download-table .history-title-button{
  display:block!important;
  min-height:0!important;
  height:auto!important;
  line-height:1.2!important;
}
#mypage .history-table-scroll .download-table .history-generation-state{
  height:34px!important;
  min-height:0!important;
  max-height:34px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
#mypage .history-table-scroll .download-table .history-generation-state:has(.history-generation-failed){
  justify-content:center!important;
  gap:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
}
#mypage .history-table-scroll .download-table .history-generation-state:has(.history-generation-failed)>small{
  display:none!important;
}
#mypage .history-table-scroll .download-table .history-generation-failed{
  width:100%!important;
  height:30px!important;
  min-height:30px!important;
  max-height:30px!important;
  box-sizing:border-box!important;
  padding:4px 8px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
#mypage .history-table-scroll .download-table .history-generation-failed b{
  flex:0 0 auto!important;
  white-space:nowrap!important;
}
#mypage .history-table-scroll .download-table .history-generation-failed span{
  display:block!important;
  flex:1 1 auto!important;
}



/* =========================================================
   Memowna UI v1.0.120 — Market table frame / sticky-filter opacity hotfix
   Visual-only hotfix. Restore the shared desktop Market table outer frame
   and make the full sticky filter stack opaque while result rows move below it.
   Keep overflow:visible so the existing viewport-sticky Market header works.
   ========================================================= */
@media(min-width:721px){
  /* The Market card has 22px top padding before the sticky filter. When the page
     scrolls, table rows can otherwise be seen through that padding strip. Paint
     the strip from the filter's own higher stacking context without changing
     sticky offsets, card spacing, or table geometry. */
  #market .market-filter-toolbar::before{
    content:"";
    position:absolute;
    left:-22px;
    right:-22px;
    top:-22px;
    height:22px;
    background:#fff;
    pointer-events:none;
  }

  #market .market-list-wrap{
    position:relative;
    border:1.5px solid #91aaa5!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:inset 0 0 0 1px rgba(145,170,165,.18)!important;
    background-clip:padding-box;
    padding-right:0!important;
    overflow:visible!important;
  }
  #market .market-list-wrap::after{
    display:none!important;
    content:none!important;
  }
  #market .market-list-wrap>.market-list{
    border:0!important;
    border-radius:0!important;
    margin:0!important;
    box-shadow:none!important;
  }
  #market .market-list-wrap>.market-list tbody tr:last-child>td{
    border-bottom:0!important;
  }
  #market .market-list-wrap>.market-list thead tr:first-child>th:first-child{
    border-top-left-radius:12px!important;
  }
  #market .market-list-wrap>.market-list thead tr:first-child>th:last-child{
    border-top-right-radius:12px!important;
  }
}


/* =========================================================
   Memowna UI v1.0.121 — Market table corner continuity hotfix
   v1.0.120 restored the frame on the wrapper, but Market must keep
   overflow:visible for viewport-sticky column headers. Child cells can then
   paint above the parent's rounded border and visually cut all four corners.
   Draw the Market-only outer frame as a top-layer pseudo outline instead.
   ========================================================= */
@media(min-width:721px){
  #market .market-list-wrap{
    border:0!important;
    border-radius:14px!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  #market .market-list-wrap::after{
    display:block!important;
    content:""!important;
    position:absolute;
    inset:0;
    z-index:18;
    pointer-events:none;
    box-sizing:border-box;
    border:1.5px solid #91aaa5;
    border-radius:14px;
    box-shadow:inset 0 0 0 1px rgba(145,170,165,.18);
  }
  #market .market-list-wrap>.market-list thead tr:first-child>th:first-child{
    border-top-left-radius:12px!important;
  }
  #market .market-list-wrap>.market-list thead tr:first-child>th:last-child{
    border-top-right-radius:12px!important;
  }
  #market .market-list-wrap>.market-list tbody tr:last-child>td:first-child{
    border-bottom-left-radius:12px!important;
  }
  #market .market-list-wrap>.market-list tbody tr:last-child>td:last-child{
    border-bottom-right-radius:12px!important;
  }
}


/* =========================================================
   Memowna UI v1.0.143 — Account withdrawal / Market sticky opacity regression
   ========================================================= */
.account-withdraw-entry{margin-top:18px;padding-top:12px;border-top:1px solid #edf1f0;text-align:right}
.account-withdraw-link{border:0;background:transparent;padding:4px 0;color:#7b8583;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.account-withdraw-link:hover,.account-withdraw-link:focus-visible{color:#b42318}
.account-withdraw-dialog{width:min(620px,100%)}
.account-withdraw-warning{margin-top:12px;padding:14px 15px;border:1px solid #f0c8bf;border-radius:12px;background:#fff8f6;font-size:13px;line-height:1.6;color:#4b5563}
.account-withdraw-warning ul{margin:8px 0 0;padding-left:20px}.account-withdraw-warning li+li{margin-top:5px}
.account-withdraw-dialog input[type="password"],.account-withdraw-dialog input[type="text"]{width:100%;box-sizing:border-box;border:1px solid #9bb9b6;border-radius:10px;padding:11px 12px;font:inherit}
.account-withdraw-ack{display:flex;gap:8px;align-items:flex-start;margin-top:14px;font-size:13px;line-height:1.55;color:#374151}
.account-withdraw-ack input{margin-top:3px}
@media(min-width:701px){
  /* The entire card strip between the page-context title and filter toolbar must
     remain opaque while result rows pass underneath. Paint from the sticky
     toolbar itself so no new scroll container or row-height change is introduced. */
  #market .market-filter-toolbar::before{
    left:-22px!important;
    right:-22px!important;
    top:calc(-1 * var(--market-context-height))!important;
    height:var(--market-context-height)!important;
    background:#fff!important;
    z-index:-1!important;
  }
  #market .market-filter-toolbar{background:#fff!important;isolation:isolate!important}
}
/* =========================================================
   Memowna UI v1.0.144 — Market sticky frame-layer regression fix
   Keep the table outer frame below sticky layers so its moving top edge
   cannot appear above the pinned column header. Repaint the authoritative
   top edge on the sticky header itself without changing row geometry.
   ========================================================= */
@media(min-width:721px){
  #market .market-list-wrap::after{
    z-index:16!important;
  }
  #market .market-list thead th,
  #market .market-list th{
    z-index:17!important;
    box-shadow:inset 0 1.5px 0 #91aaa5,0 1px 0 #c5d2d0,0 6px 12px rgba(31,41,55,.05)!important;
  }
}

/* =========================================================
   Memowna UI v1.0.145 — Market sticky frame ownership repair
   The scrolling wrapper owns only the side/bottom frame. The sticky
   column header alone owns the top edge and both top rounded corners,
   so no moving outline or corner can cross above the pinned header.
   ========================================================= */
@media(min-width:721px){
  #market .market-list-wrap{
    border:0!important;
    border-radius:0 0 14px 14px!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  #market .market-list-wrap::before{
    content:"";
    display:block;
    position:sticky;
    top:calc(var(--market-sticky-top) + var(--market-context-height) + var(--market-filter-height));
    z-index:16;
    height:var(--table-header-height);
    margin-bottom:calc(-1 * var(--table-header-height));
    background:#fff;
    pointer-events:none;
  }
  #market .market-list-wrap::after{
    display:block!important;
    content:""!important;
    position:absolute;
    inset:0!important;
    z-index:15!important;
    pointer-events:none;
    box-sizing:border-box;
    border:0!important;
    border-left:1.5px solid #91aaa5!important;
    border-right:1.5px solid #91aaa5!important;
    border-bottom:1.5px solid #91aaa5!important;
    border-radius:0 0 14px 14px!important;
    box-shadow:inset 1px 0 0 rgba(145,170,165,.18),inset -1px 0 0 rgba(145,170,165,.18),inset 0 -1px 0 rgba(145,170,165,.18)!important;
  }
  #market .market-list thead th,
  #market .market-list th{
    z-index:17!important;
    border-radius:0!important;
    box-shadow:inset 0 1.5px 0 #91aaa5,0 1px 0 #c5d2d0,0 6px 12px rgba(31,41,55,.05)!important;
  }
  #market .market-list thead th:first-child{
    border-top-left-radius:14px!important;
    box-shadow:inset 1.5px 0 0 #91aaa5,inset 0 1.5px 0 #91aaa5,0 1px 0 #c5d2d0,0 6px 12px rgba(31,41,55,.05)!important;
  }
  #market .market-list thead th:last-child{
    border-top-right-radius:14px!important;
    box-shadow:inset -1.5px 0 0 #91aaa5,inset 0 1.5px 0 #91aaa5,0 1px 0 #c5d2d0,0 6px 12px rgba(31,41,55,.05)!important;
  }
}


/* =========================================================
   Memowna UI v1.0.146 — Generator sticky navigation stabilization
   ========================================================= */
/* The guide changes height at the compact boundary. Excluding it from scroll
   anchoring prevents browser anchor compensation from bouncing across the
   compact threshold while the height transition is running. */
#generator .steps{overflow-anchor:none;}

/* Button navigation now computes an exact runtime offset in app.js. Keep a
   generous CSS fallback for keyboard/hash/native scroll paths as well. */
#generator [data-generator-section]{scroll-margin-top:220px;}
@media(max-width:900px){
  #generator [data-generator-section]{scroll-margin-top:202px;}
}
@media(max-width:560px){
  #generator [data-generator-section]{scroll-margin-top:194px;}
}

/* Memowna UI v1.0.147 — structured private rights evidence */
.evidence-upload-field input[type="file"]{padding:9px 10px;font-size:13px;line-height:1.4}
.evidence-upload-help{margin:7px 0 0;font-size:12px;line-height:1.55}


/* =========================================================
   Memowna UI v1.0.158 — Pre-Public Responsive / UI Regression
   Keep desktop/table geometry intact; only close real tablet-width overflow.
   ========================================================= */
/* Generic help bubbles near the right edge must stay inside the viewport on
   tablet widths. This changes only overlay placement, never control geometry. */
@media (min-width:561px) and (max-width:900px){
  .help-tip::after{
    left:auto!important;
    right:0!important;
    transform:none!important;
    width:min(280px,calc(100vw - 32px))!important;
  }
  .help-tip:hover::after,
  .help-tip:focus::after{transform:none!important;}
}

/* The desktop Market header needs overflow:visible for viewport sticky behavior.
   At tablet widths its legacy 980px minimum leaked into page-level horizontal
   scrolling. The lower-priority description column is already hidden here, so
   the remaining percentage columns can safely fit the available card width. */
@media (min-width:761px) and (max-width:1099px){
  #market .market-list{
    width:100%!important;
    min-width:0!important;
  }
}

/* Why Memowna historically cancels main padding with fixed -22px margins.
   Main padding is now fluid via clamp(), so tablet widths could overshoot the
   viewport by 2–5px. Mirror the actual fluid padding only in that gap range. */
@media (min-width:701px) and (max-width:980px){
  .why-page{
    margin-left:calc(-1 * clamp(16px,2.2vw,28px))!important;
    margin-right:calc(-1 * clamp(16px,2.2vw,28px))!important;
  }
}

/* Memowna UI v1.0.160 — Dynamic Catalog Bridge / Series Part selector */
.market-series-part-picker{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding:10px 12px;border:1px solid #d9e6e5;border-radius:12px;background:#f8fbfb}
.market-series-part-picker label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800;color:#344457}
.market-series-part-picker select{min-width:280px;max-width:min(560px,100%);height:38px;border:1px solid #cad9d8;border-radius:9px;background:#fff;padding:0 34px 0 10px;color:#142033;font:inherit}
.market-series-part-picker .muted{font-size:12px;line-height:1.5}
@media(max-width:760px){.market-series-part-picker{align-items:stretch}.market-series-part-picker label{width:100%;align-items:flex-start;flex-direction:column}.market-series-part-picker select{width:100%;min-width:0;max-width:none}}


/* =========================================================
   Memowna UI v1.0.167 — Market detail card-review viewport
   Keep the global navigation, Series Part selector, table header and purchase
   summary useful while allowing descriptive/legal context to scroll away.
   Card row geometry and the continuous table frame remain unchanged.
   ========================================================= */
#market-set-detail{
  scroll-margin-top:calc(var(--market-sticky-top) + 8px);
}
@media(min-width:701px){
  /* On a selected Series/Set, the large page-context title is no longer part of
     the sticky stack. It is still shown when entering the Market/detail, then
     scrolls away naturally so card review owns the viewport. */
  #market.market-detail-review-mode > .page-context-sticky{
    position:static!important;
    top:auto!important;
    z-index:auto!important;
    margin-bottom:12px!important;
    background:transparent!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    border-bottom:1px solid rgba(145,170,165,.28)!important;
    box-shadow:none!important;
  }

  /* While a Set detail is open, the search/list stack is background context.
     It must return to normal document flow. The normal Market sticky filter
     owns an opaque ::before veil sized by --market-context-height; if that
     remains active after the large title stops being sticky, reverse scrolling
     can expose a large blank white slab. Disable that list-only sticky stack
     only in detail-review mode. */
  #market.market-detail-review-mode .market-filter-toolbar{
    position:static!important;
    top:auto!important;
    z-index:auto!important;
    margin:0 -2px 12px!important;
    background:#fff!important;
    box-shadow:none!important;
    isolation:auto!important;
  }
  #market.market-detail-review-mode .market-filter-toolbar::before{
    display:none!important;
    content:none!important;
  }
  #market.market-detail-review-mode .market-list-wrap::before{
    display:none!important;
    content:none!important;
  }
  #market.market-detail-review-mode .market-list thead th,
  #market.market-detail-review-mode .market-list th{
    position:static!important;
    top:auto!important;
    z-index:auto!important;
    box-shadow:none!important;
  }

  /* The Part selector is the only detail-level control that remains pinned.
     Keeping it directly below the global header makes long Series practical
     without pinning report/legal/description blocks above the cards. */
  #market.market-detail-review-mode #market-series-part-picker{
    position:sticky;
    top:calc(var(--market-sticky-top) + 8px);
    z-index:14;
    margin-top:12px;
    background:#f8fbfb;
    box-shadow:0 8px 18px rgba(31,41,55,.07);
  }

  /* Use available viewport height for actual card review. Row heights are not
     changed; larger screens simply expose more of the existing 36px rows. */
  #market.market-detail-review-mode .market-card-table-wrap{
    max-height:clamp(430px,calc(100vh - 245px),720px);
  }
}
@media(max-width:700px){
  #market.market-detail-review-mode #market-series-part-picker{
    position:static;
  }
}


/* =========================================================
   Memowna UI v1.0.172 — Direct-Sale Content Accuracy Legal Boundary
   - A selected Series owns a dedicated detail view; the background browse
     stack is hidden until "세트 목록으로" is used.
   - Legal/report actions share the seller/revision metadata row.
   - Part selection is visually explicit without developer-facing helper copy.
   - The viewer watermark follows the card scrollport so every visible card
     region remains traceable without changing the 36px card-row geometry.
   ========================================================= */
#market.market-detail-review-mode > .page-context-sticky,
#market.market-detail-review-mode > #market-browse-panel{
  display:none!important;
}
#market.market-detail-review-mode #market-set-detail{
  margin-top:0;
}
.market-detail-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:10px;
}
.market-detail-meta-row .market-detail-meta{
  margin-top:0;
}
#market-set-detail .market-detail-actions{
  margin:0 0 0 auto!important;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.market-series-part-picker{
  display:grid;
  grid-template-columns:auto auto minmax(280px,1fr);
  align-items:center;
  gap:10px;
  margin-top:12px;
  padding:10px 12px;
  border:1.5px solid #8fd5cf;
  border-radius:12px;
  background:#f3fbfa;
}
.market-series-part-picker[hidden]{display:none!important;}
.market-series-part-label{
  color:#123f3b;
  font-size:13px;
  font-weight:900;
  white-space:nowrap;
}
.market-series-part-progress{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:52px;
  height:30px;
  padding:0 9px;
  border-radius:999px;
  background:#0f8f88;
  color:#fff;
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
  white-space:nowrap;
}
.market-series-part-picker select{
  width:100%;
  min-width:0;
  max-width:none;
  height:40px;
  border:1.5px solid #1aa59d;
  border-radius:9px;
  background:#fff;
  padding:0 36px 0 11px;
  color:#142033;
  font:inherit;
  font-weight:800;
  box-shadow:0 0 0 3px rgba(26,165,157,.08);
}
#market-set-detail .market-watermark-layer{
  bottom:auto;
  grid-template-columns:repeat(var(--market-watermark-columns,3),minmax(0,1fr));
  grid-auto-rows:var(--market-watermark-row-height,48px);
  will-change:transform;
}
@media(max-width:700px){
  .market-detail-meta-row{align-items:stretch;}
  #market-set-detail .market-detail-actions{margin-left:0!important;width:100%;}
  .market-series-part-picker{
    grid-template-columns:auto 1fr;
    align-items:center;
  }
  .market-series-part-picker select{grid-column:1/-1;}
  #market-set-detail .market-watermark-layer{
    grid-template-columns:repeat(var(--market-watermark-columns,2),minmax(0,1fr));
    grid-auto-rows:var(--market-watermark-row-height,44px);
  }
}

/* UI v1.0.172 — important Buyer Terms notice at signup */
.auth-terms-key-notice{display:block;margin:-2px 0 8px 2px;line-height:1.55}

/* ============================================================
   Memowna UI v1.0.174 — Korea Open Security Baseline
   - No visual behavior change; server-side cart normalization only.
   ============================================================ */

/* ============================================================
   Memowna UI v1.0.176 — selected language and voice clarity
   ============================================================ */
.voice-picker-panel .selected-language-value{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:42px;
  margin-top:5px;
  padding:7px 11px;
  border:2px solid transparent;
  border-radius:12px;
  box-shadow:0 3px 10px rgba(20,60,54,.08);
}
.voice-picker-panel .selected-language-value strong{
  font-size:19px;
  font-weight:900;
  line-height:1.15;
  letter-spacing:-.02em;
}
.voice-picker-panel .selected-language-value small{
  font-size:12px;
  font-weight:800;
  opacity:.78;
}
.selected-language-check{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:50%;
  color:#fff;
  font-size:14px;
  font-weight:900;
  line-height:1;
}
.voice-picker-panel[data-side="front"] .selected-language-value{
  border-color:#63c9bb;
  background:#daf6f1;
  color:#075f57;
}
.voice-picker-panel[data-side="front"] .selected-language-check{background:#087f74;}
.voice-picker-panel[data-side="back"] .selected-language-value{
  border-color:#eeb85a;
  background:#fff0cf;
  color:#884d00;
}
.voice-picker-panel[data-side="back"] .selected-language-check{background:#b96800;}
.voice-picker-panel .popular-language-chip.active{
  border-width:2px;
  font-weight:900;
  box-shadow:0 0 0 3px rgba(15,159,143,.12);
}
.voice-picker-panel .popular-language-chip.active::before{
  content:"✓ ";
  font-weight:900;
}
.voice-picker-panel[data-side="front"] .popular-language-chip.active{
  border-color:#087f74;
  background:#087f74;
  color:#fff;
}
.voice-picker-panel[data-side="back"] .popular-language-chip.active{
  border-color:#a85d00;
  background:#a85d00;
  color:#fff;
  box-shadow:0 0 0 3px rgba(219,126,0,.14);
}
.voice-picker-panel[data-side="front"] .recommended-voice-card.selected{
  border:2px solid #087f74;
  background:#e4f8f4;
  box-shadow:0 0 0 3px rgba(8,127,116,.13);
}
.voice-picker-panel[data-side="back"] .recommended-voice-card.selected{
  border:2px solid #b96800;
  background:#fff1d8;
  box-shadow:0 0 0 3px rgba(185,104,0,.13);
}
.recommended-voice-card[aria-pressed="true"] .choose-voice-label{
  font-weight:900;
  text-decoration:none;
}
.popular-language-chip:focus-visible,
.recommended-voice-card:focus-visible{
  outline:3px solid rgba(15,118,110,.28);
  outline-offset:2px;
}
@media(max-width:560px){
  .voice-picker-panel .selected-language-value strong{font-size:18px;}
}


/* =========================================================
   Memowna UI v1.0.185 — final pre-launch visual polish
   Visual-only scope: compact vertical table density, KPI cleanup,
   and clearer disabled controls. Column widths, wrapping rules,
   application behavior, payment/generation/auth flows are unchanged.
   ========================================================= */
@media (min-width:701px){
  /* My Page generation history: vertical density only. */
  #mypage .download-table tbody tr{
    height:36px!important;
    min-height:36px!important;
  }
  #mypage .download-table th{
    padding-top:5px!important;
    padding-bottom:5px!important;
  }
  #mypage .download-table td{
    padding-top:3px!important;
    padding-bottom:3px!important;
  }

  /* Payment history: keep every existing width/wrapping rule, reduce only Y-space. */
  .payment-history-table th,
  .payment-history-table td{
    padding-top:3px;
    padding-bottom:3px;
  }
  .payment-history-table tbody tr{
    height:34px;
    min-height:34px;
  }

  /* My Learning Cards: compact rows without touching columns or wrapping. */
  #qna #set-list-table th,
  #qna #set-list-table td{
    padding-top:7px;
    padding-bottom:7px;
    vertical-align:middle;
  }
  #qna #set-list-table tbody tr{
    height:40px;
    min-height:40px;
  }
  #qna .editor-grid th,
  #qna .editor-grid td{
    padding-top:6px;
    padding-bottom:6px;
  }
  #qna #card-library-table th,
  #qna #card-library-table td{
    padding-top:6px;
    padding-bottom:6px;
  }
  #qna #card-library-table tbody tr{
    height:42px;
    min-height:42px;
  }

  /* My Page seller sub-tables: vertical density only. */
  #seller .seller-content-report-table th,
  #seller .seller-content-report-table td,
  #seller .seller-products-table th,
  #seller .seller-products-table td{
    padding-top:7px;
    padding-bottom:7px;
    vertical-align:middle;
  }
}

#mypage .mypage-kpi-card{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding-top:18px;
  padding-bottom:18px;
}
#mypage .mypage-kpi-card .kpi{margin-top:10px;}
.btn:disabled,
button:disabled{
  cursor:not-allowed;
}


/* =========================================================
   Memowna UI v1.0.186 — effective desktop row-density correction
   Vertical-only refinement. Existing column widths and wrapping rules remain unchanged.
   ========================================================= */
@media (min-width:701px){
  /* v1.0.119 fixed td height was more specific than v1.0.185's tr-only override. */
  #mypage .history-table-scroll .download-table tbody tr,
  #mypage .history-table-scroll .download-table tbody td{
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
  }
  #mypage .history-table-scroll .download-table tbody td{
    padding-top:1px!important;
    padding-bottom:1px!important;
  }

  .payment-history-table tbody tr{
    height:36px!important;
    min-height:36px!important;
  }
  .payment-history-table th,
  .payment-history-table td{
    padding-top:2px!important;
    padding-bottom:2px!important;
  }

  #qna #set-list-table tbody tr,
  #qna #set-list-table tbody td{
    height:36px!important;
    min-height:36px!important;
  }
  #qna #set-list-table tbody td{
    padding-top:2px!important;
    padding-bottom:2px!important;
  }
  #qna #set-list-table td:last-child .btn{
    height:28px!important;
    min-height:28px!important;
    padding-top:3px!important;
    padding-bottom:3px!important;
  }

  #qna .editor-grid tbody tr,
  #qna .editor-grid tbody td{
    height:36px!important;
    min-height:36px!important;
  }
  #qna .editor-grid tbody td{
    padding-top:2px!important;
    padding-bottom:2px!important;
  }
  #qna .editor-grid input[type="text"]{
    height:28px!important;
    min-height:28px!important;
    padding-top:3px!important;
    padding-bottom:3px!important;
  }
  #qna .editor-grid .btn.danger{
    height:28px!important;
    min-height:28px!important;
    padding-top:3px!important;
    padding-bottom:3px!important;
  }

  #qna #card-library-table tbody tr,
  #qna #card-library-table tbody td{
    height:36px!important;
    min-height:36px!important;
  }
  #qna #card-library-table tbody td{
    padding-top:2px!important;
    padding-bottom:2px!important;
  }
  #qna #card-library-table .btn.danger{
    height:28px!important;
    min-height:28px!important;
    padding-top:3px!important;
    padding-bottom:3px!important;
  }

  #seller .seller-content-report-table td,
  #seller .seller-products-table td{
    padding-top:4px!important;
    padding-bottom:4px!important;
  }
}

/* =========================================================
   Memowna UI v1.0.190 — Seller v1 provider-ready foundation
   ========================================================= */
.seller-card-head{align-items:flex-start;gap:14px}
.seller-inline-check{display:flex;align-items:flex-start;gap:8px;font-weight:600}
.seller-readiness-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.seller-readiness-box{border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--surface-soft,#f8fbfa)}
.seller-readiness-box ul{margin:9px 0 0;padding-left:19px}
.seller-readiness-box li+li{margin-top:6px}
.seller-provider-note{margin:12px 0 0;color:var(--muted);font-size:13px}
.seller-settlement-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}
.seller-settlement-kpis>div{border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:6px}
.seller-settlement-kpis strong{font-size:20px}
.seller-payout-table th,.seller-payout-table td{text-align:center;vertical-align:middle}
.seller-product-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.seller-products-table td:first-child small{display:block;margin-top:4px;color:var(--muted)}
.seller-mini-button{min-height:30px!important;height:auto!important;padding:5px 9px!important;font-size:12px!important}
.seller-product-modal-card{width:min(960px,calc(100vw - 28px));max-height:92vh;overflow:auto}
.seller-product-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.seller-product-span-2{grid-column:1 / -1}
.seller-card-select-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.seller-card-select-head>div{display:flex;gap:6px;flex-wrap:wrap}
.seller-source-card-wrap{max-height:310px;overflow:auto;border:1px solid var(--line);border-radius:10px}
.seller-source-card-table{width:100%;border-collapse:collapse;min-width:720px}
.seller-source-card-table th,.seller-source-card-table td{padding:8px 9px;border-bottom:1px solid var(--line);vertical-align:top}
.seller-source-card-table th:nth-child(1),.seller-source-card-table th:nth-child(2),.seller-source-card-table th:nth-child(5),
.seller-source-card-table td:nth-child(1),.seller-source-card-table td:nth-child(2),.seller-source-card-table td:nth-child(5){text-align:center;white-space:nowrap}
.seller-source-card-table td:nth-child(3),.seller-source-card-table td:nth-child(4){white-space:pre-wrap;word-break:break-word}
.seller-product-rights-check{display:flex;align-items:flex-start;gap:8px;margin-top:14px;line-height:1.5}
.seller-product-modal-actions{justify-content:flex-end;margin-top:14px}
@media(max-width:760px){
  .seller-readiness-columns,.seller-settlement-kpis,.seller-product-form-grid{grid-template-columns:1fr}
  .seller-product-span-2{grid-column:auto}
  .seller-card-select-head{align-items:flex-start;flex-direction:column}
  .seller-settlement-kpis strong{font-size:18px}
  .seller-product-modal-card{width:min(100% - 16px,960px);max-height:94vh}
}


/* =========================================================
   Memowna UI v1.0.191 — Seller v1 UX and identity policy cleanup
   ========================================================= */
.seller-readonly-field{min-height:42px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft,#f8fbfa);color:var(--text,#1f2937);font-weight:700;display:flex;align-items:center}
#seller-registration-adult-attested,#seller-profile-adult-attested,.seller-agreement-box input[type=checkbox],.seller-product-rights-check input[type=checkbox]{width:18px;height:18px;min-width:18px;flex:0 0 18px;margin:1px 0 0}
.seller-inline-check{align-items:flex-start;line-height:1.5}
.seller-profile-edit-button{white-space:nowrap;box-shadow:0 2px 7px rgba(11,157,146,.16)}
.auth-note{min-height:0;margin:8px 0 0;font-size:13px;line-height:1.5}
.auth-note:empty{display:none}
.auth-note.error{display:block;color:#b42318;background:#fff4f2;border:1px solid #fecaca;border-radius:10px;padding:9px 10px;font-weight:700}
.auth-note.success{display:block;color:#067647;background:#ecfdf3;border:1px solid #a7f3d0;border-radius:10px;padding:9px 10px;font-weight:700}
.seller-product-rights-check{align-items:flex-start}
@media(max-width:560px){.seller-profile-edit-button{width:auto}.seller-inline-check{gap:9px}}

/* =========================================================
   Memowna UI v1.0.192 — Seller final copy / validation consistency polish
   ========================================================= */

/* v1.0.193 Seller Series workspace */
.seller-series-policy-note{margin-top:7px;line-height:1.5}
.seller-series-builder{border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--surface-soft,#f8fbfa)}
.seller-series-builder-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.seller-series-builder-head small{display:block;margin-top:5px;line-height:1.45}
.seller-series-add-toolbar{margin:10px 0 12px;justify-content:flex-start}
.seller-series-part-wrap{max-height:300px;overflow:auto;border:1px solid var(--line);border-radius:10px;background:var(--surface,#fff)}
.seller-series-part-table{width:100%;border-collapse:collapse;min-width:680px}
.seller-series-part-table th,.seller-series-part-table td{padding:8px 9px;border-bottom:1px solid var(--line);vertical-align:middle}
.seller-series-part-table th:nth-child(1),.seller-series-part-table td:nth-child(1),.seller-series-part-table th:nth-child(3),.seller-series-part-table td:nth-child(3),.seller-series-part-table th:nth-child(4),.seller-series-part-table td:nth-child(4){text-align:center;white-space:nowrap}
.seller-series-part-table td:nth-child(2){text-align:left}
.seller-series-part-table td:nth-child(2) small{display:block;margin-top:4px;color:var(--muted);overflow-wrap:anywhere}
.seller-part-actions{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap}
@media(max-width:560px){.seller-series-builder{padding:12px}.seller-series-builder-head{flex-direction:column}.seller-series-add-toolbar .btn{width:100%}}


/* Memowna UI v1.0.196 — verified business identity disclosure + Seller profile one-row layout polish. */
@media (min-width: 901px){
  .seller-profile-details>div{min-height:92px}
}
/* UI v1.0.199 — Mobile header overflow hotfix
   Keep the public mobile header to brand + menu only. Auth actions remain available in the drawer. */
@media(max-width:1200px){
  .logged-out-actions{display:none!important}
}
@media(max-width:560px){
  .header-inner{gap:12px;padding-left:14px;padding-right:14px}
  .brand{font-size:24px;min-width:0}
  .logo-mark{width:36px;height:30px;flex:0 0 auto}
  .mobile-menu{flex:0 0 44px;margin-left:auto}
}



/* =========================================================
   Memowna UI v1.0.200 — mobile page composition polish
   Mobile-only refinement. Desktop/tablet geometry at >700px is unchanged.
   ========================================================= */
@media(max-width:700px){
  /* Shared mobile page rhythm */
  main{padding-top:18px;padding-bottom:52px}
  .page{min-width:0}
  .section-title{
    align-items:flex-start;
    gap:10px;
    margin:4px 0 14px;
    flex-wrap:wrap;
  }
  .section-title>div{min-width:0;max-width:100%}
  .section-title h2,
  .subpage-header h2{
    margin:0;
    font-size:clamp(26px,7.4vw,30px);
    line-height:1.18;
    letter-spacing:-.045em;
    white-space:normal;
    word-break:keep-all;
  }
  .section-title h3{line-height:1.3;word-break:keep-all}
  .section-title p.muted{
    margin:6px 0 0;
    font-size:14px;
    line-height:1.55;
    word-break:keep-all;
  }
  .card{padding:17px;border-radius:16px}
  .btn{min-height:42px;padding:10px 13px;line-height:1.25}
  .toolbar{gap:8px}
  .toolbar input,
  .toolbar select,
  .field input,
  .field select,
  .field textarea,
  .generation-name-field input{
    min-width:0;
    min-height:44px;
    font-size:16px;
  }
  .field textarea{line-height:1.5}
  .upload-guide,.notice,.generator-note,.mypage-notice,.download-policy-banner,
  .seller-safety-notice,.market-purchase-policy-box,.report-box{
    line-height:1.6;
    word-break:keep-all;
  }

  /* A single back/action button should use the full mobile row. */
  #market-cart .subpage-header-actions,
  #pricing .subpage-header-actions,
  #copyright-report .subpage-header-actions{
    grid-template-columns:1fr;
  }

  /* Generator: replace the partially visible horizontal progress strip with a complete 2x2 map. */
  #generator .steps,
  #generator .steps.is-compact{
    position:static!important;
    top:auto!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    overflow:visible;
    margin:10px 0 16px;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
  }
  #generator .steps .step,
  #generator .steps.is-compact .step{
    display:grid;
    grid-template-columns:28px minmax(0,1fr);
    grid-template-rows:auto auto;
    gap:7px 9px;
    min-width:0;
    min-height:88px;
    padding:11px 12px;
    flex:none;
    align-content:start;
  }
  #generator .steps .step>span,
  #generator .steps.is-compact .step>span{
    width:26px;
    height:26px;
    font-size:12px;
    align-self:start!important;
  }
  #generator .steps .step>b,
  #generator .steps .step>b.step-title-long,
  #generator .steps.is-compact .step>b,
  #generator .steps.is-compact .step>b.step-title-long{
    grid-column:2;
    grid-row:1;
    min-height:0;
    margin:0;
    font-size:13.5px;
    line-height:1.35;
    white-space:normal;
    word-break:keep-all;
  }
  #generator .steps.is-compact .step>b br{display:block}
  #generator .steps .step>p,
  #generator .steps.is-compact .step>p{
    display:block;
    grid-column:1/-1;
    grid-row:2;
    margin:0;
    font-size:12px;
    line-height:1.4;
    word-break:keep-all;
  }
  #generator [data-generator-section]{scroll-margin-top:82px!important}
  #generator .generator-stack{gap:14px}
  #generator .source-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  #generator .source-switch button{width:100%;min-width:0;padding-inline:10px}

  /* My Learning Cards: predictable tab and action composition. */
  #qna .tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-bottom:14px;
  }
  #qna .tabs button{width:100%;min-height:44px;padding:9px 8px;font-size:13px}
  #qna .tabs button:nth-child(3){grid-column:1/-1}
  #qna #sets>.toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) 112px;
    align-items:stretch;
  }
  #qna #card-set-search,#qna #card-set-sort{width:100%;min-width:0}
  #qna #sets .review-action-wrap{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:minmax(0,1fr) 36px;
    gap:8px;
    align-items:center;
  }
  #qna #review-set-action,#qna #delete-set-action{width:100%}
  #qna #delete-set-action{grid-column:1/-1}
  #qna #items .library-toolbar{display:grid;grid-template-columns:1fr;gap:8px}
  #qna #items .library-toolbar .btn{width:100%}
  #qna #items>.toolbar{display:grid;grid-template-columns:minmax(0,1fr) 120px}
  #qna #card-library-search,#qna #card-library-source-filter{width:100%;min-width:0}
  #qna #create-library-set-action,#qna #delete-library-action{grid-column:1/-1;width:100%}
  #qna .editor-top-actions{gap:8px}
  #qna .editor-top-actions>.toolbar,
  #qna #editor>.card>.toolbar:last-child,
  #qna .direct-entry-actions>.toolbar{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
  #qna .editor-top-actions .btn,
  #qna .direct-entry-actions .btn,
  #qna #editor>.card>.toolbar:last-child .btn{width:100%}

  /* Marketplace browse/detail: keep filters compact but complete. */
  #market .page-context-sticky{align-items:center}
  #market .page-context-sticky>div{flex:1 1 220px;min-width:0}
  #market .market-cart-page-button{flex:0 0 auto;min-height:42px}
  #market-browse-panel{padding:14px}
  #market .market-filter-toolbar{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  #market .market-filter-toolbar #market-keyword-filter,
  #market .market-filter-toolbar #market-filter-button{grid-column:1/-1}
  #market .market-filter-toolbar input,
  #market .market-filter-toolbar select,
  #market .market-filter-toolbar .btn{
    width:100%;
    min-width:0!important;
    max-width:none;
    margin:0;
  }
  #market .market-list-footer{gap:10px}
  #market .market-page-size{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px}
  .market-mobile-card{padding:14px;border-radius:14px}
  .market-mobile-price{align-items:flex-end}
  #market-set-detail{padding:16px}
  #market-set-detail .market-detail-head h2{font-size:24px;line-height:1.25;word-break:keep-all}
  #market-set-detail .market-detail-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
    gap:8px;
  }
  #market-set-detail .market-detail-actions .btn{width:100%;margin:0}
  #market-set-detail .market-selection-toolbar{justify-content:space-between;flex-wrap:wrap}
  #market-set-detail .market-card-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  #market-set-detail #market-card-table{min-width:620px}
  #market-set-detail .purchase-summary{
    bottom:8px;
    align-items:stretch;
    gap:10px;
    padding:12px 13px;
  }
  #market-set-detail .purchase-summary>div{min-width:0}
  #market-set-detail .purchase-summary>.toolbar{display:grid;grid-template-columns:1fr 1fr;width:100%}
  #market-set-detail .purchase-summary>.toolbar .btn{width:100%;margin:0}

  /* Cart / checkout: emphasize totals and touch actions without widening the page. */
  .market-cart-overview{gap:8px;margin-bottom:14px}
  .market-cart-overview>div{padding:12px 13px;border-radius:12px}
  .market-cart-checkout-box{margin-top:14px;padding:15px}
  .market-cart-checkout-box .btn{min-height:46px}
  .checkout-page,.market-checkout-page{margin-top:16px!important}
  .checkout-page .card,#market-checkout .card{padding:16px}
  .checkout-actions{gap:8px}
  .checkout-actions .btn{min-height:46px}
  #market-checkout .market-purchase-policy-box .toolbar{display:grid;grid-template-columns:1fr 1fr}
  #market-checkout .market-purchase-policy-box .toolbar .btn{width:100%;margin:0;font-size:12.5px;padding-inline:8px}
  .market-checkout-agreement{padding:11px 12px;border:1px solid #dce9e6;border-radius:12px;background:#fbfdfc}

  /* My Page: keep overview KPIs above the fold and make tabs look intentional. */
  #mypage .mypage-tabs{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    margin:10px 0 14px;
  }
  #mypage .mypage-tabs button{min-width:0;min-height:42px;padding:8px 5px;font-size:12.5px;line-height:1.25}
  #mypage>.grid.cols-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
  }
  #mypage .mypage-kpi-card{
    min-width:0;
    min-height:92px;
    padding:13px 10px;
    align-items:flex-start;
    justify-content:center;
  }
  #mypage .mypage-kpi-card>.muted{font-size:12px;line-height:1.35;word-break:keep-all}
  #mypage .mypage-kpi-card .kpi{margin-top:7px;font-size:22px;line-height:1.1}
  #mypage>.card{margin-top:14px!important}
  #mypage .mobile-download-card{padding:14px;border-radius:14px}
  #mypage .account-management-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  #mypage .account-management-actions>*{width:100%;margin:0}
  #mypage>.grid.cols-2 .card>.toolbar{display:grid;grid-template-columns:1fr 1fr;width:100%}
  #mypage>.grid.cols-2 .card>.toolbar .btn{width:100%;margin:0}

  /* Payments / Seller: consistent subpage actions and mobile cards. */
  #payments .subpage-header-actions,
  #seller .subpage-header-actions{gap:8px}
  #payments .subpage-header-actions .btn,
  #seller .subpage-header-actions .btn{min-width:0;padding-inline:8px;font-size:13px}
  #payments .table-wrap,
  #seller .table-wrap:has(.seller-products-table){border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important}
  .payment-history-table tbody tr,
  .seller-products-table tbody tr{box-shadow:0 5px 16px rgba(15,23,42,.045)}
  .seller-registration-card{padding:16px}
  .seller-agreement-box{padding:12px 13px}
  .seller-readiness-box{padding:12px}
  .seller-series-builder{padding:12px}
  .seller-series-add-toolbar .btn{width:100%}

  /* Report / policy pages: mobile reading first. */
  #copyright-report .grid.cols-2{gap:12px}
  #copyright-report .report-box{padding:14px}
  .policy-page{width:100%;max-width:none}
  .policy-page .card{
    padding:18px 16px;
    font-size:15px;
    line-height:1.78;
    overflow-wrap:anywhere;
    word-break:keep-all;
  }
  .policy-page .card h2{font-size:22px;line-height:1.35;word-break:keep-all}
  .policy-page .card h3{margin-top:22px;font-size:17px;line-height:1.45;word-break:keep-all}
  .policy-page .card p,.policy-page .card li{line-height:1.78}

  /* Footer remains compact and readable on short utility pages. */
  .site-footer{padding:28px 18px 32px}
  .site-footer-inner{gap:18px}
  .footer-links{gap:6px 14px}
  .footer-links button{min-height:34px;line-height:1.35}
  .footer-note{padding-top:14px;font-size:12px;line-height:1.65;overflow-wrap:anywhere}
}

@media(max-width:380px){
  #generator .steps,
  #generator .steps.is-compact{grid-template-columns:1fr}
  #generator .steps .step,
  #generator .steps.is-compact .step{min-height:76px}
  #mypage .mypage-tabs{grid-template-columns:1fr 1fr}
  #mypage .mypage-tabs button:first-child{grid-column:1/-1}
  #mypage>.grid.cols-3{grid-template-columns:1fr}
  #mypage .mypage-kpi-card{min-height:78px}
  #payments .subpage-header-actions,
  #seller .subpage-header-actions,
  #market-checkout .market-purchase-policy-box .toolbar,
  #market-set-detail .market-detail-actions,
  #market-set-detail .purchase-summary>.toolbar{grid-template-columns:1fr}
}

/* UI v1.0.207: session-safe auth, local language assist, and clearer paid-generation confirmation. */
.voice-auto-detect-note{grid-column:1/-1;margin:-4px 0 0;color:#60716d;font-size:12px;line-height:1.5}
/* UI v1.0.208: compact generation confirmation density; scroll only as a small-viewport fallback. */
.generation-legal-dialog .memowna-dialog-card{width:min(620px,100%);padding:18px 20px;gap:14px}
.generation-legal-dialog .memowna-dialog-actions{margin-top:12px}
.generation-legal-confirm{white-space:normal;max-height:none;overflow:visible;padding-right:0;font-size:13px;line-height:1.45}
.generation-legal-heading{margin:0 0 7px;font-size:14px;line-height:1.35;font-weight:800;color:#24313d}
.generation-legal-list{margin:0;padding-left:1.2rem;list-style-position:outside}
.generation-legal-list li{margin:0 0 4px;padding-left:.1rem;line-height:1.45}
.generation-legal-list li:last-child{margin-bottom:0}
.generation-legal-paragraph{margin:6px 0 0;line-height:1.45}
.generation-order-summary{margin:11px 0 9px;padding:8px 10px;border:1px solid #cfe3df;border-radius:11px;background:#f7fbfa}
.generation-order-summary-row{display:grid;grid-template-columns:118px minmax(0,1fr);gap:9px;padding:4px 0;align-items:start}
.generation-order-summary-row+.generation-order-summary-row{border-top:1px solid #e2efec}
.generation-order-summary-label{color:#5b6b68;font-size:12px;line-height:1.4;font-weight:700}
.generation-order-summary-value{min-width:0;color:#24313d;font-size:12.5px;line-height:1.4;font-weight:700;overflow-wrap:anywhere}
.generation-order-summary-value.is-emphasis{color:#087f74;font-size:13.5px}
.generation-legal-acknowledgement{margin:0;color:#52615f;font-size:12.5px;line-height:1.45;word-break:keep-all;overflow-wrap:break-word;text-wrap:pretty}
.generation-legal-question{margin:10px 0 0;font-size:13px;line-height:1.4;font-weight:700;color:#24313d}
@media(max-height:680px){.generation-legal-confirm{max-height:58vh;overflow-y:auto;padding-right:4px}}
@media(max-width:560px){.generation-legal-dialog .memowna-dialog-card{width:min(520px,100%);padding:16px;gap:12px}.generation-legal-confirm{max-height:62vh;overflow-y:auto;padding-right:4px;font-size:12.5px}.generation-order-summary-row{grid-template-columns:1fr;gap:2px}.generation-order-summary{padding:8px 9px}.generation-legal-list{padding-left:1.1rem}}
