:root{--bg:#fff8f5;--bg2:#f7f7ff;--card:#fff;--text:#27242b;--muted:#8b8490;--line:#eee7ec;--accent:#7456c8;--accent2:#eee9ff;--danger:#c44f63;--shadow:0 14px 36px rgba(73,54,88,.09)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:linear-gradient(150deg,var(--bg) 0%,#fff 46%,var(--bg2) 100%);color:var(--text)}body:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 8% 9%,rgba(255,190,213,.22),transparent 22%),radial-gradient(circle at 92% 18%,rgba(180,213,255,.25),transparent 24%);z-index:-1}button,input,textarea,select{font:inherit}.hidden{display:none!important}button{touch-action:manipulation}
.login{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{position:relative;overflow:hidden;width:min(430px,100%);background:rgba(255,255,255,.92);padding:34px;border-radius:32px;box-shadow:0 20px 65px rgba(79,56,95,.14)}.login-decor{position:absolute;border-radius:999px;opacity:.75}.decor-a{width:135px;height:135px;background:#ffe8f1;right:-50px;top:-55px}.decor-b{width:85px;height:85px;background:#e2f2ff;right:45px;top:42px}.brand-mark{position:relative;width:62px;height:62px;border-radius:20px;background:linear-gradient(145deg,#8d6ce2,#ff7fae);color:#fff;display:grid;place-items:center;font-weight:900;margin-bottom:22px;box-shadow:0 10px 24px rgba(116,86,200,.22)}.login h1{position:relative;margin:0 0 8px;font-size:32px}.login p{position:relative;color:var(--muted);margin:0 0 28px}.login label{display:block;font-size:13px;margin-bottom:8px;color:var(--muted)}
.password-row{display:flex;gap:8px}.password-row input{flex:1}.icon-btn,.round{border:0;background:rgba(255,255,255,.88);border-radius:16px;cursor:pointer;box-shadow:0 5px 16px rgba(79,56,95,.07)}.icon-btn{width:50px}.round{width:46px;height:46px;font-size:22px;color:var(--accent)}
input,textarea,select{width:100%;border:1px solid var(--line);background:rgba(255,255,255,.97);border-radius:16px;padding:14px 15px;outline:none;color:var(--text)}textarea{min-height:120px;resize:vertical}input:focus,textarea:focus,select:focus{border-color:#b8a8e6;box-shadow:0 0 0 4px rgba(116,86,200,.1)}input[type="date"]{-webkit-appearance:none;appearance:none;text-align:left;min-height:51px}.remember-row{display:flex!important;align-items:flex-start;gap:10px;margin:14px 2px 2px!important;color:#69616f!important;line-height:1.35}.remember-row input{width:20px;height:20px;flex:none;margin:0;accent-color:var(--accent)}
.primary{border:0;background:linear-gradient(135deg,#7a59cf,#a45fd1);color:#fff;border-radius:16px;padding:14px 18px;font-weight:800;box-shadow:0 8px 18px rgba(116,86,200,.18)}.wide{width:100%;margin-top:14px}.secondary{border:1px solid var(--line);background:#fff;border-radius:14px;padding:12px 16px}.danger{color:var(--danger)}.error{min-height:20px;color:var(--danger);font-size:13px;margin-top:10px}
.app{max-width:760px;margin:0 auto;min-height:100vh;padding-bottom:115px}.topbar{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;padding:21px 18px 15px;background:linear-gradient(180deg,rgba(255,248,245,.97) 65%,rgba(255,248,245,0));backdrop-filter:blur(14px)}.topbar h1{font-size:31px;margin:2px 0 0;letter-spacing:-.045em}.eyebrow{font-size:12px;color:#7b7180;font-weight:800;letter-spacing:.11em}.top-actions{display:flex;gap:9px}.view{padding:3px 18px 32px}
.hero{position:relative;overflow:hidden;background:linear-gradient(135deg,#6d52c7 0%,#9b62cf 58%,#ef83aa 125%);color:#fff;border-radius:28px;padding:24px;box-shadow:0 16px 34px rgba(102,71,170,.21);margin-bottom:19px}.hero:after{content:"";position:absolute;width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.1);right:-55px;top:-65px}.hero>*{position:relative;z-index:1}.hero .muted{color:rgba(255,255,255,.78)}.hero h2{font-size:25px;margin:5px 0 8px}.hero-row{display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,.94fr) minmax(0,1.28fr);gap:10px;margin-top:19px}.stat{flex:1;background:rgba(255,255,255,.14);border-radius:19px;padding:14px}.stat b{font-size:23px;display:block}.stat small{opacity:.82}
.section-head{display:flex;justify-content:space-between;align-items:center;margin:23px 2px 10px}.section-head h3{margin:0;font-size:18px}.text-btn{border:0;background:none;color:var(--accent);font-weight:800;padding:4px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.card{position:relative;overflow:hidden;background:var(--card);border:1px solid rgba(234,226,234,.7);border-radius:22px;padding:16px;box-shadow:0 7px 22px rgba(78,56,92,.055);cursor:pointer;min-height:132px}.card-icon{font-size:26px;margin-bottom:18px}.card h4{font-size:16px;margin:0 0 5px}.card p{font-size:12px;color:#736d76;margin:0;line-height:1.45}.count{float:right;background:rgba(255,255,255,.65);color:#5d5365;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:900}.tone-0{background:linear-gradient(145deg,#ffe9f1,#fff7fa)}.tone-1{background:linear-gradient(145deg,#eee9ff,#faf8ff)}.tone-2{background:linear-gradient(145deg,#e3f4ff,#f8fcff)}.tone-3{background:linear-gradient(145deg,#e2f6eb,#f8fffb)}.tone-4{background:linear-gradient(145deg,#ffeddc,#fff9f3)}.tone-5{background:linear-gradient(145deg,#fff2c9,#fffaf0)}.tool-card{background:linear-gradient(145deg,#e8e6f7,#fff5fa)}.card-menu{position:absolute;right:10px;bottom:10px;width:34px;height:34px;border:0;border-radius:12px;background:rgba(255,255,255,.74);color:#645b69;font-size:18px}
.list{display:flex;flex-direction:column;gap:9px}.row{background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:19px;padding:14px 15px;display:flex;align-items:center;gap:12px;box-shadow:0 4px 14px rgba(78,56,92,.035)}.row-main{flex:1;min-width:0}.row-title{font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row-sub{font-size:12px;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chev{color:#aca4b0}.row-menu{width:34px;height:34px;border:0;border-radius:12px;background:#f7f3fa;color:#73657d;font-size:18px;flex:none}.check{width:25px;height:25px;border-radius:9px;border:1.5px solid #c4bbc8;display:grid;place-items:center;cursor:pointer;flex:none}.check.done{background:linear-gradient(135deg,#7a59cf,#a45fd1);color:#fff;border-color:transparent}.done-text{text-decoration:line-through;color:#aaa2ad}.badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}.badge{font-size:11px;padding:5px 9px;border-radius:999px;background:#f3eff7;color:#675d6d}.badge.green{background:#e5f5ec;color:#397052}.badge.pink{background:#ffe8f1;color:#9b4968}.badge.blue{background:#e5f3ff;color:#386985}.badge.orange{background:#ffeddd;color:#925a32}.empty{padding:42px 18px;text-align:center;color:var(--muted)}.quick{display:flex;gap:8px;overflow:auto;padding-bottom:3px}.quick button{white-space:nowrap;border:1px solid #e9e1ee;background:#fff;padding:10px 13px;border-radius:999px;color:#62576a}
.bottom-nav{position:fixed;z-index:30;left:50%;bottom:10px;transform:translateX(-50%);width:min(724px,calc(100% - 20px));background:rgba(255,255,255,.93);backdrop-filter:blur(20px);border:1px solid rgba(235,226,236,.85);box-shadow:0 14px 38px rgba(76,52,88,.14);border-radius:25px;padding:8px;display:grid;grid-template-columns:repeat(6,1fr)}.bottom-nav button{border:0;background:none;color:#938998;padding:7px 3px;border-radius:16px;display:flex;flex-direction:column;align-items:center;gap:3px}.bottom-nav button span{font-size:21px;line-height:1.05}.bottom-nav button small{font-size:9px}.bottom-nav button.active{background:linear-gradient(135deg,#eee8ff,#ffeaf2);color:#6a4aba;font-weight:900}.fab{position:fixed;z-index:35;right:max(22px,calc((100vw - 760px)/2 + 24px));bottom:88px;width:59px;height:59px;border:0;border-radius:20px;background:linear-gradient(145deg,#7652cb,#ec79a7);color:#fff;font-size:34px;box-shadow:0 12px 26px rgba(116,86,200,.3)}
.modal{position:fixed;z-index:100;inset:0;background:rgba(39,31,43,.38);display:flex;align-items:flex-end;justify-content:center}.sheet{width:min(760px,100%);max-height:88vh;overflow:auto;background:#fffaf8;border-radius:30px 30px 0 0;padding:15px 18px calc(22px + env(safe-area-inset-bottom));box-shadow:0 -18px 50px rgba(53,38,60,.13)}.grab{width:48px;height:5px;border-radius:999px;background:#d8d0d4;margin:0 auto 20px}.sheet h2{font-size:25px;margin:0 0 18px}.field{margin-bottom:14px}.field label{display:block;color:var(--muted);font-size:12px;margin:0 0 7px}.actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.menu-list{display:flex;flex-direction:column;gap:8px}.menu-action{width:100%;border:1px solid var(--line);background:#fff;border-radius:16px;padding:13px 14px;text-align:left;color:var(--text);font-weight:750}.menu-action small{display:block;color:var(--muted);font-weight:400;margin-top:3px}.info-box{padding:13px 14px;border-radius:16px;background:linear-gradient(135deg,#f0eaff,#ffedf5);color:#6b6171;font-size:12px;line-height:1.5}.toast{position:fixed;z-index:200;left:50%;bottom:150px;transform:translateX(-50%);background:#342c38;color:#fff;padding:11px 15px;border-radius:14px;font-size:12px;box-shadow:0 10px 24px rgba(0,0,0,.18)}
.titlebar{display:flex;align-items:center;gap:10px;margin:2px 0 15px}.back{width:46px;height:46px;flex:none;border:1px solid var(--line);border-radius:15px;background:#fff;color:#2974c8;font-size:24px}.titlebar-main{flex:1;min-width:0}.titlebar-main b{font-size:18px}.secret-box{display:flex;gap:7px}.secret-box input{flex:1}.calendar-strip{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin:9px 0 18px}.day{border:1px solid var(--line);border-radius:14px;padding:9px 2px;text-align:center;background:#fff}.day small{display:block;color:var(--muted);font-size:10px}.day b{font-size:15px}.day.active{background:linear-gradient(145deg,#7652cb,#a45fd1);color:#fff}.day.active small{color:#eee}
.month-nav{display:grid;grid-template-columns:52px 1fr 52px;gap:8px;margin-bottom:13px}.month-nav>button{border:1px solid var(--line);background:#fff;border-radius:17px}.month-current{padding:10px}.month-current span{display:block;font-weight:850}.month-current small{color:var(--muted)}.expense-summary,.day-summary{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#ffe6d4,#ffe8f1 55%,#eee8ff);border-radius:23px;padding:18px;border:1px solid rgba(235,222,232,.9)}.expense-summary>div:first-child,.day-summary>div:first-child{display:flex;flex-direction:column}.expense-summary strong,.day-summary strong{font-size:30px;line-height:1.1;margin:5px 0}.expense-summary span{color:#8c7e86;font-size:11px}.expense-summary-icon{width:62px;height:62px;border-radius:21px;background:rgba(255,255,255,.65);display:grid;place-items:center;font-size:30px}.category-money,.home-money{font-size:19px;font-weight:900}.expense-day-row{cursor:pointer}.date-bubble{width:45px;height:45px;flex:none;border-radius:15px;background:linear-gradient(145deg,#f2ebff,#ffeef4);display:flex;flex-direction:column;align-items:center;justify-content:center}.date-bubble b{font-size:17px}.date-bubble small{font-size:9px;color:#766b7c}.row-amount{font-weight:900;white-space:nowrap}.expense-dot{width:35px;height:35px;display:grid;place-items:center;border-radius:12px;background:#f8f3fa;font-size:18px;flex:none}.day-add{width:48px;height:48px;border:0;border-radius:17px;background:linear-gradient(145deg,#7652cb,#ec79a7);color:#fff;font-size:27px}.expense-total-line{margin-top:15px;background:rgba(255,255,255,.78);border:1px dashed #d9cddc;border-radius:18px;padding:14px 15px;display:flex;justify-content:space-between;gap:14px;color:#6b626e}.expense-breakdown{margin:12px 0 4px;border:1px solid #e7ddea;border-radius:20px;background:#fff;overflow:hidden}.expense-breakdown summary{display:flex;align-items:center;gap:10px;padding:14px 15px;cursor:pointer;list-style:none}.expense-breakdown summary::-webkit-details-marker{display:none}.expense-breakdown summary>div{flex:1;display:flex;flex-direction:column}.expense-breakdown summary small{color:var(--muted);font-size:10px}.expense-place-row{display:flex;align-items:center;gap:12px;padding:11px 15px;border-top:1px solid #f0e9f1}.expense-place-main{flex:1;display:flex;flex-direction:column}.expense-place-main small{font-size:10px;color:var(--muted)}
.content-hub-list{display:flex;flex-direction:column;gap:11px}.content-hub-card{width:100%;border:1px solid #e9e0eb;border-radius:22px;padding:17px 15px;display:flex;align-items:center;gap:13px;text-align:left;color:var(--text)}.content-tone-purple{background:linear-gradient(145deg,#eee9ff,#faf8ff)}.content-tone-peach{background:linear-gradient(145deg,#ffeadb,#fff8f2)}.content-tone-mint{background:linear-gradient(145deg,#e0f5ea,#f8fffb)}.content-hub-icon{width:46px;height:46px;border-radius:15px;background:rgba(255,255,255,.72);display:grid;place-items:center;font-size:23px}.content-hub-main{flex:1;display:flex;flex-direction:column}.content-hub-main small{font-size:11px;color:var(--muted);margin-top:4px}.meal-idea-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.meal-type-card{border:1px solid var(--line);border-radius:20px;padding:16px 14px;background:#fff;display:flex;align-items:center;gap:10px}.meal-ideas-list{display:flex;flex-direction:column;gap:10px}.meal-idea-card{background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden}.meal-idea-main{width:100%;border:0;background:transparent;text-align:left;padding:14px 15px;color:var(--text)}.video-link{display:flex;justify-content:center;margin:0 12px 12px;padding:10px;border-radius:13px;background:linear-gradient(135deg,#f1ebff,#ffeef4);color:#694cb4;text-decoration:none;font-size:12px;font-weight:850}.choice-grid{display:flex;flex-wrap:wrap;gap:8px}.choice-chip{position:relative}.choice-chip input{position:absolute;opacity:0}.choice-chip span{display:block;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:#fff}.choice-chip input:checked+span{background:linear-gradient(135deg,#7652cb,#a45fd1);color:#fff;border-color:transparent}
.order-list{display:flex;flex-direction:column;gap:8px}.order-row{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--line);border-radius:17px;padding:11px 12px}.order-main{flex:1}.order-buttons{display:flex;gap:5px}.order-buttons button{width:35px;height:35px;border:1px solid var(--line);border-radius:11px;background:#faf7fc;color:#684e9f}
/* Photo editor: local darkening and blur */
.photo-tool-wrap{display:flex;flex-direction:column;gap:14px}.photo-drop{border:1.5px dashed #d8cbe1;border-radius:24px;padding:22px;text-align:center;background:linear-gradient(145deg,#faf7ff,#fff7fa)}.photo-drop input{display:none}.photo-upload-btn{display:inline-flex;align-items:center;gap:8px;border:0;background:linear-gradient(135deg,#7652cb,#a45fd1);color:#fff;border-radius:15px;padding:13px 17px;font-weight:850}.photo-canvas-box{background:#ece8ef;border-radius:24px;overflow:hidden;display:grid;place-items:center;min-height:240px;box-shadow:inset 0 0 0 1px rgba(80,60,90,.05)}.photo-canvas-box canvas{display:block;max-width:100%;height:auto}.photo-controls{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px}.slider-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.slider-head b{font-size:15px}.slider-value{font-weight:900;color:var(--accent)}input[type=range]{padding:0;border:0;background:transparent;box-shadow:none;accent-color:var(--accent)}.photo-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.photo-info{font-size:11px;color:var(--muted);text-align:center;line-height:1.45}.photo-tool-card{min-height:132px}
@media(max-width:430px){.hero-row{grid-template-columns:minmax(0,.78fr) minmax(0,.94fr) minmax(0,1.28fr);gap:7px}.stat{padding:11px 7px}.stat b{font-size:18px}.stat small{font-size:9.5px;line-height:1.18;display:block}.bottom-nav{padding:7px 4px}.bottom-nav button span{font-size:18px}.bottom-nav button small{font-size:8px}.expense-summary strong{font-size:28px}.row-amount{font-size:13px}.photo-actions{grid-template-columns:1fr}}

/* V17 photo editor refinements */
.photo-card-badges{display:flex;gap:5px;flex-wrap:wrap;margin-top:12px}
.photo-card-badges span{padding:5px 8px;border-radius:999px;background:rgba(255,255,255,.72);color:#7456a4;font-size:10px;font-weight:800}
.photo-intro-icons{display:flex;justify-content:center;align-items:center;gap:8px;margin-bottom:13px}
.photo-intro-icons span{display:grid;place-items:center;width:44px;height:44px;border-radius:15px;font-size:23px;background:linear-gradient(140deg,#efe7ff,#ffedf5)}
.photo-intro-icons span:nth-child(2){background:linear-gradient(140deg,#e0f3ff,#f1edff)}
.photo-intro-icons span:nth-child(3){background:linear-gradient(140deg,#ffebd9,#fff7ed)}
.photo-drop h3{font-size:21px;margin:0 0 7px;letter-spacing:-.03em}
.photo-drop p{color:#817887;font-size:13px;line-height:1.55;margin:0 auto 19px;max-width:390px}
.photo-drop{padding:27px 19px}
.photo-tool-wrap{gap:16px}
.photo-canvas-box{margin-top:16px;min-height:160px;background:repeating-conic-gradient(#e6e2ea 0% 25%,#f6f3f8 0% 50%) 50%/20px 20px}
.photo-control-stack{display:flex;flex-direction:column;gap:12px;margin-top:15px}
.photo-controls{padding:18px;background:linear-gradient(140deg,#fff,#fcf9ff)}
.photo-controls input[type=range]{width:100%;cursor:pointer;min-height:24px}
.photo-slider-labels{display:flex;justify-content:space-between;color:#99919e;font-size:10px;margin-top:9px}
.photo-actions{margin-top:13px}
.photo-save{font-size:16px;min-height:52px;margin:11px 0 0}
.photo-save:disabled{opacity:.7}
.photo-tool-wrap .photo-info{margin:10px 4px}
@media(max-width:430px){.photo-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-actions button{font-size:12px;padding:12px 6px}}

/* V19: smooth photo blur + 2/3 currency converter */
.photo-canvas-box{overflow:hidden;isolation:isolate}.photo-canvas-box canvas{transition:filter .12s ease;will-change:filter}
.currency-tool-card{min-height:132px;background:linear-gradient(145deg,#e8f7f2,#eef0ff 58%,#fff0f6)}
.fx-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(135deg,#e7f7ef,#edf1ff 58%,#fff0f6);margin-bottom:14px}.fx-hero small{color:var(--muted)}.fx-hero h2{font-size:24px;margin:5px 0 4px}.fx-hero p{color:var(--muted);font-size:12px;line-height:1.45;margin:0;max-width:410px}.fx-hero-icon{width:66px;height:66px;flex:none;border-radius:22px;background:rgba(255,255,255,.72);display:grid;place-items:center;font-size:31px}
.fx-segment{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:5px;border:1px solid var(--line);border-radius:18px;background:#fff;margin-bottom:13px}.fx-segment button{border:0;border-radius:13px;background:transparent;padding:11px;color:var(--muted);font-weight:850}.fx-segment button.active{color:#fff;background:linear-gradient(135deg,#7652cb,#a45fd1);box-shadow:0 6px 16px rgba(112,75,184,.22)}
.fx-stack{display:flex;flex-direction:column;gap:10px}.fx-field{border:1px solid var(--line);border-radius:21px;background:#fff;padding:13px;transition:.15s}.fx-field.fx-active{border-color:#cdb8ed;box-shadow:0 8px 22px rgba(126,88,190,.09)}.fx-field-head{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:10px;margin:0 2px 8px}.fx-flag{font-size:18px}.fx-input-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.8fr);gap:8px}.fx-input-row input{font-size:23px;font-weight:900;letter-spacing:-.02em}.fx-input-row select{font-size:12px;font-weight:750;padding-right:30px}.fx-status{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 2px 0;color:var(--muted);font-size:10px;min-height:31px}.fx-loading{animation:fxPulse 1.1s ease-in-out infinite}.error-inline{color:#c65e6e}.fx-note{margin-top:6px;padding:13px 14px;border-radius:17px;background:linear-gradient(135deg,#faf6ff,#fff7f2);color:var(--muted);font-size:10px;line-height:1.55}.fx-note a{color:#7652cb;text-decoration:none;font-weight:800}@keyframes fxPulse{50%{opacity:.45}}
@media(max-width:430px){.fx-input-row{grid-template-columns:1fr}.fx-input-row input{font-size:25px}.fx-input-row select{font-size:13px}.fx-hero{padding:17px}.fx-hero-icon{width:55px;height:55px;font-size:27px}.fx-hero h2{font-size:21px}}


/* V20: home layout controls and tighter dashboard */
.stat-money{min-width:0}
.stat-money b{font-size:18px;line-height:1.08;white-space:nowrap;letter-spacing:-.05em;font-variant-numeric:tabular-nums}
.compact-tool-card{min-height:116px;padding:14px}
.compact-tool-card .card-icon{font-size:23px;margin-bottom:10px}
.compact-tool-card h4{font-size:15px;margin-bottom:4px}
.compact-tool-card p{font-size:11px;line-height:1.35}
.compact-tool-card .photo-card-badges{margin-top:8px;gap:3px}
.compact-tool-card .photo-card-badges span{padding:4px 6px;font-size:9px}
.home-order-trigger{display:inline-flex;align-items:center;gap:4px}
.home-order-icon{width:32px;height:32px;border-radius:10px;background:#f7f2fa;display:grid;place-items:center;font-size:18px;flex:none}
.modal-help{color:var(--muted);font-size:12px;line-height:1.45;margin:-4px 0 13px}
@media(max-width:430px){
  .hero-row{grid-template-columns:minmax(0,.78fr) minmax(0,.94fr) minmax(0,1.28fr);gap:7px}
  .stat-money b{font-size:clamp(13px,3.85vw,16px)}
  .compact-tool-card{min-height:112px;padding:13px}
  .compact-tool-card .photo-card-badges span{font-size:8.5px;padding:4px 5px}
}

/* v21: keep the publications label inside its tile on narrow iPhones */
.hero-row .stat:nth-child(2){min-width:0}
.hero-row .stat:nth-child(2) small{overflow-wrap:normal;word-break:normal}
@media(max-width:430px){.hero-row .stat:nth-child(2) small{font-size:9px;letter-spacing:-.01em}}

.tt-tool-card{background:linear-gradient(145deg,#fff0e5,#fff8d8 48%,#edf7ee)}
.tt-hero{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:19px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(135deg,#fff0df,#fff7c9 48%,#eaf7ed);margin-bottom:13px}.tt-hero small{color:var(--muted)}.tt-hero h2{font-size:23px;margin:5px 0 5px;letter-spacing:-.025em}.tt-hero p{color:var(--muted);font-size:12px;line-height:1.45;margin:0;max-width:430px}.tt-hero-icon{width:64px;height:64px;flex:none;border-radius:21px;background:rgba(255,255,255,.75);display:grid;place-items:center;font-size:34px;font-weight:900;color:#72572d;box-shadow:0 8px 22px rgba(112,84,40,.08)}
.tt-amount-card{border:1px solid var(--line);background:#fff;border-radius:22px;padding:15px;margin-bottom:11px}.tt-amount-card>label{display:block;color:var(--muted);font-size:11px;margin-bottom:7px}.tt-amount-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}.tt-amount-row input{font-size:29px;font-weight:900;letter-spacing:-.025em;border:0;background:#faf8fb;border-radius:15px;padding:13px 14px;min-width:0}.tt-amount-row span{font-size:15px;font-weight:900;color:#6e5b87;padding-right:5px}.tt-quick{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.tt-quick button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 9px;font-size:10px;font-weight:800;color:#665d6d}
.tt-results{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:10px 0}.tt-result{border:1px solid var(--line);border-radius:21px;padding:15px;min-width:0}.tt-result small{display:block;color:var(--muted);font-size:10px;margin-bottom:8px}.tt-result b{display:block;font-size:22px;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tt-result span{display:block;color:var(--muted);font-size:10px;margin-top:7px}.tt-usd{background:linear-gradient(145deg,#eef5ff,#f7f3ff)}.tt-rub{background:linear-gradient(145deg,#fff1f3,#fff8ef)}.muted-card{background:#faf9fb}
.tt-result-input{display:flex;align-items:center;gap:7px;min-width:0}
.tt-result-input input{width:100%;min-width:0;border:0;background:rgba(255,255,255,.72);border-radius:13px;padding:10px 11px;font:inherit;font-size:22px;font-weight:850;letter-spacing:-.02em;color:var(--text);outline:none}
.tt-result-input>span{font-size:17px;font-weight:900;color:#6e5b87;margin:0;flex:none}
.tt-result-input input:focus{box-shadow:0 0 0 2px rgba(126,83,205,.17)}
.tt-result.tt-editing,.tt-amount-card.tt-editing{border-color:rgba(126,83,205,.45);box-shadow:0 0 0 3px rgba(126,83,205,.07)}
.tt-any-field-note{font-size:10px;line-height:1.45;color:var(--muted);padding:2px 4px 7px}

.tt-status{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--line);background:#fff;border-radius:18px;padding:12px 13px;margin-top:9px;min-height:48px}.tt-status>div{min-width:0}.tt-status b{display:block;font-size:11px}.tt-status span{display:block;color:var(--muted);font-size:9px;margin-top:3px}.tt-direction{display:flex;flex-direction:column;gap:3px;margin:10px 1px 0;padding:12px 13px;border-radius:17px;background:linear-gradient(135deg,#f8f3ff,#fff8ee)}.tt-direction b{font-size:11px}.tt-direction span{font-size:10px;line-height:1.45;color:var(--muted)}
@media(max-width:430px){.tt-hero{padding:16px}.tt-hero h2{font-size:20px}.tt-hero-icon{width:54px;height:54px;font-size:29px}.tt-results{grid-template-columns:1fr}.tt-result b{font-size:24px}.tt-amount-row input{font-size:27px}}

.tt-kzt{grid-column:1/-1;background:linear-gradient(145deg,#eefbf5,#f7f4ff)}
.tt-kzt-note{background:linear-gradient(135deg,#eefbf5,#f7f4ff)}

.thai-summary{background:linear-gradient(135deg,#f4fbf4,#fff5e5)}

.home-money-rub{font-size:12px;font-weight:800;color:#7d7183;margin-top:3px}
.thai-summary-rub{font-size:15px;font-weight:850;color:#78677f;margin-top:3px}
.thai-rate-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 15px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(135deg,#fffaf0,#f3fbf6);margin:10px 0 14px}
.thai-rate-card>div{min-width:0;display:grid;gap:3px}.thai-rate-card small,.thai-rate-card span{color:var(--muted);font-size:11px;line-height:1.35}.thai-rate-card b{font-size:17px;letter-spacing:-.01em}.thai-rate-card button{flex:none;width:42px;height:42px;border:0;border-radius:14px;background:#fff;color:#7957bf;font-size:18px;font-weight:800;box-shadow:inset 0 0 0 1px var(--line)}
.category-rub{font-size:12px;font-weight:800;color:#786e7c;margin-top:2px}.thai-row-money{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}.thai-row-money b{font-size:inherit}.thai-row-money small{font-size:10px;color:var(--muted);font-weight:700}.thai-place-money{display:flex!important;flex-direction:column;align-items:flex-end;gap:2px}.thai-place-money small{font-size:10px!important;color:var(--muted);font-weight:700}.thai-total-line>div{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.thai-total-line small{font-size:11px;color:var(--muted);font-weight:800}.thai-pay-source{white-space:nowrap}.thai-editor-rate{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 13px;border-radius:16px;background:#f8f3ff;margin:2px 0 12px}.thai-editor-rate span{font-size:12px;color:var(--muted)}.thai-editor-rate b{font-size:13px;white-space:nowrap}.field-hint{display:block;margin-top:5px;color:var(--muted);font-size:11px;line-height:1.35}.thai-rub-preview{display:flex;flex-direction:column;gap:3px;padding:12px 14px;border-radius:16px;background:linear-gradient(135deg,#f2f8ff,#fff4f8);margin:2px 0 13px}.thai-rub-preview span,.thai-rub-preview small{font-size:11px;color:var(--muted)}.thai-rub-preview b{font-size:20px}@media(max-width:390px){.thai-rate-card b{font-size:15px}.thai-row-money small{font-size:9px}}
