html, body { height: 100%; overflow: hidden; background: #fbf8ef; background-image: none; overscroll-behavior: none; }
body::before { display: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#hud { position: fixed; inset: 0; pointer-events: none; font-family: "Shantell Sans", cursive; }
#hud > * { pointer-events: auto; }
.me { position: absolute; left: 12px; top: 10px; background: rgba(255,253,247,.92); border: 2px solid var(--ink); border-radius: 12px 8px 14px 9px; padding: 6px 10px 8px; width: 220px; box-shadow: 2px 3px 0 rgba(43,43,43,.2); }
.me .row1 b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me .row2 { display: flex; align-items: center; gap: 8px; font-size: 12px; } .me .lv { color: var(--pencil); font-size: 12px; }
.ink { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13px; } .ink i { width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); border: 2px solid #b8890f; display: inline-block; }
.ink.bump { animation: bump .35s ease-out; } @keyframes bump { 40% { transform: scale(1.35); } }
.me .bar { height: 9px; border: 2px solid var(--ink); border-radius: 6px 4px 7px 5px; background: #fff; margin-top: 4px; overflow: hidden; } .me .bar i { display: block; height: 100%; width: 100%; transition: width .15s; }
.me .bar.hp i { background: var(--red); } .me .bar.mp i { background: var(--purple); } .me .bar.st i { background: var(--green); } .me .bar.xp { height: 5px; border-width: 1.5px; } .me .bar.xp i { background: var(--yellow); }
.powers { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; } .powers span { font-size: 11px; font-weight: 700; background: var(--sticky); border: 1.5px solid var(--ink); border-radius: 8px; padding: 0 6px; }
.party { position: absolute; left: 12px; top: 150px; display: grid; gap: 4px; } .party div { background: rgba(255,253,247,.9); border: 1.5px solid var(--green); border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; width: 160px; } .party i { display: block; height: 4px; background: var(--red); border-radius: 2px; margin-top: 2px; }
.back { position: absolute; left: 12px; bottom: 50px; font-size: 13px; font-weight: 700; color: var(--pencil); text-decoration: none; }
.online { position: absolute; right: 12px; top: 10px; background: rgba(255,253,247,.92); border: 2px solid var(--ink); border-radius: 12px 8px 14px 9px; padding: 3px 10px; font: 700 14px "Shantell Sans", cursive; cursor: pointer; }
#mini { position: absolute; right: 12px; top: 48px; width: 150px; height: 150px; border-radius: 10px 6px 12px 8px; cursor: pointer; box-shadow: 2px 3px 0 rgba(43,43,43,.2); background: #fff; transition: width .2s, height .2s; }
#mini.big { width: min(340px, 70vw); height: min(340px, 70vw); }
#compass { position: absolute; right: 12px; top: 206px; font-weight: 700; font-size: 13px; background: rgba(255,253,247,.9); border: 1.5px solid var(--faint); border-radius: 8px; padding: 2px 8px; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mini.big ~ #compass { top: calc(min(340px, 70vw) + 56px); } #compass i { display: inline-block; font-style: normal; color: var(--green); } #compass b { color: var(--pencil); font-weight: 400; }
.region { position: absolute; left: 0; right: 0; top: 14%; text-align: center; font-size: 42px; font-weight: 800; color: var(--ink); opacity: 0; transition: opacity .4s; text-shadow: 3px 3px 0 #fff; pointer-events: none !important; }
.region.on { opacity: 1; } .region small { display: block; font-size: 17px; font-weight: 700; color: var(--pencil); }
#toast { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); font-size: 28px; font-weight: 800; text-align: center; text-shadow: 2px 2px 0 #fff; pointer-events: none !important; opacity: 0; transition: opacity .3s; } #toast.on { opacity: 1; }
.duel { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: none; gap: 14px; align-items: center; background: rgba(255,253,247,.94); border: 2px solid var(--ink); border-radius: 12px 8px 14px 9px; padding: 6px 12px; font-weight: 700; }
.duel.on { display: flex; } .duel .bar { width: 120px; height: 10px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; overflow: hidden; } .duel .bar i { display: block; height: 100%; background: var(--red); } .duel .time { font-size: 24px; min-width: 40px; text-align: center; }
.fight { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); display: none; } .fight.on { display: block; }
.emotes { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; } .emotes button { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; font-size: 19px; cursor: pointer; box-shadow: 1px 2px 0 rgba(43,43,43,.2); }
/* the action cluster: three skills, dodge, dash, jump, and the big attack button */
.actions { position: absolute; right: 12px; bottom: 12px; display: grid; grid-template-columns: repeat(3, 82px) 104px; grid-template-areas: "i0 i1 bag lock" "s0 s1 s2 atk" "dodge dash jump atk"; gap: 8px; align-items: end; justify-items: center; }
.slot { position: relative; width: 52px; height: 44px; border-radius: 12px 9px 13px 8px; border: 2px solid var(--ink); background: #fff; font: 700 18px "Shantell Sans", cursive; cursor: pointer; box-shadow: 1px 2px 0 rgba(43,43,43,.2); touch-action: none; padding: 0; }
.slot[data-slot="0"] { grid-area: i0; } .slot[data-slot="1"] { grid-area: i1; } .bagbtn { grid-area: bag; } .lockbtn { grid-area: lock; }
.slot .n { position: absolute; right: 3px; bottom: 1px; font-size: 11px; color: var(--pencil); } .slot.empty .g { opacity: .25; } .lockbtn.on { background: var(--red); border-color: #8e1d14; }
.target { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: rgba(255,253,247,.94); border: 2px solid var(--red); border-radius: 12px 8px 14px 9px; padding: 4px 30px 6px 12px; min-width: 200px; text-align: center; font-size: 14px; }
.target b { display: block; } .target span { font-size: 12px; color: var(--pencil); } .target .bar { height: 8px; border: 2px solid var(--ink); border-radius: 5px; background: #fff; overflow: hidden; margin-top: 3px; } .target .bar i { display: block; height: 100%; background: var(--purple); }
.target .x { position: absolute; right: 6px; top: 4px; border: none; background: none; cursor: pointer; font-size: 14px; } body.dueling .target { display: none; }
.shopbtn { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); animation: wig .8s ease-in-out infinite alternate; background: var(--yellow); }
.bag { right: 12px; bottom: 210px; width: 330px; max-height: calc(100vh - 240px); overflow: auto; z-index: 3; }
.bag .tabs { display: flex; gap: 4px; } .bag .tabs button { font: 700 14px "Shantell Sans", cursive; border: 2px solid var(--ink); border-radius: 10px 7px 11px 8px; background: #fff; padding: 3px 10px; cursor: pointer; } .bag .tabs button.on { background: var(--yellow); } .bag .tabs button:disabled { opacity: .4; }
.bag .coins { display: flex; align-items: center; gap: 5px; font-size: 14px; margin: 4px 0 6px; } .bag .coins i { width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); border: 2px solid #b8890f; display: inline-block; }
.bag .it { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--faint); } .bag .it .gl { font-size: 22px; text-align: center; } .bag .it small { display: block; color: var(--pencil); font-size: 12px; }
.bag .it canvas { width: 34px; height: 34px; } .bag .it .btns { display: flex; gap: 4px; } .bag .it button { font: 700 12px "Shantell Sans", cursive; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--sticky); padding: 2px 7px; cursor: pointer; } .bag .it button:disabled { opacity: .4; cursor: default; }
.bag h4 { margin: 10px 0 2px; font-size: 14px; color: var(--pencil); } .bag .empty { color: var(--pencil); font-size: 13px; padding: 8px 0; }
.sk { position: relative; width: 82px; height: 66px; background: var(--sticky); border: 2px solid var(--ink); border-left: 7px solid var(--el, var(--ink)); border-radius: 10px 14px 8px 16px; font: 700 12.5px/1.1 "Shantell Sans", cursive; color: var(--ink); cursor: pointer; box-shadow: 2px 3px 0 rgba(43,43,43,.2); padding: 5px 5px 3px; text-align: left; overflow: hidden; touch-action: none; }
.sk[data-i="0"] { grid-area: s0; transform: rotate(-2deg); } .sk[data-i="1"] { grid-area: s1; transform: rotate(1.5deg); } .sk[data-i="2"] { grid-area: s2; transform: rotate(-1deg); }
.sk small { display: block; color: var(--pencil); font-size: 10.5px; font-weight: 400; margin-top: 2px; }
.sk kbd, .act kbd, .atk kbd { position: absolute; right: 5px; top: 3px; font: 400 10px "Shantell Sans", cursive; color: var(--pencil); }
.cd { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(43,43,43,.28); height: 0; pointer-events: none; }
.sk.low { opacity: .5; } .sk.flash, .atk.flash, .act.flash { animation: flash .3s; } @keyframes flash { 50% { filter: brightness(1.25); transform: scale(1.08); } }
.act { position: relative; width: 70px; height: 46px; border-radius: 23px; border: 2px solid var(--ink); background: #fff; font: 700 13px "Shantell Sans", cursive; cursor: pointer; box-shadow: 1px 2px 0 rgba(43,43,43,.2); touch-action: none; padding-top: 6px; }
#dodge { grid-area: dodge; } #dash { grid-area: dash; } #jump { grid-area: jump; } .act.tired { opacity: .45; }
.atk { grid-area: atk; position: relative; width: 100px; height: 100px; border-radius: 50%; border: 3px solid #8e1d14; background: var(--red); color: #fff; font: 800 15px/1.1 "Shantell Sans", cursive; cursor: pointer; box-shadow: 3px 4px 0 rgba(43,43,43,.25); overflow: hidden; touch-action: none; padding: 8px; }
.atk kbd { color: #ffd9d4; right: 50%; transform: translateX(50%); top: auto; bottom: 10px; }
.atk:active, .act:active, .sk:active { translate: 1px 2px; box-shadow: none; }
.stick { position: absolute; left: 22px; bottom: 22px; width: 130px; height: 130px; border: 2px dashed var(--pencil); border-radius: 50%; display: none; touch-action: none; background: rgba(255,253,247,.4); }
.stick i { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: var(--ink); opacity: .6; }
.touch .stick { display: block; } .touch .help, .touch kbd, .touch .back { display: none; }
.help { position: absolute; left: 12px; bottom: 14px; font-size: 12px; color: var(--pencil); background: rgba(255,253,247,.88); padding: 5px 10px; border-radius: 8px; border: 1.5px solid var(--faint); max-width: calc(100vw - 480px); }
/* chat */
.chatbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(560px, calc(100vw - 500px)); min-width: 300px; display: grid; gap: 6px; }
.quick { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; } .quick button { font: 700 13px "Shantell Sans", cursive; background: var(--sticky); border: 1.5px solid var(--ink); border-radius: 10px 7px 11px 8px; padding: 3px 9px; cursor: pointer; }
.chatbar form { display: flex; gap: 6px; } .chatbar input { flex: 1; font: 700 16px "Shantell Sans", cursive; border: 2px solid var(--ink); border-radius: 10px 7px 11px 8px; padding: 6px 10px; background: #fff; }
.chan { font: 700 12px "Shantell Sans", cursive; border: 2px solid var(--green); border-radius: 8px; background: #fff; cursor: pointer; }
.chatlog { position: absolute; left: 64px; bottom: 50px; width: 300px; display: flex; flex-direction: column; gap: 2px; pointer-events: none !important; }
.chatlog div { font-size: 13px; background: rgba(255,253,247,.86); border-radius: 6px; padding: 1px 7px; width: fit-content; max-width: 100%; transition: opacity .6s; } .chatlog b { margin-right: 4px; } .chatlog .party b { color: var(--green); } .chatlog .sys { color: var(--pencil); font-style: italic; }
/* panels: who's here, a player's card */
.panel { position: absolute; background: var(--white); border: 2.5px solid var(--ink); border-radius: 14px 10px 16px 11px; box-shadow: 4px 5px 0 rgba(43,43,43,.2); padding: 10px 12px; font-size: 14px; }
.panel .ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 16px; } .panel .ph.sub { margin-top: 10px; } .panel .x { border: none; background: none; font-size: 18px; cursor: pointer; }
.who { right: 12px; top: 48px; width: 290px; max-height: calc(100vh - 220px); overflow: auto; z-index: 3; }
.who .p { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--faint); } .who .p small { display: block; color: var(--pencil); font-size: 12px; } .who .p b.f { color: var(--orange); }
.who .p button { font: 700 12px "Shantell Sans", cursive; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--sticky); padding: 2px 8px; cursor: pointer; } .who .empty { color: var(--pencil); font-size: 13px; }
.invite { margin-top: 10px; display: grid; gap: 4px; } .invite small { color: var(--pencil); font-size: 12px; word-break: break-all; }
.pcard { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100vw - 32px)); z-index: 4; }
.pcard .top { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; } .pcard img { width: 96px; height: 96px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.pcard h3 { margin: 0; font-size: 22px; line-height: 1.1; } .pcard .meta { color: var(--pencil); font-size: 13px; } .pcard .bio { font-size: 13px; color: var(--pencil); margin: 8px 0; }
.pcard .els { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; } .pcard .els span { font-size: 11px; color: #fff; background: var(--el); border-radius: 6px; padding: 0 6px; font-weight: 700; }
.pcard .acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 8px; } .pcard .acts button, .pcard .acts a { font: 700 13px "Shantell Sans", cursive; border: 2px solid var(--ink); border-radius: 10px 7px 11px 8px; background: #fff; padding: 6px 4px; cursor: pointer; text-align: center; color: var(--ink); text-decoration: none; }
.pcard .acts .hot { background: var(--yellow); }
.sticky { position: absolute; left: 50%; top: 8%; transform: translateX(-50%) rotate(-1.5deg); background: var(--sticky); border: 2px solid var(--ink); padding: 14px 18px; border-radius: 8px 12px 6px 14px; box-shadow: 3px 4px 0 rgba(43,43,43,.2); max-width: min(420px, 90vw); font-size: 17px; z-index: 5; }
.sticky .row { margin-top: 10px; } .sticky ul { margin: 6px 0 0 18px; padding: 0; font-size: 15px; }
/* the loading screen while a doodle is read */
.loadwrap { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: #fbf8ef; background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px); padding: 16px; }
.loadcard { display: grid; grid-template-columns: minmax(240px, 380px) minmax(260px, 380px); gap: 18px; align-items: center; background: var(--white); border: 2.5px solid var(--ink); border-radius: 18px 14px 20px 12px; box-shadow: 5px 6px 0 rgba(43,43,43,.18); padding: 18px; max-width: 820px; width: 100%; }
#lc { width: 100%; aspect-ratio: 1; display: block; border: 2px dashed var(--faint); border-radius: 12px; }
.loadwrap.done .loadcard { animation: away .6s cubic-bezier(.5,0,.8,.3) forwards; } @keyframes away { to { transform: scale(.6) rotate(-6deg); opacity: 0; } }
@media (max-width: 700px) { .loadcard { grid-template-columns: 1fr; gap: 10px; padding: 12px; } #lc { max-width: 260px; margin: 0 auto; } }
@media (max-width: 900px) { body.dueling .me { display: none !important; } .help { display: none; } }
@media (max-width: 700px) { .me { width: 180px; padding: 4px 8px 6px; } .me b { font-size: 14px; max-width: 80px; } .region { font-size: 30px; } #mini { width: 110px; height: 110px; } #compass { top: 164px; font-size: 12px; max-width: 150px; } .chatbar { width: calc(100vw - 24px); min-width: 0; bottom: auto; top: 200px; } .chatlog { left: 12px; bottom: auto; top: 260px; width: 220px; } }
@media (max-height: 460px) { #mini { width: 96px; height: 96px; top: 44px; } #compass { top: 146px; } .emotes { top: 58%; } .emotes button { width: 34px; height: 34px; font-size: 16px; } .party { top: 112px; }
  .actions { grid-template-columns: repeat(3, 70px) 84px; gap: 6px; } .slot { width: 44px; height: 36px; font-size: 15px; } .bag { bottom: 12px; right: 330px; max-height: calc(100vh - 24px); } .sk { width: 70px; height: 56px; font-size: 11px; } .act { width: 62px; height: 40px; font-size: 12px; } .atk { width: 84px; height: 84px; font-size: 13px; } .chatbar { top: 60px; bottom: auto; } }
@media (max-width: 600px) and (orientation: portrait) {
  .actions { grid-template-columns: repeat(3, 56px) 78px; grid-template-areas: "i0 i1 bag lock" "s0 s1 s2 jump" "dodge dash atk atk"; gap: 6px; right: 8px; bottom: 10px; } .slot { width: 46px; height: 36px; font-size: 15px; } .bag { left: 8px; right: 8px; width: auto; bottom: 200px; max-height: 55vh; }
  .sk { width: 56px; height: 54px; font-size: 10.5px; padding: 4px 3px 2px; border-left-width: 5px; } .sk small { font-size: 9px; }
  .act { width: 56px; height: 40px; font-size: 11.5px; padding-top: 3px; } #jump { width: 70px; } .atk { width: 84px; height: 84px; font-size: 13px; justify-self: end; }
  .stick { width: 112px; height: 112px; left: 10px; bottom: 16px; } .stick i { left: 31px; top: 31px; }
  .emotes { top: 40%; } .emotes button { width: 36px; height: 36px; font-size: 16px; } .sticky { top: 200px; font-size: 15px; padding: 10px 14px; max-width: 82vw; } .region { top: 30%; }
}
