:root{font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#182a44;background:#f3f6fa;--ink:#182e50;--accent:#e35c79;--line:#d8e1eb}*{box-sizing:border-box}body{margin:0;line-height:1.6}h1,h2,h3{line-height:1.3;margin:.2rem 0 .7rem}h1{font-size:1.55rem}h2{font-size:1.22rem}h3{font-size:1.05rem}a{color:#224b8d}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;padding:.8rem 1rem;border-radius:12px;font-weight:700}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{width:100%;background:#fff;border:1px solid #b9c8dc;border-radius:10px;padding:.76rem;color:#172844;margin:.25rem 0 0}input:focus,select:focus,textarea:focus{outline:2px solid #93c4e5;outline-offset:1px}label{display:block;font-size:.92rem;font-weight:700}.page{max-width:760px;padding:20px 16px 40px;margin:auto}.wide{max-width:1100px}.topbar{display:flex;align-items:center;justify-content:space-between;background:#182e50;color:#fff;min-height:65px;padding:9px max(16px,calc((100vw - 1100px)/2))}.topbar .brand{display:flex;align-items:center;gap:9px;color:white;font-weight:900;text-decoration:none;font-size:1.2rem}.brand img{width:43px;height:43px;object-fit:contain}.brand span{font-size:.75rem;font-weight:500}.topbar button{border-color:white;color:white}.panel{border:1px solid #e0e6ef;background:white;border-radius:20px;box-shadow:0 8px 30px #1c39510e;padding:22px;margin:16px 0}.auth{max-width:460px;margin:38px auto}.stack{display:grid;gap:16px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.primary{background:#1e4784;color:white}.primary:hover{background:#17396a}.secondary{background:#e7eef8;color:#1b3b73}.ghost{border:1px solid #bac9d8;background:transparent;color:#273d5a}.link-button{color:#225b9b;background:none;text-decoration:underline;margin-top:10px}.block{width:100%;margin-top:12px}.small{padding:.42rem .65rem;font-size:.82rem}.smalltext{font-size:.82rem}.muted{color:#64738a;margin:.4rem 0 1rem}.hide{display:none!important}.headline{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0}.actions{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}.actions button{flex:1 1 140px}.event-list{display:grid;gap:12px}.event-card{display:flex;gap:12px;align-items:center;justify-content:space-between;border-radius:16px;border:1px solid #dde6f0;background:white;padding:16px;flex-wrap:wrap}.event-card h3{margin:0}.event-card p{margin:.2rem 0}.entry{border:1px solid var(--line);background:#f7f9fc;padding:15px;border-radius:15px;margin:10px 0}.entry-head{display:flex;gap:10px;align-items:center;justify-content:space-between}.entry-head img{width:60px;height:60px;object-fit:contain}.entry-fields{display:grid;gap:9px}.option-row{display:flex;gap:10px;align-items:center}.option-row span{width:22px;flex:none;font-weight:900}.option-row input{flex:1}.subheading{margin-top:18px}.reward-box{border-top:1px solid var(--line);padding-top:20px}.reward-row{display:flex;align-items:center;gap:9px;margin:8px 0}.reward-row input[type=number]{max-width:105px}.reward-row button{flex:none}.pill{border-radius:100px;padding:4px 12px;background:#edf3fa;color:#1d4376;font-weight:700}.qrarea{padding:18px;background:#f8fafd;border-radius:16px;text-align:center}.qrarea img{width:220px;max-width:100%}.qrcode-large{display:flex;justify-content:center;padding:16px}.qrcode-large img{width:230px;height:230px;max-width:100%;image-rendering:auto}.qrcode-large canvas{max-width:100%}.reader{width:100%;max-width:480px;margin:12px auto;overflow:hidden;border-radius:12px}.stats{display:flex;gap:12px;flex-wrap:wrap}.stat{background:#f1f5fb;border-radius:12px;padding:12px 18px;font-weight:800;flex:1}.result-panel{background:#f2f6fb;border-radius:15px;padding:18px;margin-top:18px}.result-panel h3{margin-bottom:8px}.result-score{font-size:2.1rem;color:#1e4784;font-weight:900}.message{border:1px solid #bdd3ec;background:#eff6fd;color:#1c4779;padding:13px;border-radius:12px;margin:12px 0}.message.error{border-color:#f2bec4;background:#fff0f2;color:#9b2536}.message.ok{background:#edfbf3;border-color:#b1e3ca;color:#146b45}.stamp-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}.stamp{position:relative;min-width:0;aspect-ratio:1;border:2px dashed #bcc7d7;border-radius:14px;display:grid;place-items:center;background:#f8fafe;padding:8px;color:#8696aa}.stamp img{width:100%;height:100%;object-fit:contain}.stamp.filled{border:2px solid #e7a0ab;background:#fff3f5}.stamp:not(.filled) img{filter:grayscale(1);opacity:.14}.stamp .num{position:absolute;left:6px;top:4px;background:#fff;color:#253c5b;border-radius:8px;padding:0 5px;font-size:.75rem;font-weight:800}.stamp.filled::after{content:'✓';position:absolute;right:5px;bottom:3px;color:#cf3851;background:white;border-radius:50%;font-size:1.2rem;font-weight:900}.intro{text-align:center;margin:12px 0}.time-label{font-size:.83rem;color:#5f718b}.quiz-question{padding:14px 0;border-bottom:1px solid #e2e9f1}.choice-list{display:flex;gap:7px;flex-wrap:wrap}.choice-list label{border:1px solid #b8c8dc;padding:9px 16px;background:#f8fbff;border-radius:12px;cursor:pointer;display:flex;align-items:center;gap:7px;min-width:65px}.choice-list input{margin:0;width:auto;accent-color:#254d92}.choice-list label:has(input:checked){background:#dbe9fc;border-color:#2759a1}.completion{text-align:center;border:3px solid #d5e4f2}.clear-text{font-size:clamp(3rem,12vw,6rem);font-weight:1000;color:#e15373;text-shadow:2px 3px 0 #f6b7c4;letter-spacing:.05em}.ended{text-align:center}.ended-icon{font-size:3rem}.copyright{text-align:center;color:#8491a2;font-size:.75rem;margin-top:36px}.welcome{text-align:center;max-width:540px}.welcome .panel{text-align:left}.hero-logo{max-width:170px;width:42%;height:auto;display:block;margin:20px auto 5px}.welcome h1{font-size:2.35rem;margin:0}.welcome .lead{font-size:1.08rem}.text-link{display:inline-block;margin-top:14px}.modal-backdrop{position:fixed;inset:0;background:#18283fc9;display:grid;place-items:center;padding:16px;z-index:20}.modal{max-width:480px;width:100%}.update-banner{position:fixed;bottom:10px;left:10px;right:10px;z-index:40;max-width:680px;margin:auto;background:#182e50;color:white;padding:12px 14px;display:flex;gap:10px;justify-content:space-between;align-items:center;border-radius:12px;box-shadow:0 5px 30px #0003}.divider{height:1px;background:var(--line);margin:20px 0}@media(max-width:650px){.grid2{grid-template-columns:1fr}.panel{padding:16px}.stamp-grid{gap:7px}.stamp{padding:5px}.reward-row{flex-wrap:wrap}.topbar{padding:8px 14px}.actions button{flex:1 1 100%}.entry-head img{width:48px;height:48px}}

/* RapoRon official wordmark (same art as the approved logo) */
.hero-wordmark{display:block;width:min(100%,470px);height:auto;max-height:170px;object-fit:contain;margin:24px auto 13px}
.topbar .brand .brand-wordmark{width:154px;height:auto;max-height:55px;object-fit:contain;flex:none}
.topbar .brand span{flex:none}
.auth-hint{font-size:.79rem;line-height:1.65;margin:20px 0 0}
@media(max-width:650px){.topbar .brand .brand-wordmark{width:125px;max-height:48px}.hero-wordmark{width:min(100%,370px)}}

/* v1.0.6 iPhone Safari 対策: 入力欄そのもののネイティブ最小幅に依存しない。
   終了日時の外枠を他の入力欄と同じグリッドの100%で描き、ブラウザ内蔵の
   日付・時間ピッカーは枠の内部だけで表示する。 */
#event-form .grid2 {
  width: 100%;
  min-width: 0;
}
#event-form .grid2 > label {
  display: block;
  min-width: 0;
  max-width: 100%;
}
#event-form .grid2 > label > input,
#event-form .grid2 > label > select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
/* The *visible* border is the wrapper, not Safari's intrinsic date input. */
#event-form .datetime-shell {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: .25rem 0 0;
  border: 1px solid #b9c8dc;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
#event-form #ev-end {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0;
  padding: calc(.76rem - 1px) .76rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
  font: inherit;
  color: #172844;
  text-align: left;
}
#event-form .datetime-shell:focus-within {
  outline: 2px solid #93c4e5;
  outline-offset: 1px;
}
#event-form #ev-end:focus { outline: none; }
#event-form #ev-end::-webkit-datetime-edit { min-width: 0; }
.danger-outline { background: #fff5f5; color: #b12e3a; border: 1px solid #e9b6bd; }
.danger-outline:hover { background:#ffe3e7; }
.danger { background:#b52f3e; color:#fff; }
.danger:hover { background:#952436; }
.delete-dialog { margin:0; }
.delete-game-name { font-weight:800; word-break:break-word; }
.delete-dialog-actions { display:flex; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.delete-dialog-actions button { min-width:120px; }
@media(max-width:650px){ .delete-dialog-actions button { flex:1; } }
