:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#ecf3fd;background:#0b1220;color-scheme:dark;font-synthesis:none}*{box-sizing:border-box}html{min-height:100%;-webkit-text-size-adjust:100%}body{margin:0;min-height:100vh}button,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,summary:focus-visible,select:focus-visible{outline:2px solid #77b9ff;outline-offset:3px}[hidden]{display:none!important}.app{width:100%;max-width:520px;margin:0 auto;padding:calc(18px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom))}header{display:flex;align-items:center;justify-content:space-between;gap:12px}header h1{font-size:25px;letter-spacing:-.6px;margin:0;font-weight:760}header p{font-size:12px;color:#93a6c0;margin:4px 0 0}.pill{font-size:11px;font-weight:650;border-radius:20px;background:#18372f;color:#83e6b5;padding:7px 10px}.summary{display:flex;align-items:center;gap:9px;margin:19px 0 17px;background:#172338;border:1px solid #2b3b51;border-radius:14px;padding:12px 14px;font-size:13px;color:#b9c9dd}.summary strong{font-size:18px;color:#f3f7ff}.summary-icon{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#204d3e;color:#80e5b0;font-weight:800}.summary-hint{margin-left:auto;font-size:11px;color:#8399b4;text-align:right}.tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#19253a;border-radius:13px}.tabs button{border:0;border-radius:10px;background:transparent;color:#a7bad3;min-height:44px;font-weight:700;font-size:14px}.tabs button.active{background:#354b69;color:#fff;box-shadow:0 2px 6px #0002}.board-heading{text-align:center;margin:23px 0 0}.board-heading h2{font-size:17px;margin:0;font-weight:720}.board-heading p{font-size:12px;color:#90a4bd;margin:5px 0 0}.board-wrap{width:min(100%,390px);margin:0 auto}canvas#board{display:block;width:100%;aspect-ratio:1;touch-action:none;user-select:none;-webkit-user-select:none}.legend{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 15px;font-size:11px;color:#adbed2;margin:-4px 0 12px;line-height:1.4}.legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.dot{width:9px;height:9px;border-radius:50%;display:inline-block;flex:none}.green{background:#52dc9b}.amber{background:#ffbe55}.red{background:#f07878}.blue{background:#5aabff}.feedback{display:flex;align-items:center;justify-content:center;min-height:45px;padding:10px 8px;text-align:center;font-size:13px;color:#9fb3cc;line-height:1.4}.feedback.warn{color:#ffcb85}.feedback.ok{color:#83e7b5}.actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:8px}.actions button{min-height:46px;flex:1 1 auto;border-radius:12px;padding:12px 15px;font-size:14px;font-weight:700}.secondary{background:#202e43;border:1px solid #3a4d65;color:#dbe9fa}.primary{background:#347fed;border:1px solid #347fed;color:white}.tools{margin-top:25px;border-top:1px solid #25354b;padding-top:14px}.tools summary{list-style:none;cursor:pointer;color:#b6c8df;display:flex;justify-content:space-between;align-items:center;min-height:44px;font-size:13px;font-weight:650}.tools summary::-webkit-details-marker{display:none}.tools summary span{font-size:20px}.tools[open] summary span{transform:rotate(180deg)}.tools-content{padding:8px 0 12px}.tools h2,.history-title h2{font-size:16px;margin:0 0 9px}.tools p{color:#9fb3ca;font-size:13px;line-height:1.55}.tools small{display:block;color:#91a5be;font-size:11px;line-height:1.5;margin-top:12px}footer{text-align:center;color:#738ba8;font-size:10px;margin-top:20px}.history-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 10px}.history-title h2{margin:0}.history-title select{background:#24354c;border:1px solid #3d526c;color:#e8f0fa;border-radius:10px;padding:10px;font-size:13px;min-height:44px}.entry{display:flex;align-items:center;gap:11px;border-bottom:1px solid #27374c;padding:12px 0}.entry>div:not(.mini-pattern){min-width:0;flex:1}.entry strong{font-size:12px;line-height:1.5;display:block;overflow-wrap:anywhere}.entry small{display:block;color:#8ea5bf;font-size:11px;margin-top:4px}.entry button{background:transparent;border:1px solid #6c4650;color:#ffaaaa;border-radius:9px;padding:9px 8px;font-size:12px;min-height:40px}.empty{text-align:center;color:#92a7c0;padding:35px 0;font-size:13px}.mini-pattern{display:block;flex:none;border-radius:10px;background:#122035;max-width:100%}.entry .mini-pattern{width:68px!important;height:68px!important}.pattern-preview{display:flex;justify-content:center;align-items:center;background:#122035;border-radius:12px;padding:12px}.pattern-preview .mini-pattern{width:160px!important;height:160px!important}dialog{width:min(92vw,410px);max-height:calc(100dvh - 50px);overflow:auto;background:#1a293e;border:1px solid #415672;border-radius:20px;color:#eaf3ff;padding:22px;box-shadow:0 24px 80px #0008}dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}dialog h2{font-size:20px;margin:0 0 9px}dialog p{font-size:14px;color:#b4c6dc;line-height:1.5}dialog .actions{display:flex;flex-direction:column-reverse;margin-top:15px}dialog .actions button{width:100%;min-height:49px}@media(max-width:380px){.app{padding-left:13px;padding-right:13px}.summary-hint{display:none}.legend{gap:6px 10px;font-size:10px}.board-heading{margin-top:14px}.entry .mini-pattern{width:58px!important;height:58px!important}}@media(min-width:520px){.app{padding-left:24px;padding-right:24px}}@media(max-height:730px){.board-heading{margin-top:12px}.summary{margin:12px 0}.board-wrap{width:min(100%,340px)}}

.reminder-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#254469;color:#c8e3ff;font-size:25px;margin-bottom:14px}#backupReminder strong{color:#fff}#backupReminder small{display:block;margin-top:12px;color:#91a5be;font-size:12px;line-height:1.5}

.last-attempt{text-align:center;color:#a9bdd5;font-size:12px;margin:8px 0}.backup-progress{display:grid;gap:8px;background:#1a293e;border:1px solid #34465e;border-radius:12px;padding:12px;margin-bottom:12px;font-size:13px}.backup-progress progress{width:100%;height:8px;accent-color:#52dc9b}.backup-progress small{color:#b4c6dc;line-height:1.4}.undo-notice{position:fixed;bottom:calc(12px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(92vw,420px);background:#24354c;border:1px solid #526985;border-radius:12px;padding:10px;display:flex;align-items:center;justify-content:space-between;gap:10px;z-index:5;box-shadow:0 4px 20px #0008}.undo-notice[hidden]{display:none}.undo-notice button{min-height:44px}
