:root{--paper:#f5f3ec;--surface:#fffef9;--ink:#243c34;--green:#246653;--soft:#e5eee3;--line:#cbd5c7;--wrong:#903a23;--large:28px;--heading:20px;--body:16px;--small:14px;color:var(--ink);background:var(--paper);font-family:"Yu Gothic UI",Meiryo,sans-serif;font-size:var(--body);line-height:1.65;color-scheme:light}
*{box-sizing:border-box}body{margin:0;overflow-x:clip}button,input{font:inherit;color:inherit}button{min-height:44px;border:1px solid #8ba28f;border-radius:12px;background:var(--surface);padding:9px 16px;font-weight:600;cursor:pointer;touch-action:manipulation}button:hover{background:#edf3e9}button:disabled{cursor:default;background:#eceee8;color:#53604f;border-color:#c1c8bb}button.primary{background:var(--green);border-color:var(--green);color:#fff}button.primary:hover{background:#194f40}button.danger{background:#903a23;border-color:#903a23;color:#fff}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,[tabindex="0"]:focus-visible{outline:3px solid #bc7c11;outline-offset:4px}a{color:#245b8c;text-underline-offset:3px}p,h1,h2,h3{margin:0 0 12px}h1{font-size:var(--large);line-height:1.4}h2,h3{font-size:var(--heading);line-height:1.45}small,.small{font-size:var(--small)}[hidden]{display:none!important}button:disabled:hover{background:#eceee8}.app-shell{max-width:660px;margin:0 auto;padding:20px max(20px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));min-height:100dvh}.app-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 0 24px}.brand{display:flex;gap:11px;align-items:center;background:none;border:none;padding:0;text-align:left;font-weight:400}.brand:hover{background:none}.brand:disabled{background:none;color:var(--ink)}.brand small{display:block;font-size:12px}.brand strong{font-size:var(--heading);font-weight:750}.brand-mark{display:flex;position:relative;align-items:center;justify-content:center;width:45px;height:45px;border-radius:13px;background:var(--green);color:#fff;font-size:15px;gap:5px;flex:none}.brand-mark:after{content:"";height:23px;width:1px;background:#9dbbb0;position:absolute}.local-label{font-size:12px;border:1px solid #b6c2af;border-radius:20px;padding:3px 8px;white-space:nowrap}main{outline:none;min-height:50dvh}.panel{padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:22px}.hero{padding:14px 2px 20px}.eyebrow{font-size:var(--small);font-weight:600;margin-bottom:10px}.hero h1{font-size:32px;letter-spacing:.02em;line-height:1.5}.hero p:last-child{margin:8px 0 0}.steps{display:inline-flex;align-items:center;gap:8px;font-size:var(--small);padding:7px 12px;border-radius:30px;background:#e9eee0}.steps i{font-style:normal;color:#365440}.stats{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:5px;padding:13px 6px;border-radius:16px;background:var(--soft);font-variant-numeric:tabular-nums;text-align:center;margin:0 0 20px}.stats small{display:block;font-size:12px}.stats strong{font-size:var(--heading);font-weight:750}.stats strong small{display:inline;font-size:var(--small)}.entrances{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.entrance{text-align:left;padding:16px 12px;border-radius:18px;min-height:130px;background:var(--surface);position:relative}.entrance .mode-label{font-size:var(--body);display:block}.entrance strong{display:block;font-size:26px;line-height:1.5;margin-top:8px;white-space:nowrap}.entrance strong small{font-size:var(--small)}.entrance .mode-note{display:block;font-size:12px;font-weight:400;margin-top:6px}.entrance.random{background:#eaf0e2;border-color:#839e7a}.entrance:not(:disabled):after{content:"↗";position:absolute;right:11px;top:10px;font-size:var(--small)}.home-caption{font-size:var(--small);margin:16px 2px 0}.home-tools{display:flex;gap:12px;justify-content:center;margin:24px 0 8px}.text-button{border-color:transparent;background:none;padding:6px 10px;font-size:var(--small);text-decoration:underline;text-underline-offset:4px}.text-button:hover{background:#e6ecdf}.app-footer{font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:30px;padding-top:14px;border-top:1px solid var(--line)}.app-footer .text-button{font-size:12px;padding-right:0}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:0 0 18px}.section-heading h1{font-size:var(--heading);margin:0}.back-button{padding:5px 12px;font-size:var(--small)}.practice-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:0 0 12px}.mode-chip{background:#e9eee0;border-radius:20px;padding:3px 11px;font-size:var(--small)}.practice-heading h1{font-size:var(--heading);margin:0}.practice .stats{margin-bottom:16px}.topline{display:flex;justify-content:space-between;gap:10px;min-height:26px;font-size:var(--small);margin:0 3px 7px}.topline .classification{font-weight:600}.card{position:relative;min-height:235px;border:2px solid #98b09c;background:var(--surface);border-radius:26px;box-shadow:0 7px 0 #dce4d5;padding:28px 18px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;touch-action:pan-y;user-select:none;overflow-wrap:anywhere;isolation:isolate;transition:box-shadow .15s}.card-title{font-size:28px;font-weight:750;line-height:1.55}.card-title span{display:block;font-size:var(--heading);font-weight:600;margin-top:4px}.card[data-stage="side"]{cursor:grab}.card[data-stage="side"]:active{cursor:grabbing}.card[data-stage="result"] .card-title{font-size:var(--heading)}.card[data-stage="result"] .card-title span{font-size:var(--body)}.feedback{position:absolute;inset:0;background:#e4f5e9;border-radius:24px;padding:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:32px;font-weight:800;line-height:1.5;color:#155139;animation:pop .24s ease-out;z-index:2}.feedback.wrong{background:#fff0e5;color:var(--wrong)}.card[data-stage="result"] .feedback{position:relative;inset:auto;width:100%;border-radius:14px;font-size:28px;margin-top:14px;padding:12px 8px}.feedback small{font-size:var(--body);margin-top:7px}.feedback.celebrate{box-shadow:0 0 0 3px #cba442;background:linear-gradient(120deg,#fff0b7,#e2f6df,#fff0b7)}.swipe-cue{position:absolute;top:12px;padding:1px 8px;border-radius:8px;font-size:var(--small);font-weight:600;background:#e5eee3;opacity:0;transition:opacity .1s}.swipe-cue.left{left:10px}.swipe-cue.right{right:10px}.card.swiping-left .swipe-cue.left,.card.swiping-right .swipe-cue.right{opacity:1}.badges{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:22px 0 4px}.badges button{border-radius:24px;font-size:var(--small);padding:8px 0;white-space:nowrap}.meaning {
  margin: 20px 0 12px;
  padding: 12px 16px;
  border-left: 3px solid #7d9d86;
  border-radius: 0 10px 10px 0;
  background: #edf3e9;
  color: #172c22;
  font-size: 18px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}.card-note{font-size:var(--small);margin:4px 3px 8px}.side-help{font-size:var(--small);margin:4px 3px 0}.side-help summary{padding:6px 0;min-height:36px}.side-help p{margin:5px 0 10px}.side-buttons{display:flex;justify-content:space-between;gap:16px}.side-buttons button{flex:1}.actions{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:20px}.actions button{min-width:94px}.actions button.primary{min-width:114px}.save-state{font-size:12px;min-height:20px;margin:12px 2px 0}.notice{padding:12px 15px;margin:0 0 18px;background:#e4f0e7;border:1px solid #84a88b;border-radius:13px;font-size:var(--small);overflow-wrap:anywhere}.notice.error{background:#fff0e5;border-color:#b36b52;color:#6c2a1b}.notice button{font-size:var(--small);margin-top:8px}.finished{margin-bottom:20px;padding:18px 20px;background:#e5f1dc;border:1px solid #95ae80;border-radius:20px}.finished h2{margin:0 0 5px}.finished p{margin:0;font-size:var(--small)}.history-list{display:grid;gap:12px;margin:18px 0}.history-item{border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:16px}.history-top{display:flex;gap:10px;align-items:start;justify-content:space-between}.history-top h2{font-size:var(--body);margin:0 0 6px}.history-time{font-size:12px;display:block;margin-bottom:12px}.history-grade{font-size:var(--small);font-weight:600;white-space:nowrap}.history-detail{display:grid;grid-template-columns:52px 1fr;gap:5px 10px;font-size:var(--small)}.history-detail span:nth-child(odd){font-weight:600}.history-detail .wrong{color:var(--wrong)}.load-more{display:block;margin:15px auto}.empty{font-size:var(--body);margin:10px 0}.settings-block+.settings-block{margin-top:22px}.settings-block h2{font-size:var(--heading)}.settings-block p{font-size:var(--small)}.file-control{display:block;border:1px dashed #7d9578;border-radius:12px;padding:14px;font-size:var(--small)}.file-control input{display:block;max-width:100%;font-size:var(--small);margin-top:10px}.import-preview{border:1px solid #b5805d;background:#fff5e6;padding:17px;border-radius:15px;margin-top:16px}.import-preview h3{font-size:var(--body)}.import-preview dl{display:grid;grid-template-columns:1fr auto;gap:5px 16px;font-size:var(--small);margin:12px 0}.import-preview dt,.import-preview dd{margin:0}.import-preview dd{font-variant-numeric:tabular-nums;font-weight:600}.import-preview .danger{width:100%;margin-top:6px}.about p,.about li{font-size:var(--small)}.about ol,.about ul{padding-left:23px}.about details{margin-top:18px;border-top:1px solid var(--line);padding-top:3px}summary{cursor:pointer;font-weight:600;min-height:44px;padding:10px 0}.about .excluded-item{padding:10px 0;border-top:1px dashed var(--line)}.about .excluded-item p{margin:3px 0}.source-links{display:flex;flex-direction:column;gap:10px}.startup{margin-top:30px}.startup h1{font-size:var(--heading)}.startup p{font-size:var(--small)}.fatal{padding:20px;margin:20px;border:2px solid #903a23;background:#fff0e5}.busy .card{cursor:wait}
@keyframes pop{from{transform:scale(.94)}to{transform:scale(1)}}
@media(min-width:720px){.app-shell{padding-top:30px}.app-header{padding-bottom:35px}.hero{padding-top:20px}.hero h1{font-size:36px}.card{min-height:265px}.entrance{min-height:145px;padding:20px 16px}}
@media(max-width:390px){.app-shell{padding:15px max(15px,env(safe-area-inset-right)) max(15px,env(safe-area-inset-bottom)) max(15px,env(safe-area-inset-left))}.app-header{gap:5px;padding-bottom:21px}.brand{gap:8px}.brand strong{font-size:18px}.brand-mark{width:39px;height:41px}.local-label{font-size:12px;padding:3px 6px}.hero h1{font-size:28px}.entrances{gap:7px}.entrance{padding:14px 9px;min-height:126px}.entrance .mode-label{font-size:var(--small)}.entrance strong{font-size:24px}.entrance .mode-note{font-size:12px}.card{min-height:210px;padding:24px 15px}.card-title{font-size:25px}.badges{gap:4px}.badges button{font-size:var(--small)}.panel{padding:19px}.topline{font-size:13px}.feedback{font-size:28px}.card[data-stage="result"] .feedback{font-size:26px}.stats{gap:3px}.stats small{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.offline-panel{margin:0 0 18px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#e9eee0;font-size:var(--small)}
.offline-panel p{margin:0 0 5px}.offline-panel #offline-status{font-weight:700}.offline-panel a{display:inline-block;margin-top:4px}.offline-panel button{margin:6px 0;font-size:var(--small)}
.privacy-page h1{font-size:var(--large);line-height:1.5}.privacy-page h2{font-size:var(--heading);line-height:1.6}.privacy-page .panel{margin-top:18px}.privacy-page p,.privacy-page li,.privacy-page dd{font-size:var(--small);line-height:1.9}.privacy-page ol{padding-left:22px}.privacy-page li{margin-bottom:12px}.privacy-list dt{font-weight:700;margin-top:20px}.privacy-list dd{margin:6px 0 0}.privacy-page a{overflow-wrap:anywhere}.back-link{display:inline-block;min-height:44px;padding:10px 0}
