/* 起好名 · 黑白水墨。最后加载，统一前台、详情与管理页面。 */
:root{
  --bg:#fbfbfb;--surface:#fff;--ink:#272727;--secondary:#676767;
  --muted:#767676;--line:#e2e2e2;--accent:#363636;--accent-hover:#1b1b1b;
  --accent-soft:#f0f0f0;--highlight:#e3e3e3;--error:#a33932;
  --paper:#fbfbfb;--white:#fff;--warm:#f1f1f1;--wash:#f5f5f5;
  --accent-dark:#2c2c2c;--shadow:0 8px 24px #26262606;
  --seal:#a44837;--calligraphy:"STKaiti","KaiTi","楷体","Songti SC","SimSun",serif;
}
body{background:#efefef;background-image:none;color:var(--ink)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.book-coverage summary:focus-visible{outline-color:#767676}
input::placeholder,textarea::placeholder{color:#797979}
input,select,textarea{border-color:#dcdcdc;background-color:#fff}
.app-shell{position:relative;isolation:isolate;background:#fbfbfb;box-shadow:0 0 0 1px #dcdcdc,0 12px 80px #30303008}
.app-shell:before{content:"";position:fixed;z-index:-1;pointer-events:none;left:50%;transform:translateX(-50%);bottom:52px;width:min(100vw,520px);height:360px;background:url('/ink-landscape.png') center bottom/100% auto no-repeat;opacity:.68;mix-blend-mode:multiply}
.container{position:relative}
.header{background:#fbfbfbee;border-color:#e6e6e6;backdrop-filter:blur(16px)}
.brand{font-family:var(--calligraphy);color:#212121;font-weight:600;font-size:25px;letter-spacing:1px}
.brand-mark{width:33px;height:33px}
.app-title{color:#737373}.icon-button{color:#6b6b6b}.icon-button:hover{background:#f0f0f0}
.naming-panel{background:#ffffffee;border:1px solid #e1e1e1;border-radius:10px;box-shadow:0 3px 12px #2a2a2a03}
.naming-panel:before{left:18px;right:18px;height:1px;background:linear-gradient(90deg,transparent,#6c6c6c,transparent)}
.surname-field{border-color:#e0e0e0}.surname-field>label{color:#454545;font-family:var(--serif);font-size:16px}
.surname-field input{color:#2b2b2b;background:transparent;font-family:var(--calligraphy)}
.surname-field input::placeholder{color:#797979;font-family:var(--sans)}
.field-flower{display:none}.field-label{color:#636363}.preference-row{border-color:#e8e8e8}
.choice-group button{color:#6b6b6b;border-radius:5px}
.choice-group button[aria-pressed=true]{color:#303030;background:#efefef;border-color:#bebebe;box-shadow:inset 0 -1px #656565}
.style-choices button{color:#6a6a6a;background:#fff;border-color:#e0e0e0;border-radius:5px}
.style-choices button[aria-pressed=true]{color:#313131;background:#efefef;border-color:#a6a6a6;box-shadow:inset 0 -1px #656565}
.naming-options summary,.optional-label{color:#6f6f6f}
.naming-options .filter-section input,.naming-options .filter-section select{background:#f8f8f8;border-color:#dedede}
.naming-button{background:#2f2f2f;border-color:#2f2f2f;border-radius:5px 8px 6px 4px;box-shadow:0 2px 4px #25252522;font-family:var(--serif);font-weight:500;letter-spacing:3px}
.button.primary,.button-primary{background:#2f2f2f;border-color:#2f2f2f;color:#fff}
.button.primary:hover,.button-primary:hover{background:#1b1b1b;border-color:#1b1b1b}
.button.secondary{background:#f0f0f0;color:#575757}
.results-top h2,.page-intro h1{color:#2e2e2e;font-family:var(--calligraphy);font-weight:500}
.results-top h2{font-size:23px}.section-ornament{color:#818181}
.query-summary,.stroke-standard{color:#6c6c6c}
.result-card{border-color:#e0e0e0;background:#ffffffed;border-radius:10px;box-shadow:0 2px 10px #2f2f2f03}
.full-name,.pair{font-family:var(--calligraphy);color:#262626;font-weight:400}
.full-name{font-size:39px;letter-spacing:3px}.pair{font-size:34px}
.full-pinyin,.pair-pinyin{color:#6f6f6f}.name-meaning{color:#525252}
.name-style-tag{background:#f3f3f3;border-color:#e4e4e4;color:#5f5f5f;border-radius:3px}
.name-strokes{color:#707070}.bookmark{color:#828282;background:#f4f4f4;border-radius:8px}
.bookmark.saved{background:#eeeeee;color:#a44837}.bookmark.saved .icon{fill:#a4483722}
.result-quote,.modal-body .detail-quote{background:#f4f4f4;color:#414141;border-color:#e5e5e5;border-left:2px solid #959595;border-radius:2px 6px 6px 2px}
.result-quote mark,.detail-quote mark{background:#e4e4e4;color:#383838;border-bottom:1px solid #959595;border-radius:2px}
.result-source,.result-source span:first-child{color:#6f6f6f}.source-dot{color:#adadad}
.card-actions button{color:#6b6b6b}.card-actions button:hover{color:#393939}
.pair-relation,.result-tag{background:#f1f1f1;color:#6a6a6a;border-radius:3px}
.stroke-profile{background:#ffffffed;border-color:#e1e1e1;border-radius:10px}
.stroke-count-options button{background:#fafafa;border-color:#e1e1e1;color:#676767;border-radius:5px}
.stroke-count-options small{color:#7a7a7a}
.stroke-count-options button[aria-pressed=true]{background:#efefef;border-color:#b5b5b5;color:#3e3e3e}
.search-input-wrap{background:#fff;border-color:#d9d9d9;border-radius:8px}.search-input-wrap>.icon{color:#727272}
.search-button{border-radius:7px}.stroke-calculation,.stroke-equation,.stroke-equation b{color:#666666}
.mode-switch button{color:#737373}.mode-switch button[aria-pressed=true]{color:#373737}
.mode-switch button[aria-pressed=true]:after{background:#656565}
.range-switch{background:#ededed}.range-switch button{color:#737373}.range-switch button[aria-pressed=true]{background:#fff;color:#464646;box-shadow:0 1px 2px #38383810}
.text-panel{background:#fff;border-color:#e3e3e3;border-radius:9px}.text-meta,.text-meta select{color:#707070}.text-meta select{background:#f3f3f3}
.filter-button,.filter-button.has-filters{color:#5a5a5a}.filter-count{background:#484848}
.coverage-note{background:#f5f5f5;color:#606060;border:1px solid #e1e1e1}
.empty{border-color:#dddddd;background:#ffffffb8;border-radius:8px}.empty-symbol{color:#656565;background:#efefef;border-radius:7px}
.empty h3{color:#575757}.empty p{color:#797979}
.naming-placeholder{position:relative;color:#757575;background:#ffffff45;border:0;padding:21px 0 70px;font-family:var(--serif);letter-spacing:2px}
.bottom-nav{background:#fdfdfdf5;border-color:#e1e1e1;box-shadow:0 -2px 16px #35353503}
.bottom-nav a{color:#777777}.bottom-nav a.active{color:#373737}
.bottom-nav a.active:after{background:#a44837;width:10px;height:2px}
.account-card,.redeem-card,.orders-card,.plan-card,.settings-list,.book-card{background:#ffffffed;border-color:#e2e2e2;border-radius:10px;box-shadow:none}
.avatar{background:#efefef;color:#676767;border-radius:9px}.quota-row{background:#f4f4f4}
.redeem-card input{background:#fff;border-color:#d9d9d9}.soon-label{background:#f1f1f1;color:#727272}
.plan-price{color:#484848}.plan-card h3,.account-profile h2{color:#454545}
.settings-list>button:hover,.settings-list>a:hover{background:#f4f4f4}.settings-list .icon{color:#8c8c8c}
.library-overview{background:#f3f3f3;border-color:#e3e3e3;border-radius:9px}.stat-num{color:#4e4e4e}.stat-caption{color:#737373}
.book-symbol,.book-card:nth-child(4n+2) .book-symbol,.book-card:nth-child(4n+3) .book-symbol,.book-card:nth-child(4n) .book-symbol{background:#eeeeee;border-left-color:#a0a0a0;color:#5c5c5c;box-shadow:2px 3px 4px #3f3f3f0a}
.book-status{background:#f2f2f2;color:#646464}.book-card .button{background:#f9f9f9;border-color:#dfdfdf;color:#5e5e5e}
.modal,.filter-sheet{background:#fff;box-shadow:0 20px 80px #2e2e2e40;border-radius:16px}
.modal::backdrop,.filter-sheet::backdrop{background:#32323266}
.modal-head,.sheet-actions{background:#fff;border-color:#e3e3e3}.modal-head h2{color:#424242;font-family:var(--calligraphy);font-size:23px}
.detail-pair{font-family:var(--calligraphy);color:#3f3f3f}.detail-char{border-color:#e3e3e3}.detail-char>strong{color:#494949}.detail-note{background:#f5f5f5;color:#777777}
.auth-tabs{background:#f1f1f1}.auth-tabs .active{background:#fff;color:#515151;box-shadow:0 1px 3px #3f3f3f10}
.auth-form input,.modal textarea,.filter-section input,.filter-section select{background:#fafafa;border-color:#dcdcdc}
.sheet-handle{background:#d5d5d5}.switch-row input{background:#cccccc}.switch-row input:checked{background:#5b5b5b}
.toast{background:#383838ee;box-shadow:0 7px 25px #34343420}
.load-more{color:#676767;border-color:#d6d6d6;background:#ffffffa6;border-radius:7px}
.skeleton{background:linear-gradient(110deg,#f1f1f1 30%,#fff 45%,#f1f1f1 60%);background-size:220% 100%}
.inline-error:not(:empty){background:#f2f2f2;color:#9b3d33}
/* 后台同样使用中性灰阶。 */
.topbar{background:#fbfbfbf2;border-color:#e3e3e3}.brand small{color:#6d6d6d}
.stat-accent,.feature-panel,.badge-warm{background:#f1f1f1;border-color:#dddddd}
.badge{background:#f3f3f3;color:#626262}.file-picker{background:#f9f9f9;border-color:#d9d9d9}
.success-message,.notice{background:#f7f7f7;border-color:#d6d6d6;color:#565656}
.code-output textarea{background:#fafafa;border-color:#dddddd;color:#525252}
.button-outline{background:#fff;border-color:#d6d6d6}.button-outline:hover{background:#f4f4f4}
.nav-item{color:#696969}.nav-item:hover{background:#f1f1f1}.nav-item.active{background:#434343;color:#fff}
@media(max-width:699px){.modal,.filter-sheet{border-radius:17px 17px 0 0}}
@media(max-width:374px){.full-name{font-size:35px}.pair{font-size:31px}.brand{font-size:24px}.brand-mark{width:31px;height:31px}}
/* 完整解读、笔画步进与账户二级页面 */
.switch-row input:before{box-shadow:0 1px 4px #33333320}
.nav-item span,.nav-item.active span,.workspace-footer{color:#777}.nav-item.active span{color:#ccc}.empty-mark{color:#999;border-color:#ccc}.badge{border-color:#ddd}.preview-facts div{border-color:#e4e4e4}dialog{box-shadow:0 20px 80px #22222230}dialog::backdrop{background:#22222266}input:focus,textarea:focus,select:focus{outline-color:#55555530;border-color:#555}
.stroke-total-label{display:block;margin:12px 2px 8px;font-size:13px;color:#666}
.search-input-wrap.stroke-stepper{padding:2px 4px;gap:0;min-height:54px;justify-content:space-between;background:#fff}
.stroke-stepper .stepper-button{min-width:44px;width:44px;height:44px;display:grid;place-items:center;border-radius:6px;color:#383838;flex:none}
.stroke-stepper .stepper-button:hover{background:#eee}.stroke-stepper .stepper-button:disabled{opacity:.3}.stepper-button .icon{width:18px;height:18px}
.stroke-stepper input{flex:1;width:42px;max-width:82px;padding:0;text-align:center;background:transparent;font-size:28px}.stroke-stepper .input-unit{margin:0 7px 0 0;font-size:13px;color:#666}
.source-block{display:block;margin:15px 0 5px;line-height:1.65;overflow-wrap:anywhere}
.source-title{display:block;font-size:14px;font-weight:600;color:#373737!important}.source-meta{display:block;margin-top:4px;font-size:12px;color:#6c6c6c}.source-collection{display:block;margin-top:3px;font-size:12px;color:#737373}
.interpretation-section{padding-top:1px;margin-top:20px}.interpretation-section h3{position:relative;font-size:16px;color:#333;padding-left:10px;margin:0 0 10px}.interpretation-section h3:before{content:"";width:2px;height:14px;background:#5b5b5b;position:absolute;left:0;top:5px}.interpretation-section p{font-size:14px;line-height:1.95;color:#525252}.character-meanings{display:grid;gap:10px}.character-meaning{display:flex;align-items:flex-start;gap:13px;padding:13px;background:#f5f5f5;border-radius:8px}.character-meaning>strong{font:30px/1.4 var(--calligraphy);color:#303030;flex:none}.character-meaning p{font-size:14px;line-height:1.9}
body[data-view=account] .header-account,body[data-view=membership] .header{display:none}
#view-account{padding-top:16px}.profile-card{padding:20px 19px 0;margin-bottom:16px;border-radius:19px;background:#ffffffed;border-color:#e3e3e3}
.profile-card .account-profile{width:100%;text-align:left;min-height:73px;gap:15px;padding:0;border:0;background:transparent}.profile-card button.account-profile{cursor:pointer}.profile-card .avatar{width:58px;height:58px;border-radius:18px;background:#eeeeee;color:#555;box-shadow:inset 0 0 0 1px #e2e2e2}.profile-card .avatar .icon{width:27px;height:27px}.profile-card .account-profile h2{font:600 22px/1.4 var(--sans);color:#333}.profile-card .account-profile p{margin-top:6px;font-size:12px;color:#777}.profile-card .account-profile>.icon{margin-left:auto;width:18px;color:#929292}
.account-metrics{display:grid;grid-template-columns:1fr 1fr;margin-top:19px;padding:15px 0;border-top:1px solid #ededed}.account-metric{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:64px;padding:3px 8px;text-align:center}.account-metric+ .account-metric{border-left:1px solid #e8e8e8}.account-metric strong{font-size:25px;font-weight:650;line-height:1.3;color:#333;font-variant-numeric:tabular-nums}.account-metric span{font-size:12px;color:#777}.account-metric small{font-size:10px;color:#777}
.membership-entry{width:100%;position:relative;isolation:isolate;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:90px;padding:18px 19px;margin-bottom:17px;border-radius:16px;background:#34383a;color:#fff;overflow:hidden;text-align:left;box-shadow:0 4px 12px #2525250d}.membership-entry:before{content:"名";position:absolute;right:18px;top:-25px;z-index:-1;font:135px var(--calligraphy);color:#ffffff08;transform:rotate(-9deg)}
.membership-entry-title{display:block;font-size:18px;font-weight:600;letter-spacing:.5px}.membership-entry-title>.icon{width:22px;margin-right:8px;color:#e1e1e1}.membership-entry-status{display:block;color:#c7cbcc;font-size:12px;margin-top:7px}.membership-entry-action{display:flex;align-items:center;white-space:nowrap;font-size:12px;border:1px solid #ffffff30;padding:7px 9px;border-radius:15px;color:#eee}.membership-entry-action .icon{width:13px;height:13px}
.account-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:1px;border:1px solid #e3e3e3;border-radius:16px;overflow:hidden;background:#e9e9e9;margin-bottom:17px}.account-shortcuts>button{display:flex;align-items:center;gap:10px;padding:15px 13px;min-height:76px;background:#fff;font-size:14px;white-space:nowrap}.shortcut-icon{width:35px;height:35px;border-radius:11px;display:grid;place-items:center;background:#f0f0f0;color:#676767;flex:none}.shortcut-icon .icon{width:20px;height:20px}.account-shortcuts>button>.icon{width:13px;height:13px;margin-left:auto;color:#999}.settings-list{border-radius:16px}.settings-list>button,.settings-list>a{min-height:53px;color:#575757}#account-logout{color:#8a4740}
.subpage-bar{position:sticky;top:0;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:10px;height:62px;background:#fbfbfbef;backdrop-filter:blur(12px);margin:0 -18px 16px;padding:0 14px}.subpage-bar h1{font:600 18px var(--sans);color:#333}.subpage-spacer{width:44px;flex:none}.back-button .icon{transform:rotate(180deg);width:19px;height:19px}
.membership-pass{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(125deg,#252a2c,#596063);color:#fff;padding:25px 23px;border-radius:20px;min-height:176px;box-shadow:0 7px 19px #2222220e}.membership-pass:before{content:"名";position:absolute;right:10px;top:15px;font:145px var(--calligraphy);color:#ffffff0d;z-index:-1;transform:rotate(-10deg)}.membership-pass-title{font:30px/1.4 var(--calligraphy);letter-spacing:1px;color:#fff}.membership-pass-plan{font-size:14px;color:#eceeee;margin-top:12px}.membership-pass-expiry{font-size:12px;color:#cbd0d2;margin-top:16px;line-height:1.8}
.membership-status{border:1px solid #dedede;background:#ffffffee;border-radius:13px;margin:16px 0 20px;padding:15px 17px;font-size:13px;line-height:1.9;color:#656565}.membership-status:empty{display:none}.membership-status strong{display:block;color:#3c3c3c;font-size:15px;margin-bottom:4px}.membership-status p{font-size:13px;line-height:1.9}.membership-section{margin-top:20px}.membership-section h2{font-size:16px;font-weight:600;margin-bottom:12px}.membership-plans{display:grid;grid-template-columns:1fr 1fr;gap:12px}.membership-plans .plan-card{padding:17px 13px;border-radius:13px}.membership-plans .plan-price{font-size:25px}.membership-plans .plan-state{font-size:11px}
.benefits-card{background:#ffffffee;border:1px solid #e1e1e1;border-radius:15px;padding:18px;margin-bottom:16px}.benefits-table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}.benefits-table th,.benefits-table td{padding:12px 6px;border-bottom:1px solid #ececec;text-align:center;overflow-wrap:anywhere}.benefits-table th{background:#f2f2f2;font-weight:500;color:#555}.benefits-table th:first-child,.benefits-table td:first-child{text-align:left}.benefits-table tr:last-child td{border:0}.benefit-item{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid #eee}.benefit-item:last-child{border:0}.benefit-item .icon{color:#777}.benefit-item strong{font-size:14px}.benefit-item p{font-size:12px;color:#777;margin-top:5px;line-height:1.8}
.member-fold{background:#ffffffee;border:1px solid #e0e0e0;border-radius:13px;margin:12px 0;scroll-margin-top:76px}.member-fold summary{min-height:57px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;padding:11px 16px;font-size:14px;color:#555}.member-fold summary::-webkit-details-marker{display:none}.member-fold summary>span{display:flex;align-items:center;gap:10px}.member-fold summary .icon{width:18px;height:18px}.member-fold summary>.icon{width:15px;height:15px;transform:rotate(90deg)}.member-fold[open] summary>.icon{transform:rotate(-90deg)}.member-fold-body{padding:0 17px 18px}.member-fold #redeem-form{display:flex;gap:8px}.member-fold #redeem-code{width:100%;min-width:0;flex:1;border:1px solid #d6d6d6;border-radius:9px;min-height:46px;padding:10px 12px;font-size:16px;background:#fafafa}.member-fold #redeem-form .button{padding:10px 16px}.member-fold #orders{font-size:13px;color:#777}
@media(max-width:374px){.subpage-bar{margin-left:-13px;margin-right:-13px}.account-shortcuts>button{gap:7px;padding:13px 9px;font-size:13px}.shortcut-icon{width:30px;height:32px}.membership-entry{padding:17px 15px}.membership-entry-title{font-size:16px}.membership-entry-action{padding:6px 8px}.profile-card{padding-left:16px;padding-right:16px}.source-title{font-size:13px}.stroke-stepper .stepper-button{width:44px;min-width:44px}.search-input-wrap.stroke-stepper{padding-left:1px;padding-right:1px}.stroke-stepper .input-unit{margin-right:3px}}
.bottom-nav{grid-template-columns:repeat(3,1fr)}body[data-view=search] .header{display:none}.profile-copy{flex:1;min-width:0}.profile-name{font-size:22px;font-weight:600;line-height:1.4;color:#333;overflow-wrap:anywhere}.profile-description{font-size:12px;line-height:1.8;color:#777;margin-top:6px}.membership-benefits-list{list-style:none;margin:0;padding:0}.membership-benefits-list li{padding:14px 0;border-bottom:1px solid #eaeaea;font-size:13px;line-height:1.9;color:#666}.membership-benefits-list li:last-child{border:0}.membership-benefits-list strong{color:#333}.membership-benefits-list p{margin:5px 0 0}.favorites-compare-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 0 16px;flex-wrap:wrap;font-size:12px;color:#777}.favorites-compare-toolbar .button{font-size:12px;padding:8px 12px;min-height:44px;border-radius:8px}.favorites-compare-toolbar>div{display:flex;gap:7px}.compare-choice{width:100%;min-height:44px;border-top:1px solid #e6e6e6;color:#777;font-size:13px;margin-top:3px}.compare-choice.selected{background:#f0f0f0;color:#252525;font-weight:600;border-radius:0 0 8px 8px}.comparison-scroll{overflow-x:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:10px}.name-comparison{border-collapse:separate;border-spacing:0;min-width:100%;font-size:13px;color:#555;table-layout:fixed}.name-comparison th,.name-comparison td{min-width:155px;max-width:200px;padding:14px 12px;vertical-align:top;text-align:left;line-height:1.8;border-right:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;overflow-wrap:anywhere}.name-comparison th{font-weight:600;background:#f3f3f3;color:#303030}.name-comparison th:first-child,.name-comparison td:first-child{min-width:70px;max-width:86px;position:sticky;left:0;background:#f7f7f7;z-index:1;font-size:12px}.name-comparison tr:first-child th{font:23px/1.5 var(--calligraphy)}.name-comparison tr:first-child th:first-child{font:12px var(--sans)}.name-comparison td p+p{margin-top:7px}.name-comparison td p{font-size:13px;line-height:1.8}.name-comparison strong{font-weight:500}
.profile-name,.profile-description,.membership-pass-title,.membership-pass-plan,.membership-pass-expiry{display:block}
.membership-benefits-list li>span{display:block;margin-top:5px;font-size:13px;line-height:1.8;color:#6e6e6e}
.comparison-quote{margin-top:10px;line-height:1.9}
.settings-list .membership-entry.compact{min-height:58px;margin:0;padding:14px 17px;border-radius:0;background:transparent;color:#555;box-shadow:none;gap:8px;width:100%;border-bottom:1px solid #ededed}
.membership-entry.compact:before,.membership-entry.compact:after,.membership-entry.compact>.icon{display:none}
.membership-entry.compact .membership-entry-copy{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:1}
.membership-entry.compact .membership-entry-title{font-size:14px;font-weight:400;color:#555}
.membership-entry.compact .membership-entry-status{font-size:11px;margin:0;color:#888}
.membership-entry.compact .membership-entry-action{padding:0;border:0;border-radius:0;background:none;font-size:0;color:#888}
.membership-entry.compact .membership-entry-action .icon{width:15px;height:15px}
.brand-mark{width:42px;height:42px;object-fit:contain;border-radius:0;box-shadow:none;background:transparent}
.brand{gap:9px;letter-spacing:2px}
.account-sync-button{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;border-top:1px solid #ededed;color:#707070;font-size:12px;padding:10px 0}
.account-sync-button:hover{background:#fafafa}
.source-reading{font-size:16px;line-height:2.15;color:#484848;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:19px}.source-reading mark{background:#e4e4e4;color:#242424}.source-reading-note{font-size:12px;color:#777;margin-top:12px;line-height:1.8}
.share-preview{background:#eee;border:1px solid #e1e1e1;border-radius:8px;overflow:hidden}.share-preview img{display:block;width:100%;height:auto;-webkit-touch-callout:default;user-select:auto}
.share-actions{display:flex;gap:10px;position:sticky;bottom:0;background:#ffffffed;backdrop-filter:blur(10px);padding:14px 0 1px}.share-actions .button{flex:1;text-align:center;justify-content:center;min-height:46px;border-radius:9px}.share-note{font-size:12px;color:#777;line-height:1.85;margin-top:12px}
.detail-actions{flex-wrap:wrap}.detail-actions .button{min-height:44px}.detail-actions .button.primary{background:#303030;color:#fff;border-color:#303030}
#stroke-pagination-top,#stroke-pagination-bottom{margin:14px 0;padding:12px;border:1px solid #e3e3e3;border-radius:10px;background:#ffffffef}
.stroke-pagination-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.stroke-page-status{font-size:13px;color:#555;white-space:nowrap;font-variant-numeric:tabular-nums}.stroke-pagination .button{min-height:44px;padding:7px 10px;font-size:12px;border-radius:7px;background:#f7f7f7;border:1px solid #e3e3e3;white-space:nowrap}.stroke-pagination .button:disabled{opacity:.35;cursor:default}
.stroke-page-jump{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:8px;font-size:12px;color:#666}.stroke-page-jump label{display:flex;align-items:center;gap:5px;white-space:nowrap}.stroke-page-jump input{width:54px;height:40px;padding:4px;text-align:center;border:1px solid #ddd;border-radius:6px;font-size:16px;background:#fff;appearance:textfield}.stroke-page-jump input::-webkit-inner-spin-button{appearance:none}.stroke-pagination-note{font-size:11px;line-height:1.7;color:#777;margin-top:8px}
.source-reading .source-meta,.source-reading .source-scope,.source-reading .source-coverage{font:12px/1.8 var(--sans);color:#777;margin:8px 0;white-space:normal}.source-reading h3{font:25px/1.6 var(--calligraphy);color:#333}.source-reading .source-text{white-space:pre-wrap;overflow-wrap:anywhere;font:19px/2.1 var(--serif);margin-top:18px}
.detail-return{min-height:44px;display:flex;align-items:center;color:#777;font-size:13px;padding:0 0 12px;text-align:left}
@media(max-width:374px){#stroke-pagination-top,#stroke-pagination-bottom{padding:10px}.stroke-pagination .button{padding:7px 8px}.stroke-page-status{font-size:12px}.stroke-page-jump{gap:4px}.stroke-page-jump input{width:46px}}
.comparison-quote mark{background:#e4e4e4;color:#292929;padding:1px 2px;border-radius:2px}
.name-comparison:has(thead th:nth-child(3):last-child){width:100%}
.name-comparison:has(thead th:nth-child(3):last-child) th,.name-comparison:has(thead th:nth-child(3):last-child) td{min-width:120px;padding:12px 9px}
.name-comparison:has(thead th:nth-child(3):last-child) th:first-child,.name-comparison:has(thead th:nth-child(3):last-child) td:first-child{width:58px;min-width:58px;padding:12px 8px}
.local-storage-note{font-size:12px;line-height:1.8;color:#777;margin:8px 0}
.storage-warning{font-size:13px;line-height:1.8;color:#6a514d;background:#f5f3f3;border:1px solid #e6dfdf;border-radius:8px;padding:10px 12px;margin:12px 0}
@media(max-width:374px){.brand-mark{width:38px;height:38px}.brand{gap:8px}}

/* Professional search: one compact, touch-friendly row per result. */
#results.results{display:block;background:#ffffffed;border:1px solid #e2e2e2;border-radius:12px;overflow:hidden}
#results:empty{display:none}
#results .stroke-result-row,.stroke-result-row{display:flex;align-items:center;gap:2px;min-height:76px;margin:0;padding:8px 8px 8px 14px;background:transparent;border:0;border-bottom:1px solid #e9e9e9;border-radius:0;box-shadow:none;min-width:0}
#results .stroke-result-row:last-child{border-bottom:0}
.stroke-row-open{display:flex;flex:1;flex-direction:column;justify-content:center;gap:4px;min-width:0;min-height:56px;padding:0;text-align:left;border-radius:4px}
.stroke-row-heading{display:flex;align-items:baseline;gap:8px;min-width:0;width:100%}
.stroke-row-name{font:25px/1.25 var(--calligraphy);letter-spacing:1px;color:#262626;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.stroke-row-total{font:12px/1.4 var(--sans);color:#666;white-space:nowrap;flex:none}
.stroke-row-source{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:12px/1.5 var(--sans);color:#737373}
.stroke-row-actions{display:flex;align-items:center;flex:none;gap:4px}
.stroke-row-action{display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:8px;color:#6d6d6d}
.stroke-row-action .icon{width:19px;height:19px}
.stroke-row-action:hover,.stroke-row-open:hover{background:#f5f5f5}
.stroke-row-action.saved{color:#303030;background:#eeeeee}
.stroke-row-action.saved .icon{fill:#55555522}
.stroke-result-row:has(.compare-choice){flex-wrap:wrap}
.stroke-result-row .compare-choice{flex-basis:100%}
@media(max-width:374px){#results .stroke-result-row,.stroke-result-row{padding-left:10px;padding-right:4px;gap:0}.stroke-row-actions{gap:0}.stroke-row-name{font-size:23px;letter-spacing:0}.stroke-row-heading{gap:5px}}

/* Detail actions remain horizontal even on small phones. */
.detail-actions.detail-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:22px}
.detail-actions-grid .button{min-width:0;min-height:48px;padding:10px 7px;font-size:14px;line-height:1.5;white-space:nowrap;gap:6px}
.detail-actions-grid .button .icon{width:18px;height:18px}
.source-opening{font-size:13px;line-height:1.8;color:#5c5c5c;margin-top:5px;overflow-wrap:anywhere}
@media(max-width:374px){.detail-actions-grid .button{font-size:13px;gap:4px;padding:10px 5px}.detail-actions.detail-actions-grid{gap:8px}}

/* A saved name has a clearly distinct filled state. */
.bookmark.saved,.stroke-row-action.saved,.detail-actions-grid .button[data-save][aria-pressed=true]{background:#292929;color:#fff;border-color:#292929;box-shadow:0 0 0 1px #292929}
.bookmark.saved .icon,.stroke-row-action.saved .icon,.detail-actions-grid .button[data-save][aria-pressed=true] .icon{fill:currentColor;stroke:currentColor}
.bookmark.saved:hover,.stroke-row-action.saved:hover,.detail-actions-grid .button[data-save][aria-pressed=true]:hover{background:#111;color:#fff}

.catalog-library{margin-top:22px}.catalog-card{background:#ffffffef;border:1px solid #dedede;border-radius:12px;padding:18px}.catalog-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.catalog-heading h2{font-size:17px}.catalog-state{font-size:12px;border-radius:5px;background:#ededed;color:#555;padding:4px 8px}.catalog-card>p,.catalog-note{font-size:12px;color:#737373;line-height:1.8;margin:9px 0}.catalog-card summary{min-height:44px;padding:12px 0;font-size:14px;cursor:pointer}.catalog-scroll{max-height:340px;overflow:auto;overscroll-behavior:contain;font-size:14px;line-height:2.3}.catalog-scroll ol{padding-left:28px;margin:0}.catalog-scroll li{padding:4px 0;border-bottom:1px solid #eee}
