/* Tiny Kingdom UI */
body { background: #9fd4f2; }
.loading { background: linear-gradient(#6fb5e6, #ffe7bf); }
.tk-title { justify-content: center; gap: 4px; background: radial-gradient(ellipse at center 40%, rgba(255,245,220,0) 0%, rgba(20,40,60,.28) 100%); }
.tk-logo img { filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); border-radius: 22px; }
.tk-logo h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 10vw, 86px); margin: 4px 0 0; color: #fffaf0; text-shadow: 0 4px 0 #3f6fa8, 0 9px 26px rgba(0,0,0,.45); line-height: 1; }
.tk-logo .sub { display: inline-block; margin-top: 8px; padding: 6px 16px; border-radius: 999px; background: rgba(255,250,236,.92); color: #3f6fa8; font-weight: 900; font-size: clamp(15px, 3.6vw, 20px); letter-spacing: .5px; box-shadow: 0 4px 14px rgba(0,0,0,.22); }
.wxline { color: #fff; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.65); font-size: 17px; max-width: 560px; margin: 14px 10px 6px; }
.tbtns { display: flex; flex-direction: column; align-items: center; } .tbtns .btn.alt { min-width: 220px; }
/* top HUD */
.tk-top { position: fixed; z-index: 6; top: calc(8px + var(--sat)); left: calc(8px + var(--sal)); right: calc(64px + var(--sar)); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: none; }
.tk-top > * { pointer-events: auto; cursor: pointer; }
.tk-lv { display: flex; align-items: center; gap: 6px; background: rgba(255,250,236,.94); border-radius: 999px; padding: 3px 12px 3px 3px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.tk-lv > b { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe48a, #e0a83a); display: flex; align-items: center; justify-content: center; font-size: 16px; color: #5a3408; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.tk-lv small { display: block; font-weight: 800; font-size: 11px; color: #7a4a10; line-height: 1.1; } .xp { display: block; width: 70px; height: 7px; border-radius: 6px; background: rgba(0,0,0,.15); overflow: hidden; margin-top: 2px; } .xp i { display: block; height: 100%; background: linear-gradient(90deg, #6cc0f0, #3f8ad8); }
.tk-wx { margin-left: auto; display: flex; gap: 6px; align-items: center; border: 0; border-radius: 16px; padding: 4px 10px; background: rgba(255,250,236,.94); box-shadow: 0 2px 8px rgba(0,0,0,.2); text-align: left; }
.tk-wx .wi { font-size: 26px; line-height: 1; } .tk-wx b { display: block; font-size: 16px; } .tk-wx small { display: block; font-size: 10.5px; font-weight: 800; color: #3f6fa8; white-space: nowrap; }
.tk-res { position: fixed; z-index: 5; top: calc(56px + var(--sat)); left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; cursor: pointer; touch-action: pan-x; }
.tk-res::-webkit-scrollbar { display: none; } .tk-res span { flex: none; background: rgba(40,30,20,.55); color: #fff; border-radius: 999px; padding: 3px 9px; font-size: 13px; font-weight: 800; display: inline-flex; gap: 4px; align-items: center; } .tk-res b { font-weight: 900; }
.tk-quest { position: fixed; z-index: 5; top: calc(88px + var(--sat)); left: calc(8px + var(--sal)); max-width: min(420px, calc(100vw - 16px)); display: flex; gap: 8px; align-items: center; background: rgba(255,250,236,.93); border-radius: 14px; padding: 7px 10px; box-shadow: 0 3px 12px rgba(0,0,0,.2); cursor: pointer; }
.tk-quest .qt b { display: block; font-size: 14px; color: #7a4a10; } .tk-quest .qt small { display: block; font-size: 12.5px; line-height: 1.3; } .tk-quest .qp { font-weight: 900; color: #3f6fa8; white-space: nowrap; } .tk-quest .btn { min-width: 0; min-height: 36px; padding: 6px 14px; font-size: 15px; margin: 0; }
.tk-quest.mini .qt small { display: none; } .tk-quest.done { box-shadow: 0 0 0 3px #f2b51e, 0 3px 14px rgba(0,0,0,.25); animation: bump .6s 2; }
/* bottom bar */
.tk-bar { position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); bottom: calc(8px + var(--sab)); display: flex; gap: 4px; background: rgba(255,250,236,.94); padding: 5px; border-radius: 20px; box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.tk-bar button { position: relative; border: 0; background: none; width: 62px; height: 56px; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #4a3212; }
.tk-bar button:active { background: #ffe7a8; } .tk-bar .i { font-size: 24px; line-height: 1; } .tk-bar .l { font-size: 11px; font-weight: 800; margin-top: 2px; }
.tk-bar .dot { position: absolute; top: 4px; right: 9px; width: 11px; height: 11px; border-radius: 50%; background: #e0503a; box-shadow: 0 0 0 2px #fff; }
.tk-act { position: fixed; z-index: 7; right: calc(16px + var(--sar)); bottom: calc(84px + var(--sab)); width: 76px; height: 76px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #fff8e0, #f6c453 60%, #c7861f); box-shadow: 0 5px 0 #8a5a12, 0 8px 20px rgba(0,0,0,.3); font-size: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.tk-act small { font-size: 11px; font-weight: 900; margin-top: 2px; color: #4a2a08; } .tk-act:active { transform: translateY(3px); }
/* placement */
.tk-place { position: fixed; z-index: 8; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--sab)); display: flex; gap: 8px; align-items: center; background: rgba(255,250,236,.96); border-radius: 22px; padding: 8px 10px; box-shadow: 0 6px 22px rgba(0,0,0,.3); max-width: 96vw; }
.tk-place .pinfo { min-width: 120px; max-width: 46vw; } .tk-place .pinfo b { display: block; } .tk-place .pinfo small { display: block; font-size: 12px; } .tk-place .pmsg { color: #3a8a3a; font-weight: 800; } .tk-place.bad .pmsg { color: #c8402a; }
.tk-place .round { width: 54px; height: 54px; font-size: 22px; } .tk-place .ok { background: #6cc04a; color: #fff; } .tk-place .ok:disabled { opacity: .45; } .tk-place .no { background: #f0d0c8; }
/* sheets */
.tk-sheet { position: fixed; inset: 0; z-index: 12; display: flex; align-items: flex-end; justify-content: center; background: rgba(15,20,35,.28); animation: fin .18s; }
.sh-card { width: min(560px, 100vw); max-height: min(78vh, 720px); display: flex; flex-direction: column; background: linear-gradient(var(--parch), var(--parch2)); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.35), inset 0 0 0 3px rgba(199,134,31,.3); padding-bottom: var(--sab); animation: slideup2 .25s cubic-bezier(.2,1.2,.4,1); }
.tk-sheet.wide .sh-card { width: min(760px, 100vw); }
@keyframes slideup2 { from { transform: translateY(40px); opacity: 0; } }
.sh-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 4px 18px; } .sh-head h3 { margin: 0; font-family: Georgia, serif; color: #7a4a10; font-size: 22px; }
.sh-x { width: 40px; height: 40px; font-size: 16px; }
.sh-body { overflow-y: auto; padding: 4px 14px 16px; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
@media (orientation: landscape) and (max-height: 560px) { .tk-sheet { align-items: stretch; justify-content: flex-end; } .sh-card { max-height: 100vh; height: 100%; border-radius: 22px 0 0 22px; width: min(460px, 60vw); } .tk-sheet.wide .sh-card { width: min(620px, 72vw); } }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 4px 0 10px; } .tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.7); font-weight: 800; font-size: 14px; color: #6a4a20; box-shadow: 0 2px 0 #d8c49a; } .tabs button.on { background: #e0a83a; color: #3a2208; box-shadow: 0 2px 0 #8a5a12; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.bcard { position: relative; border: 0; border-radius: 16px; background: rgba(255,255,255,.8); box-shadow: 0 3px 0 #d8c49a, 0 6px 12px rgba(0,0,0,.08); padding: 8px 6px; min-height: 104px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bcard .bi { font-size: 32px; line-height: 1.1; } .bcard b { font-size: 13.5px; line-height: 1.15; } .bcard small { font-size: 11.5px; line-height: 1.3; } .bcard small span { white-space: nowrap; margin: 0 1px; }
.bcard em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 11px; font-weight: 900; color: #9a6a1e; } .bcard .hol { position: absolute; top: 4px; left: 6px; font-style: normal; font-size: 10px; background: #f06a9a; color: #fff; border-radius: 6px; padding: 0 4px; }
.bcard.locked { opacity: .55; filter: grayscale(.8); } .bcard.poor { opacity: .82; } .lack { color: #c8402a; font-weight: 900; }
.hint { font-size: 13px; color: #7a6040; text-align: center; margin: 10px 4px; } .center { text-align: center; } .small { font-size: 13px; } .warn { color: #b84a2a; font-weight: 700; font-size: 14px; }
.selhead { display: flex; gap: 12px; align-items: flex-start; } .selhead .bi.big { font-size: 46px; } .selhead b { font-size: 19px; } .selhead small { display: block; font-weight: 800; color: #9a6a1e; } .selhead p { margin: 4px 0; font-size: 14px; }
.stat { background: rgba(255,255,255,.7); border-radius: 12px; padding: 8px 10px; font-weight: 700; margin: 8px 0; } .io { font-size: 15px; margin: 6px 0; }
.wxn { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; } .wxn small { width: 100%; color: #7a6040; } .wxn span { font-size: 12.5px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.06); color: #8a7a60; } .wxn span.on { background: #3f8ad8; color: #fff; font-weight: 800; }
.sh-body .btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; } .sh-body .btn { margin: 0; min-width: 0; font-size: 16px; padding: 10px 16px; } .sh-body .btn small { display: block; font-size: 11.5px; font-weight: 700; }
.btn.sm { min-height: 34px; padding: 5px 12px !important; font-size: 13.5px !important; }
.quote { font-family: Georgia, serif; font-style: italic; font-size: 19px; background: rgba(255,255,255,.7); padding: 10px 14px; border-radius: 14px; margin-bottom: 6px; }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 4px 0 6px; } .sd { background: rgba(255,255,255,.7); border-radius: 10px; padding: 4px 0; text-align: center; display: flex; flex-direction: column; font-weight: 800; } .sd small { font-size: 10.5px; } .sd span { font-size: 20px; } .sd.past { opacity: .5; } .sd.today { background: #ffe08a; box-shadow: 0 0 0 2px #e0a83a; }
.task, .order { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.75); border-radius: 14px; padding: 9px 11px; margin: 6px 0; } .task > div { flex: 1; } .task b { font-size: 14.5px; display: block; } .task small { font-size: 12px; color: #7a6040; } .task.done { opacity: .6; } .task.wxt { box-shadow: inset 0 0 0 2px #7ab0ff; }
.tbar { display: block; height: 8px; background: rgba(0,0,0,.12); border-radius: 6px; overflow: hidden; margin: 4px 0; } .tbar i { display: block; height: 100%; background: linear-gradient(90deg, #6cc04a, #b8e05a); border-radius: 6px; }
.order { flex-direction: column; align-items: stretch; } .order .want { font-size: 18px; font-weight: 800; } .order .rew { font-size: 13px; color: #7a6040; } .order .btns { justify-content: flex-end; margin-top: 4px; }
.happy { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; } .happy > span { font-size: 44px; } .happy b { font-size: 20px; display: block; } .happy small { color: #7a6040; }
.need { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 6px; margin: 6px 0; font-weight: 800; font-size: 14px; } .need small { grid-column: 1 / -1; font-weight: 600; color: #7a6040; font-size: 12px; margin-top: -4px; }
h4 { margin: 14px 0 6px; font-family: Georgia, serif; color: #7a4a10; }
.vlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; } .vlist button { border: 0; border-radius: 12px; background: rgba(255,255,255,.75); padding: 7px; text-align: left; } .vlist small { display: block; font-size: 11.5px; color: #7a6040; }
.minimap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .mm { border: 0; border-radius: 14px; min-height: 84px; background: #c8c0b0; color: #4a4030; padding: 6px; } .mm.can { background: #f6d87a; box-shadow: 0 0 0 2px #e0a83a; } .mm.open { background: #9ad06a; color: #24400e; } .mm b { display: block; font-size: 13px; } .mm small { font-size: 11px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } .tcard { background: rgba(255,255,255,.8); border-radius: 14px; padding: 8px; text-align: center; } .tcard .bi { font-size: 30px; } .tcard b { display: block; } .tcard small { display: block; font-size: 11.5px; color: #3f6fa8; font-weight: 700; } .tcard p { font-size: 12px; margin: 4px 0 0; } .tcard.unk { opacity: .7; }
.alist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 5px; } .ach { display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.55); border-radius: 12px; padding: 6px 8px; opacity: .65; } .ach.got { opacity: 1; background: rgba(255,240,190,.9); } .ach b { font-size: 13px; display: block; } .ach small { font-size: 11.5px; color: #7a6040; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; background: rgba(255,255,255,.7); border-radius: 14px; padding: 10px 12px; font-size: 14px; } .kv b { text-align: right; }
.inv .ir { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 4px; border-bottom: 1px solid rgba(0,0,0,.07); } .inv .ir > span { font-size: 22px; } .inv .ir > b { flex: 1; } .inv em { font-style: normal; font-weight: 900; min-width: 40px; text-align: right; }
.wxbig { display: flex; gap: 14px; align-items: center; justify-content: center; } .wxbig > span { font-size: 64px; } .wxbig b { font-size: 38px; display: block; } .wxbig small { font-size: 17px; font-weight: 700; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 900; font-size: 13px; background: #ddd; } .badge.live { background: #3fa86a; color: #fff; } .badge.sim { background: #e0a83a; color: #3a2208; }
.fx { padding-left: 4px; list-style: none; margin: 0; } .fx li { background: rgba(255,255,255,.7); border-radius: 12px; padding: 7px 10px; margin: 5px 0; font-size: 14px; }
.fc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; } .fc div { background: rgba(255,255,255,.7); border-radius: 12px; text-align: center; padding: 6px 2px; display: flex; flex-direction: column; } .fc span { font-size: 26px; } .fc small { font-size: 11.5px; font-weight: 700; }
.privacy { font-size: 12px; color: #6a5a40; line-height: 1.4; margin: 12px 4px 0; text-align: center; } .screen .privacy { color: #fff; opacity: .9; max-width: 480px; }
.tk-loc .card { max-width: min(460px, 94vw); } .tk-loc .or { margin: 10px 0 4px; font-size: 14px; color: #7a6040; font-weight: 700; } .city { display: flex; gap: 6px; } .city input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 10px 12px; border-radius: 14px; border: 2px solid #d8c49a; background: #fffdf6; user-select: text; -webkit-user-select: text; } .city .btn { margin: 0; min-width: 0; }
.results .btn.opt { margin: 5px 0; font-size: 15px; } .lmsg { min-height: 20px; font-weight: 700; color: #7a4a10; margin: 6px 0; font-size: 14px; }
.unl { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 4px; } .unl span { background: rgba(255,255,255,.8); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 14px; }
.toast { bottom: calc(150px + var(--sab)); }
@media (max-width: 420px) { .tk-bar button { width: 56px; } .tk-lv small { display: none; } .tk-lv .xp { width: 46px; } .chip { font-size: 13px; padding: 5px 9px; } }
@media (max-height: 460px) { .tk-res { top: calc(50px + var(--sat)); } .tk-quest { top: auto; bottom: calc(8px + var(--sab)); left: calc(8px + var(--sal)); max-width: 30vw; } .tk-quest .qt small { display: none; } .tk-bar { left: auto; right: calc(8px + var(--sar)); transform: none; flex-direction: row; } .tk-bar button { width: 54px; height: 50px; } .tk-act { bottom: calc(72px + var(--sab)); } .toast { bottom: calc(80px + var(--sab)); } .tk-logo h1 { font-size: 44px; } .tk-logo img { width: 56px; height: 56px; } .wxline { margin: 6px; } }

/* rounded display font (no serif) */
.title-screen h1, .tk-logo h1, .vtitle, .bigmsg, .rtitle, .sh-head h3, h4, .quote, .modal h2, .modal h3 { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", system-ui, sans-serif !important; font-weight: 900; letter-spacing: .2px; }
.quote { font-weight: 600; }
@media (max-width: 520px) and (min-height: 461px) { .tk-wx { position: fixed; top: calc(52px + var(--sat)); right: calc(8px + var(--sar)); margin: 0; } .tk-res { right: calc(108px + var(--sar)); } .tk-quest { top: calc(104px + var(--sat)); } }
.overlay .card { max-height: calc(100dvh - 20px - var(--sat) - var(--sab)); overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
@media (max-height: 460px) { .tk-loc .card { padding: 12px 16px; } .tk-loc .ticon { display: none; } .tk-loc .vtitle { font-size: 19px; margin-bottom: 2px; } .tk-loc .q { font-size: 14px; margin: 4px 0 8px; } .tk-loc .btn.big { min-height: 42px; font-size: 17px; padding: 6px 18px; } .tk-loc .or { margin: 6px 0 4px; } .tk-loc .privacy { font-size: 11px; margin: 6px 0 0; } .tk-loc .btn.alt { min-height: 40px; font-size: 15px; } }
body.placing .tk-bar, body.placing .tk-act { display: none !important; }
