:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: #101522; color: #eef2ff; }
* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; min-height: 100%; margin: 0; background: linear-gradient(160deg, #1d294b 0, #101522 48rem); overflow-x: hidden; overscroll-behavior-x: none; }
body { position: relative; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
button, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .46; }
.app-shell { width: 100%; max-width: 860px; min-height: 100vh; margin: auto; padding: calc(18px + env(safe-area-inset-top)) 14px calc(38px + env(safe-area-inset-bottom)); overflow-x: hidden; }
.intro, .topbar { padding: 8px 5px 15px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0; color: #aabaff; font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 6px 0; color: #fff; font-size: clamp(1.65rem, 7vw, 2.15rem); line-height: 1.2; }
h2 { margin: 0; color: #f4f6ff; font-size: 1.12rem; }
p { color: #b8c4df; line-height: 1.55; }
small { color: #9daac6; font-size: .78rem; line-height: 1.45; }
.panel { margin: 13px 0; padding: 17px; border: 1px solid #3b496b; border-radius: 17px; background: rgba(22, 29, 47, .94); box-shadow: 0 9px 22px #0307123b; }
.paste-panel { border-color: #6179b2; background: linear-gradient(145deg, #202d50, #161d31); }
.panel h2 + p { margin-top: 7px; font-size: .87rem; }
label { display: block; margin: 16px 0 7px; color: #dbe7ff; font-size: .85rem; font-weight: 800; }
textarea { width: 100%; min-height: 260px; padding: 15px; resize: vertical; border: 1px solid #667caf; border-radius: 13px; outline: none; background: #0e1526; color: #f3f6ff; font: .9rem/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.clipboard-fallback { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
textarea:focus { border-color: #a599ff; box-shadow: 0 0 0 3px #7960f544; }
textarea::placeholder { color: #8190af; }
.paste-panel small { display: block; margin: 11px 2px 15px; }
.primary, .secondary, .outline, .text, .rule-grid button, .exchange-controls button, .target-grid button, .close { min-height: 44px; border: 0; border-radius: 11px; font-weight: 800; }
.primary { width: 100%; padding: 12px; background: linear-gradient(135deg, #795cf5, #3c99dd); color: #fff; }
.secondary { width: 100%; margin-top: 10px; padding: 11px; border: 1px solid #6175a7; background: #1c2945; color: #e3ebff; }
.outline { flex: 0 0 auto; padding: 9px 11px; border: 1px solid #6677a4; background: #1d2945; color: #e3ebff; font-size: .75rem; }
.text { display: block; margin: 12px auto 0; padding: 8px 14px; background: transparent; color: #c4d1f5; }
.danger { color: #ffc0d1; }
.notice { margin: 5px 0 12px; padding: 11px 12px; border-radius: 10px; background: #432337; color: #ffc4d3; font-size: .87rem; line-height: 1.5; white-space: pre-wrap; }
.startup-error { width: 100%; margin-top: 14vh; padding: 22px; border: 1px solid #a46e43; border-radius: 16px; background: #3d2c20; color: #ffe2c4; text-align: center; }.startup-error h1 { font-size: 1.3rem; }.startup-error p { color: #ffe2c4; }
.saved-draft .primary { margin-top: 14px; }
.collection > p { margin: 5px 0 15px; font-size: .84rem; }
.tier-heading { margin: 18px 0 10px; padding: 8px 10px; border-left: 3px solid #7d91d5; border-radius: 7px; background: #1a243c; color: #dce6ff; font-size: .92rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gacha-card { min-width: 0; overflow: hidden; border: 1px solid #3c4a6d; border-radius: 13px; background: #182138; box-shadow: 0 5px 14px #03071255; }
.empty-card { opacity: .66; background: #151b2c; }
.card-image { display: block; width: 100%; height: 112px; background: #10192c; object-fit: cover; }
.empty-card .card-image { filter: saturate(.42) brightness(.7); }
.card-info { padding: 10px; }
.card-name, .section-head, .picker header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-name strong { color: #fff; font-size: .98rem; }.card-info p { margin: 7px 0 9px; color: #c9d2ea; font-size: .75rem; }.card-info p b { color: #fff; }
.tier { padding: 2px 6px; border-radius: 99px; background: #304469; color: #d6e7ff; font-size: .66rem; font-weight: 900; }.tier.sr { background: #684088; color: #ffe0ff; }.tier.ssr { background: #84551d; color: #fff0c2; }.tier.reward { background: #1f766f; color: #d9fffa; }
.rule-grid { display: grid; gap: 5px; }.rule-grid button { padding: 7px 6px; border: 1px solid #566793; border-radius: 7px; background: #263556; color: #eff4ff; font-size: .69rem; line-height: 1.25; text-align: left; }.rule-grid button.compensation { border-color: #946e2d; }.universal-card { border-color: #378b87; background: linear-gradient(160deg, #193b43, #17283b); }.universal-card .rule-grid button { border-color: #3faaa1; background: #215b60; }
.section-head { margin-bottom: 10px; }.section-head span { color: #b1beda; font-size: .78rem; }
.empty-note { margin: 3px 0; color: #8996b2; font-size: .85rem; }
.exchange-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding: 8px; border-radius: 10px; background: #243450; }.chosen-exchanges { display: grid; gap: 6px; margin-top: 9px; }.chosen-exchange { display: block; width: 100%; margin-top: 0; padding: 6px; }
.exchange-cards { display: grid; grid-template-columns: 31px 14px 31px; justify-content: center; align-items: center; gap: 7px; min-width: 0; }.exchange-image { width: 31px; height: 42px; border: 1px solid #50628a; border-radius: 5px; background: #10182b; object-fit: cover; }.exchange-cards em { color: #a9bfff; font-style: normal; font-weight: 900; text-align: center; }
.exchange-controls { display: grid; gap: 4px; }.chosen-exchange .exchange-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin-top: 6px; }.exchange-controls button { min-height: 29px; width: 100%; padding: 3px 6px; background: #334b76; color: #e8efff; font-size: .65rem; }.exchange-controls .delete { background: #5a3043; color: #ffd3df; }
details summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; } details summary::-webkit-details-marker { display: none; } details summary small { display: block; margin-top: 3px; }.final-inventory { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }.final-slot { padding: 7px 2px; border-radius: 7px; background: #151d30; color: #c1cbdf; font-size: .68rem; text-align: center; }.final-slot b { display: block; margin-top: 2px; color: #fff; }.final-slot.changed { border: 1px solid #5977b4; background: #293b61; }.final-panel pre, .result pre { overflow: auto; margin: 13px 0 0; padding: 12px; border-radius: 9px; background: #0e1627; color: #dae5ff; font: .75rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }.generate { margin-top: 13px; }
.result pre { max-height: 420px; margin: 14px 0; font-size: .78rem; }.result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }.secondary.compact { width: auto; min-height: 36px; margin: 0; padding: 7px 9px; font-size: .7rem; }.result-fields { display: grid; gap: 9px; margin-top: 12px; }.result-fields section { min-width: 0; padding: 10px; border: 1px solid #354665; border-radius: 10px; background: #151e31; }.result-fields h3 { margin: 0; color: #dce7ff; font-size: .78rem; }.result-fields pre { max-height: 160px; margin: 8px 0 0; padding: 9px; font-size: .69rem; }
.modal-mask { position: fixed; z-index: 10; inset: 0; display: flex; align-items: flex-end; background: #020513a8; }.picker { width: 100%; max-height: 78vh; overflow: auto; padding: 18px 14px 24px; border: 1px solid #667caf; border-radius: 22px 22px 0 0; background: #18223a; }.picker header { align-items: flex-start; }.picker h2 { font-size: 1.05rem; }.picker p { margin: 5px 0 0; font-size: .78rem; }.close { flex: 0 0 auto; width: 35px; min-height: 35px; border: 1px solid #5c6f9e; border-radius: 50%; background: #202c48; color: #fff; font-size: 1.4rem; line-height: 1; }.target-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 14px; }.target-grid button { display: grid; place-items: center; gap: 3px; min-height: 74px; padding: 6px 2px; border-radius: 8px; background: #5d55d9; color: #fff; font-size: .65rem; }.target-image { width: 34px; height: 45px; border: 1px solid #a79dff; border-radius: 5px; background: #3f3b9c; object-fit: cover; }
@media (min-width: 580px) { .app-shell { padding: 28px 18px 50px; }.card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }.card-image { height: 160px; }.target-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }.picker { width: min(760px, calc(100% - 24px)); margin: 0 auto 12px; border-radius: 20px; }.modal-mask { align-items: center; } }
