@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700;800&display=swap');
:root{font-family:'DM Sans','Noto Sans JP',system-ui,sans-serif;color:#f5f3ef;background:#12151b}*{box-sizing:border-box}html{background:#12151b}body{margin:0}.app{max-width:720px;min-height:100svh;margin:auto;padding:env(safe-area-inset-top) 22px env(safe-area-inset-bottom);display:flex;flex-direction:column}header{display:flex;align-items:center;justify-content:space-between;padding:24px 0 38px;gap:10px}.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:15px;letter-spacing:-.5px}.mark{font-family:Georgia,serif;font-size:30px;font-style:italic;line-height:1}.brand small{display:block;font:600 9px 'DM Sans',sans-serif;letter-spacing:2.4px;margin-top:3px}.topcap{color:#7e848f;font-size:9px;letter-spacing:1px;white-space:nowrap}.eyebrow{font-size:11px;color:#8f98a8;letter-spacing:2.8px;font-weight:700}h1{font-size:clamp(48px,12vw,86px);font-weight:800;letter-spacing:-.09em;line-height:1.12;margin:16px 0 12px}h1 em{font-style:normal;color:#b1cff3}h2{font-size:38px;letter-spacing:-.07em;margin:15px 0 28px}.lead{font-size:13px;color:#a3a9b2;line-height:1.9;margin:0 0 24px}.view{flex:1}.hidden{display:none!important}.choices{display:grid;gap:13px}.choice{min-height:180px;text-align:left;border:0;border-radius:17px;padding:23px;display:flex;flex-direction:column;justify-content:space-between;cursor:pointer;transition:transform .15s}.choice:active{transform:scale(.98)}.mono{background:#e9e9e5;color:#17181b}.color{background:#91bff9;color:#101e41}.num{font-size:10px;font-weight:800;letter-spacing:2.3px}.choice strong{font-size:clamp(30px,8vw,51px);font-weight:800;letter-spacing:-.075em}.choice-bottom{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:700}.choice-bottom span{font-size:26px}.textbtn,.back{border:0;background:none;color:#d7dce6;cursor:pointer;font-size:14px;font-weight:700;padding:24px 0;text-align:left}.textbtn span{margin-left:8px}.back{padding:0 0 24px;color:#b8c1ce}.field{display:block;font-weight:700;font-size:14px;margin:22px 0 10px}.field span{color:#94a3b8;font-size:10px;margin-left:6px}input[type=file]{position:absolute;opacity:0;width:1px;height:1px}.drop{background:#202630;border:1px dashed #697384;border-radius:16px;min-height:230px;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-top:12px;cursor:pointer}.drop #previewPlaceholder{font-size:45px;color:#b5c0d0;display:flex;flex-direction:column;align-items:center}.drop small{font-size:12px;letter-spacing:0;color:#8f9bac}.drop img{max-width:100%;max-height:430px;object-fit:contain;display:block}.drop img[hidden]{display:none}.hint{font-size:11px;color:#84909f;line-height:1.7;margin:9px 0 18px}.center{text-align:center}textarea{background:#202630;border:1px solid #455063;border-radius:13px;color:white;width:100%;padding:16px;line-height:1.9;font:14px 'Noto Sans JP',sans-serif;resize:vertical;outline:none;margin-top:10px}textarea:focus{border-color:#a7cafa}.detected{padding:18px;border-radius:12px;background:#202630;display:grid;gap:14px}.detected>div{display:flex;flex-direction:column;gap:5px}.detected span{color:#8e9cac;font-size:11px}.detected strong{font-size:15px;word-break:break-all}.detected .filename{font-size:12px}.warning{padding:12px;background:#5a242b;color:#fff;border-radius:8px;font-size:13px}.primary{border:0;border-radius:13px;background:#a7cafa;color:#11223c;display:flex;align-items:center;justify-content:space-between;width:100%;padding:20px;margin-top:19px;cursor:pointer;font:800 15px 'Noto Sans JP',sans-serif}.primary:disabled{opacity:.4}.records{display:grid;gap:12px}.record{background:#202630;border:1px solid #3b4556;border-radius:14px;padding:15px;display:grid;grid-template-columns:68px 1fr;gap:15px}.record img{width:68px;height:85px;object-fit:contain;background:#12151b;border-radius:7px}.record strong{font-size:14px}.record p{font-size:12px;color:#9ba6b6;line-height:1.5;margin:6px 0 9px}.record button{border:0;background:#394458;border-radius:5px;color:white;padding:7px 10px;margin-right:5px;font-size:11px;cursor:pointer}.record button.danger{background:#58343a}.empty{color:#8995a3;font-size:13px;padding:30px 0}footer{display:flex;justify-content:space-between;align-items:center;margin-top:45px;padding:22px 0;color:#657181;font-size:9px;letter-spacing:1.2px;border-top:1px solid #343a45;gap:12px}@media(min-width:650px){.app{padding-left:40px;padding-right:40px}.choices{grid-template-columns:1fr 1fr}.choice{min-height:260px}.choice strong{font-size:36px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* iPhone layout: never allow a card or long file name to widen the viewport */
html,body{width:100%;max-width:100%;overflow-x:hidden}.app,.view,.choices,.choice,.record,.record>div{min-width:0;max-width:100%}.app{width:100%;padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}.record{grid-template-columns:62px minmax(0,1fr)}.record img{width:62px}.record strong,.record p,.record button,.lead,.hint,.choice strong{overflow-wrap:anywhere;word-break:normal}.drive-panel{border:1px solid #38445a;border-radius:15px;padding:16px;margin:24px 0 0;background:#1b222e}.drive-head{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12px}.drive-head span{color:#b4c3d8;overflow-wrap:anywhere}.drive-btn{margin:7px 8px 4px 0;border:0;border-radius:9px;padding:13px 15px;background:#b1cff3;color:#101927;font-weight:800;font-size:13px;cursor:pointer}.drive-btn.secondary{background:#394357;color:#f5f3ef}.drive-btn:disabled,.record button:disabled{opacity:.5}.record .sync-status{font-size:11px;color:#b7cde8;margin:3px 0 9px}.record button.upload{background:#85b2ec;color:#101927;font-weight:800}footer span{min-width:0;overflow-wrap:anywhere}@media(max-width:380px){h1{font-size:48px}.choice strong{font-size:30px}.brand{font-size:12px}.topcap{font-size:8px}}

.translate-btn{background:#a9dfd0;color:#092c25;font-weight:700;margin:6px 6px 6px 0;max-width:100%;overflow-wrap:anywhere}.record details{margin:12px 0;color:#dce9ff}.record summary{cursor:pointer}.translated-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7} 
