:root{color:#172022;background:#f7f4ed;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:linear-gradient(180deg,#f7f4edeb,#e8efece6),radial-gradient(circle at 20% 0%,rgba(233,95,63,.13),transparent 35%),#f7f4ed}button,textarea{font:inherit}button{border:0}button:disabled{cursor:not-allowed;opacity:.55}.shell{width:min(940px,100%);min-height:100vh;margin:0 auto;padding:16px;display:grid;gap:12px;align-content:start}.topbar,.translator,.result-panel,.history-panel{background:#fffcf6d1;border:1px solid rgba(35,61,66,.12);box-shadow:0 18px 48px #1c2b2f14}.topbar{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 18px;border-radius:8px}.title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}h1,h2,p{margin:0}h1{font-size:clamp(2rem,7vw,3.5rem);line-height:.95;letter-spacing:0}h2{font-size:1.2rem;line-height:1.2;letter-spacing:0}.eyebrow,.direction-badge,.version-badge,.status-badge,.quality-toggle,.hint-row,.message-text,.history-direction{font-size:.78rem;font-weight:750;letter-spacing:0}.eyebrow{color:#e95f3f;text-transform:uppercase}.version-badge,.status-badge,.direction-badge{display:inline-flex;min-height:30px;align-items:center;border-radius:999px;padding:6px 10px;white-space:nowrap}.version-badge{color:#31555c;background:#e7efec}.status-badge{color:#f7f4ed;background:#31555c}.status-badge[data-state=translating]{color:#172022;background:#f1c95b}.status-badge[data-state=error]{background:#c83f35}.translator,.result-panel,.history-panel{border-radius:8px;padding:16px}.translator{display:grid;gap:10px}.translator-header,.panel-header{display:flex;align-items:center;justify-content:space-between;gap:14px}.direction-badge{width:fit-content;margin-bottom:6px;color:#1d4b56;background:#dcebe8}.quality-toggle{width:fit-content;display:inline-grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:999px;background:#e7efec}.quality-toggle label{position:relative;min-width:76px;cursor:pointer}.quality-toggle input{position:absolute;opacity:0;pointer-events:none}.quality-toggle span{display:flex;min-height:30px;align-items:center;justify-content:center;border-radius:999px;padding:0 12px;color:#31555c}.quality-toggle input:checked+span{color:#fff8ef;background:#31555c}.primary-button,.actions button,#clearHistoryButton{min-height:42px;border-radius:8px;padding:0 14px;cursor:pointer;font-weight:800;color:#18373d;background:#e6eeeb;transition:transform .12s ease,background .12s ease}.primary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:112px;color:#fff8ef;background:#e95f3f}.primary-button:hover,.actions button:hover,#clearHistoryButton:hover{transform:translateY(-1px)}.primary-button:active,.actions button:active,#clearHistoryButton:active{transform:translateY(0)}.text-label{color:#42575b;font-size:.92rem;font-weight:800}.source-input,.result-text{width:100%;border-radius:8px;color:#172022;background:#fffdf8;border:1px solid rgba(29,75,86,.16)}.source-input{min-height:112px;max-height:32vh;resize:vertical;padding:14px;font-size:1.08rem;line-height:1.5;outline:none}.source-input:focus{border-color:#e95f3f;box-shadow:0 0 0 4px #e95f3f24}.hint-row{display:flex;flex-wrap:wrap;gap:8px;color:#52696f}.hint-row span{display:inline-flex;min-height:26px;align-items:center;border-radius:999px;padding:5px 9px;background:#eef2ed}.result-panel,.history-panel{display:grid;gap:10px}.actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.result-text{min-height:112px;max-height:30vh;overflow-y:auto;padding:14px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:1.12rem;line-height:1.55}.result-text.is-empty{color:#728083}.message-text{min-height:20px;color:#31555c}.message-text.is-error{color:#c83f35}.history-list{display:grid;gap:10px}.empty-history{color:#68777a}.history-item{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:stretch;overflow:hidden;border:1px solid rgba(29,75,86,.14);border-radius:8px;background:#fffdf8}.history-load{min-width:0;padding:12px;display:grid;gap:4px;text-align:left;cursor:pointer;color:inherit;background:transparent}.history-direction{color:#e95f3f}.history-source,.history-result{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-source{color:#172022;font-weight:750}.history-result{color:#52696f}.history-delete{cursor:pointer;color:#9a362e;background:#f5e5df;font-size:1.4rem;line-height:1}@media(max-width:640px){.shell{padding:10px;gap:10px}.topbar,.translator,.result-panel,.history-panel{padding:12px}h1{font-size:clamp(2rem,12vw,3rem)}.topbar,.translator-header,.panel-header{align-items:stretch;flex-direction:column}.status-badge,.primary-button,.quality-toggle,.actions,.actions button,#clearHistoryButton{width:100%}.actions{display:grid;grid-template-columns:1fr 1fr}.source-input,.result-text{min-height:108px;max-height:28vh}}
