*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;}
html,body{
  width:100%;height:100%;
  background:#888888;
  display:flex;justify-content:center;align-items:center;
  font-family:'Hiragino Kaku Gothic ProN','ヒラギノ角ゴ ProN','Noto Sans JP',sans-serif;
  overflow:hidden;
}
.ipad-frame{
  width:540px;height:820px;
  background:#ffffff;
  display:flex;flex-direction:column;
  overflow:hidden;
  border-radius:36px;
  border:10px solid #1a1a1a;
  box-shadow:0 24px 64px rgba(0,0,0,.65);
}
@media(max-height:860px){.ipad-frame{width:100vw;height:100vh;border-radius:0;border:none;}}

/* Header */
.header-top{height:32px;background:#f0f0f0;border-bottom:1px solid #ccc;display:flex;align-items:center;padding:0 12px;gap:8px;font-size:11px;color:#444;flex-shrink:0;}
.battery{margin-left:auto;}
.brand-bar{height:40px;background:#fff;border-bottom:2.5px solid #111;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;letter-spacing:.14em;color:#111;flex-shrink:0;}
.main{flex:1;overflow:hidden;position:relative;background:#fff;}
.back-area{height:44px;background:#f0f0f0;border-top:1px solid #ccc;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.back-btn{background:#fff;border:2px solid #111;color:#111;font-size:12px;font-weight:700;padding:6px 32px;border-radius:20px;cursor:pointer;font-family:inherit;}
.back-btn:active{background:#eee;}
.ai-area{height:50px;background:#f0f0f0;border-top:1px solid #ccc;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.ai-btn{width:46px;height:46px;background:radial-gradient(circle at 38% 32%,#aaa,#555 45%,#111);border:3px solid #333;border-radius:50%;color:#fff;font-size:13px;font-weight:800;cursor:pointer;font-family:inherit;box-shadow:0 4px 10px rgba(0,0,0,.4),inset 0 1px 3px rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;}
.ai-btn:active{transform:scale(.95);}
.line-area{height:50px;background:#111;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.line-btn{background:none;border:none;color:#fff;font-size:15px;font-weight:800;letter-spacing:.08em;cursor:pointer;font-family:inherit;width:100%;height:100%;}

/* HOME 5x5 */
.home-screen{width:100%;height:100%;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(5,1fr);padding:5px;background:#fff;}
.icon-btn{display:flex;align-items:center;justify-content:center;border:2px solid #111;border-radius:12px;cursor:pointer;font-family:inherit;margin:3px;}
.icon-btn:active{opacity:.7;transform:scale(.91);}
.icon-dark{background:#111;color:#fff;}
.icon-white{background:#fff;color:#111;}
.icon-label{font-size:11px;text-align:center;line-height:1.3;font-weight:800;}

/* 共通ページ */
.page-scroll{width:100%;height:100%;overflow-y:auto;padding:12px;background:#fff;}
.center-screen{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:#fff;padding:16px;}
.page-title{font-size:17px;font-weight:800;color:#111;text-align:center;}
.page-sub{font-size:11px;color:#888;text-align:center;line-height:1.6;margin-top:2px;}
.menu-btn{width:100%;padding:14px;background:#fff;color:#111;border:2px solid #111;border-radius:10px;font-size:15px;font-weight:800;cursor:pointer;font-family:inherit;margin-bottom:8px;text-align:center;}
.menu-btn:active{background:#f0f0f0;}
.send-btn{width:100%;padding:14px;background:#111;color:#fff;border:none;border-radius:10px;font-size:16px;font-weight:800;cursor:pointer;font-family:inherit;margin-bottom:8px;}
.send-btn:active{opacity:.8;}
.confirm-btn{width:100%;padding:12px;background:#fff;color:#111;border:2px solid #111;border-radius:10px;font-size:15px;font-weight:800;cursor:pointer;font-family:inherit;margin-bottom:8px;}
.confirm-btn:active{background:#f0f0f0;}

/* フォーム */
.form-screen{width:100%;height:100%;overflow-y:auto;padding:12px;background:#fff;}
.f-row{display:flex;align-items:center;gap:6px;margin-bottom:8px;}
.f-lbl{font-size:12px;font-weight:700;color:#111;width:68px;flex-shrink:0;}
.f-inp{flex:1;background:#fff;border:2px solid #111;color:#111;font-family:inherit;font-size:14px;padding:9px 10px;border-radius:10px;font-weight:600;text-align:center;}
.f-grp{display:flex;gap:5px;flex:1;}
.f-tog{flex:1;padding:9px 4px;background:#fff;border:2px solid #111;color:#111;border-radius:10px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;text-align:center;}
.f-tog.on{background:#111;color:#fff;}
.w-box{flex:1;background:#fff;border:2px solid #111;border-radius:10px;padding:9px 4px;font-size:15px;font-weight:800;color:#111;text-align:center;cursor:pointer;}

/* 統計 */
.stat-blk{margin-bottom:12px;}
.stat-ttl{font-size:13px;font-weight:800;color:#111;margin-bottom:6px;}
.stat-row{display:flex;align-items:center;gap:6px;margin-bottom:6px;}
.stat-lbl{font-size:12px;font-weight:700;color:#111;width:80px;flex-shrink:0;}
.stat-val{flex:1;background:#fff;border:2px solid #111;border-radius:10px;padding:9px;font-size:15px;font-weight:800;color:#111;text-align:center;}

/* モーダル */
.modal-bg{display:none;position:absolute;inset:0;background:rgba(0,0,0,.5);z-index:500;align-items:flex-end;}
.modal-bg.show{display:flex;}
.modal-box{background:#fff;border-radius:16px 16px 0 0;width:100%;padding:18px;border-top:2px solid #111;}
.modal-ttl{font-size:15px;font-weight:800;color:#111;margin-bottom:8px;}
.modal-body{font-size:13px;color:#444;line-height:1.8;margin-bottom:14px;}
.modal-cls{width:100%;padding:11px;background:#111;border:none;color:#fff;border-radius:10px;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;}

/* ボイレコ */
.vr-screen{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;padding:10px;gap:8px;}
.vr-status{flex-shrink:0;border:2px solid #111;border-radius:12px;padding:10px;display:flex;flex-direction:column;align-items:center;gap:3px;}
.vr-icon{font-size:26px;}
.vr-lbl{font-size:11px;color:#444;font-weight:700;}
.vr-timer{font-size:24px;font-weight:800;color:#111;font-variant-numeric:tabular-nums;}
.vr-log-wrap{flex:1;min-height:0;display:flex;flex-direction:column;border:2px solid #111;border-radius:12px;overflow:hidden;}
.vr-log-ttl{font-size:10px;font-weight:800;color:#444;padding:5px 10px;border-bottom:1px solid #ccc;flex-shrink:0;}
.vr-log{flex:1;overflow-y:auto;padding:10px;font-size:13px;color:#111;line-height:1.8;word-break:break-all;}
.vr-ph{color:#aaa;font-size:12px;}
.vr-cursor{animation:blink 1s step-end infinite;}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}
.vr-rec-btn{width:100%;padding:14px;border-radius:10px;border:2px solid #111;font-family:inherit;font-size:15px;font-weight:800;cursor:pointer;background:#111;color:#fff;display:flex;align-items:center;justify-content:center;gap:8px;}
.vr-rec-btn.recording{background:#c00000;}
.vr-save-btn{width:100%;padding:12px;border-radius:10px;border:2px solid #111;font-family:inherit;font-size:14px;font-weight:800;cursor:pointer;background:#fff;color:#111;}
.vr-save-btn:disabled{opacity:.3;cursor:not-allowed;}
.vr-clear-btn{width:100%;padding:8px;border:none;font-family:inherit;font-size:12px;cursor:pointer;background:transparent;color:#aaa;}

/* 車番管理 */
.cp-screen{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;padding:10px;gap:6px;}
.cp-ttl{font-size:16px;font-weight:800;color:#111;text-align:center;flex-shrink:0;}
.cp-sub{font-size:10px;color:#888;text-align:center;line-height:1.5;flex-shrink:0;}
.cp-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:1;min-height:0;}
.cp-box{border:2px dashed #bbb;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;position:relative;overflow:hidden;background:#fff;}
.cp-box.done{border:2px solid #111;border-style:solid;}
.cp-box-lbl{font-size:12px;font-weight:800;color:#111;margin-bottom:6px;}
.cp-box-icon{font-size:28px;color:#bbb;}
.cp-box-hint{font-size:9px;color:#bbb;text-align:center;padding:0 6px;margin-top:4px;line-height:1.5;}
.cp-preview{width:100%;height:100%;object-fit:cover;display:none;}
.cp-box.done .cp-preview{display:block;}
.cp-box.done .cp-box-lbl,.cp-box.done .cp-box-icon,.cp-box.done .cp-box-hint{display:none;}
.cp-retake{display:none;position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.6);color:#fff;font-size:11px;text-align:center;padding:6px;cursor:pointer;}
.cp-box.done:active .cp-retake{display:block;}
.cp-result{flex-shrink:0;border:2px solid #111;border-radius:10px;padding:8px 10px;min-height:48px;}
.cp-result-lbl{font-size:10px;font-weight:700;color:#444;margin-bottom:3px;}
.cp-result-txt{font-size:14px;font-weight:800;color:#111;}
.cp-result-hint{font-size:10px;color:#888;margin-top:2px;}
.cp-send-btn{width:100%;padding:14px;background:#111;color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:800;cursor:pointer;font-family:inherit;flex-shrink:0;}
.cp-send-btn:disabled{opacity:.3;cursor:not-allowed;}
.cp-send-btn:not(:disabled):active{opacity:.8;}

/* カメラモーダル */
.cam-modal{display:none;position:fixed;inset:0;background:#000;z-index:1000;flex-direction:column;}
.cam-modal.show{display:flex;}
.cam-video{flex:1;width:100%;object-fit:cover;}
.cam-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;}
.cam-guide{width:72%;aspect-ratio:16/9;border:3px solid #fff;border-radius:8px;box-shadow:0 0 0 9999px rgba(0,0,0,.4);}
.cam-hint{color:#fff;font-size:12px;font-weight:700;margin-top:12px;background:rgba(0,0,0,.5);padding:5px 14px;border-radius:16px;}
.cam-ctrl{display:flex;align-items:center;justify-content:space-between;padding:18px 24px 28px;background:rgba(0,0,0,.7);}
.cam-cancel{color:#fff;background:none;border:none;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;width:72px;}
.cam-shutter{width:64px;height:64px;border-radius:50%;background:#fff;border:4px solid #aaa;cursor:pointer;box-shadow:0 0 0 4px rgba(255,255,255,.3);}
.cam-shutter:active{transform:scale(.93);}

/* 翻訳 */
.trans-screen{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;}
.lang-list{padding:10px;display:flex;flex-direction:column;gap:8px;overflow-y:auto;}
.lang-btn{padding:14px;background:#fff;border:2px solid #111;color:#111;border-radius:10px;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;text-align:center;}
.lang-btn:active{background:#f0f0f0;}
.chat-bar{padding:7px 12px;background:#fff;font-size:11px;color:#444;text-align:center;border-bottom:1px solid #ccc;flex-shrink:0;font-weight:700;}
.chat-log{flex:1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:8px;}
.chat-entry{background:#fff;border:1.5px solid #111;border-radius:10px;padding:9px 11px;}
.chat-orig{font-size:12px;color:#666;margin-bottom:3px;}
.chat-trans{font-size:14px;color:#111;font-weight:700;}
.speak-btn{padding:14px;background:#111;color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:800;cursor:pointer;font-family:inherit;margin:8px;flex-shrink:0;}
.back-lang{background:none;border:none;color:#aaa;font-size:11px;cursor:pointer;font-family:inherit;padding:6px;text-align:center;flex-shrink:0;}

/* カレンダー */
.cal-screen{width:100%;height:100%;overflow-y:auto;padding:10px;background:#fff;}
.cal-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.cal-nav-btn{background:#fff;border:2px solid #111;color:#111;padding:5px 14px;border-radius:8px;cursor:pointer;font-family:inherit;font-size:14px;font-weight:700;}
.cal-month{font-size:15px;font-weight:800;color:#111;}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;}
.cal-dow{text-align:center;font-size:10px;color:#888;padding:3px 0;font-weight:700;}
.cal-day{text-align:center;padding:7px 2px;font-size:13px;color:#111;border-radius:5px;cursor:pointer;position:relative;font-weight:600;}
.cal-day:active{background:#eee;}
.cal-day.today{background:#111;color:#fff;font-weight:800;}
.cal-day.has-res::after{content:'●';position:absolute;bottom:1px;left:50%;transform:translateX(-50%);font-size:5px;color:#111;}

/* 年号早見 */
.nengo-blk{background:#fff;border:1.5px solid #111;border-radius:10px;padding:10px;margin-bottom:10px;}
.nengo-blk-ttl{font-size:11px;color:#444;margin-bottom:7px;font-weight:800;}
.nengo-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px;}
.nengo-item{background:#f5f5f5;border-radius:5px;padding:7px 9px;}
.nengo-lbl{font-size:10px;color:#888;}
.nengo-val{font-size:17px;font-weight:800;color:#111;}
.nengo-sel{background:#fff;border:1.5px solid #111;color:#111;font-family:inherit;font-size:12px;padding:5px 7px;border-radius:6px;-webkit-appearance:none;}
.nengo-inp{background:#fff;border:1.5px solid #111;color:#111;font-family:inherit;font-size:15px;padding:5px 9px;border-radius:6px;width:84px;text-align:center;}

/* 電卓 */
.calc-screen{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;}
.calc-disp{background:#fff;border-bottom:2px solid #111;padding:12px 14px;flex-shrink:0;text-align:right;}
.calc-expr{font-size:12px;color:#888;min-height:16px;}
.calc-result{font-size:34px;font-weight:800;color:#111;min-height:42px;}
.calc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;flex:1;background:#ccc;}
.calc-btn{background:#fff;border:none;font-size:21px;font-weight:700;cursor:pointer;font-family:inherit;display:flex;align-items:center;justify-content:center;}
.calc-btn:active{opacity:.6;}
.calc-op{background:#f0f0f0;}
.calc-eq{background:#111;color:#fff;}
.calc-cls{background:#e8e8e8;}

/* SNS */
.sns-screen{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;}
.sns-hdr{padding:8px 12px;border-bottom:2px solid #111;text-align:center;flex-shrink:0;}
.sns-ttl{font-size:16px;font-weight:800;color:#111;}
.sns-sub{font-size:10px;color:#888;margin-top:1px;}
.sns-list{flex:1;overflow-y:auto;padding:8px;}
.sns-item{border:1.5px solid #111;border-radius:10px;padding:10px;margin-bottom:8px;}
.sns-date{font-size:10px;color:#888;margin-bottom:3px;}
.sns-text{font-size:12px;color:#111;line-height:1.6;}

/* クーポン */
.pin-row{display:flex;justify-content:center;gap:6px;margin-bottom:10px;}
.pin-box{width:44px;height:52px;background:#fff;border:2px solid #111;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;color:#111;}
.numpad{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;}
.numpad-btn{padding:12px 6px;background:#111;border:none;color:#fff;border-radius:8px;font-size:18px;font-weight:800;cursor:pointer;font-family:inherit;}
.numpad-btn:active{opacity:.7;}

/* 結果 */
.result-screen{position:absolute;inset:0;background:#888;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;z-index:100;}
.result-ng{font-size:70px;font-weight:900;color:#c00;}
.result-ok{font-size:70px;font-weight:900;color:#111;}
.result-msg{font-size:15px;font-weight:700;color:#fff;text-align:center;line-height:1.7;}

/* 天気 */
.weather-screen{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;}
.weather-tabs{display:flex;flex-shrink:0;border-bottom:2px solid #111;}
.w-tab{flex:1;padding:9px;background:#fff;border:none;border-bottom:2px solid transparent;color:#888;font-family:inherit;font-size:12px;cursor:pointer;font-weight:700;margin-bottom:-2px;}
.w-tab.on{background:#f0f0f0;color:#111;border-bottom:2px solid #111;}
.weather-frame{flex:1;overflow:hidden;}
.weather-frame iframe{width:100%;height:100%;border:none;}

::-webkit-scrollbar{width:3px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:#ccc;border-radius:2px;}
