@font-face{font-family:Moxa;src:url('/assets/fonts/moxa.ttf')}*{box-sizing:border-box}[hidden]{display:none!important}
body{margin:0;color:#0734bf;background:#fff;background-image:linear-gradient(#0734bf16 1px,transparent 1px),linear-gradient(90deg,#0734bf16 1px,transparent 1px);background-size:32px 32px;font:16px/1.5 'Courier New',monospace}
a{color:inherit;text-underline-offset:4px}header{max-width:1120px;margin:auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between}.logo{font:32px Moxa;text-decoration:none}
main{max-width:1120px;margin:4px auto 0;padding:0 24px}h1{font:clamp(36px,6vw,64px) Moxa;margin:0 0 14px}h2{font-size:18px;margin:0 0 12px}.accountGrid{display:grid;grid-template-columns:1fr 1.2fr;gap:24px;align-items:start}
.panel{border:1px solid #0734bf70;border-radius:16px;padding:18px;background:#ffffffed}form{display:grid;gap:18px}label{display:grid;gap:7px;font-weight:bold;font-size:14px}input{min-width:0;width:100%;border:1px solid #0734bf55;border-radius:7px;padding:13px;color:inherit;background:white;font:16px 'Courier New',monospace}input[readonly]{background:#f0f4ff}button{border:0;background:#bc1a13;color:white;border-radius:8px;padding:15px;font:bold 15px 'Courier New',monospace;cursor:pointer}button:disabled{opacity:.6}#saveStatus:empty{display:none}.characterLink{display:inline-block;margin-top:20px;font-size:14px}
.loyaltyPanel{padding:0}.loyaltyCard{container-type:inline-size;border:2px solid #0734bf;border-radius:20px;overflow:hidden;background:#fff8ec}.loyaltyFront{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#0734bf;color:#fff8ec;padding:clamp(16px,4.5vw,28px);font:clamp(20px,5.4vw,40px)/1.15 Moxa, sans-serif;font-size:clamp(20px,7cqi,40px)}
.loyaltyBrand{flex:none}
.loyaltyIdentity{min-width:0;display:grid;gap:2px;text-align:end;overflow-wrap:anywhere}
.loyaltyIdentity>:empty{display:none}
#cardName{font-weight:400}.loyaltyBack{padding:24px;background-image:linear-gradient(#0734bf13 1px,transparent 1px),linear-gradient(90deg,#0734bf13 1px,transparent 1px);background-size:24px 24px}.stamps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:0}.stamp{aspect-ratio:1;border:2px solid #0734bf;border-radius:50%;display:grid;place-items:center;background:#fff8ec}.stamp img{width:90%;height:90%;object-fit:contain}.stamp.reward{background:#dce9ff}.stamp.reward span{font-size:10px;text-align:center;font-weight:bold;line-height:1.15}.stamp.pending{border-style:dashed}#loyaltyStatus{font-size:14px;margin:14px 0 0}#loyaltyStatus:empty{display:none}footer{display:flex;justify-content:space-between;margin:32px 0;font-size:14px}
@media(max-width:700px){header{padding:10px 16px}.accountGrid{grid-template-columns:1fr;gap:14px}main{padding:0 16px}.loyaltyBack{padding:18px}.stamps{gap:6px}}

#status:empty { display: none; }
#detailsForm { gap: 8px; }
#detailsForm label {
  grid-template-columns: clamp(88px, 28vw, 120px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.25;
}
#detailsForm input { min-height: 38px; padding: 7px 9px; }
#detailsForm button[type=submit] { min-height: 40px; margin-top: 4px; padding: 8px 12px; }
#saveStatus { margin: 0; }
.accountCharacter {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
#accountAvatar {
  flex: 0 0 auto;
  width: clamp(120px, 34vw, 148px);
  height: clamp(112px, 32vw, 136px);
  display: grid;
  place-items: center;
}
#accountAvatar svg { width: 100%; height: 100%; }
.accountCharacter .characterLink {
  display: inline-flex;
  align-items: center;
  --action-padding: 10px;
  --action-font-size: 12px;
  min-width: 0;
  margin-top: 0;
}
@media (max-width: 700px) {
  .panel { padding: 12px; }
}

.panel input { background: #e8f1ff; }
.panel input[readonly] { background: #e1ecff; }
.panel input:focus { outline: 2px solid #0734bf; outline-offset: 2px; }

#accountAvatar { --sticker-bg: #fff5df; color: #0734bf; }

body { text-transform: uppercase; }
input, button { text-transform: inherit; }
footer { flex-wrap: wrap; gap: 12px; }

.adminSignIn, #adminTools { margin-top: 22px; }
#improvementLauncher {
  position: fixed;
  z-index: 5;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  padding: 12px;
  background: #0734bf;
  box-shadow: 0 4px 16px #0734bf30;
  font-size: 13px;
}
body:has(#adminTools:not([hidden])) { padding-bottom: 52px; }
#improvementPanel {
  position: fixed;
  z-index: 6;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(62px, calc(env(safe-area-inset-bottom) + 52px));
  width: min(380px, calc(100% - 24px));
  max-height: min(640px, calc(100dvh - 76px));
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 8px 32px #0734bf25;
}
.improvementHeader { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.improvementHeader h2 { margin: 0; font-size: 16px; }
#improvementClose { min-width: 44px; padding: 6px; font-size: 22px; }
#improvementForm { margin-top: 14px; gap: 8px; }
#improvementText {
  width: 100%;
  padding: 10px;
  resize: vertical;
  border: 1px solid #0734bf70;
  border-radius: 7px;
  color: inherit;
  background: #f0f4ff;
  font: inherit;
}
#improvementStatus { margin: 10px 0 0; font-size: 14px; text-transform: none; }
#improvementStatus:empty, #savedNotes:empty { display: none; }
#savedNotesTitle { margin: 16px 0 6px; font-size: 14px; }
#savedNotes { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
#savedNotes li {
  padding: 8px 10px;
  border: 1px solid #0734bf30;
  border-radius: 7px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-transform: none;
}
