/* Burmese (Unicode) font, bundled so the text is right on every device,
   including phones that only have a Zawgyi font. SIL Open Font License. */
@font-face {
  font-family: "Kyat Myanmar"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/NotoSansMyanmar-400.woff2") format("woff2");
  unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Kyat Myanmar"; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("/fonts/NotoSansMyanmar-700.woff2") format("woff2");
  unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F, U+200C-200D, U+25CC;
}
:root {
  --blue: #0b5cc4;
  --blue-dark: #08407f;
  --gold: #e9a400;
  --ink: #16202e;
  --muted: #5d6b7e;
  --line: #dde3ec;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ok: #0f7a3d;
  --bad: #b3261e;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Kyat Myanmar", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Myanmar",
    "Myanmar Text", Padauk, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", Meiryo, sans-serif;
}
html[lang="my"] body { line-height: 1.9; }
a { color: var(--blue); }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; line-height: 1.3; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; line-height: 1.35; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* Header */
.top { background: var(--blue); color: #fff; border-bottom: 4px solid var(--gold); }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding-top: 12px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.45rem; font-weight: 700; letter-spacing: .2px; }
.brand b { color: #ffd45a; font-weight: 700; }
.langs { display: flex; gap: 4px; }
.langs a { white-space: nowrap; color: #dbe8fb; text-decoration: none; padding: 3px 10px; border-radius: 999px; font-size: .9rem; }
.langs a.on { background: #fff; color: var(--blue-dark); font-weight: 600; }
.langs a:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.langs a.on:hover { background: #fff; color: var(--blue-dark); }
.main { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px 0 10px; }
.main a { color: #e7f0fd; text-decoration: none; padding: 6px 12px; border-radius: 8px; }
.main a:hover, .main a.on { background: rgba(255, 255, 255, .18); color: #fff; }
.main a.cta { background: var(--gold); color: #2a1d00; font-weight: 600; }
.main .spacer { flex: 1; }
.logout { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.logout .who { color: #dbe8fb; font-size: .9rem; }
button.link { background: none; border: 0; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; padding: 6px 4px; }

main.wrap { padding-top: 26px; padding-bottom: 40px; min-height: 60vh; }

/* Messages */
.msg { padding: 10px 14px; border-radius: var(--radius); margin: 0 0 16px; border: 1px solid; }
.msg.ok { background: #e8f6ee; border-color: #a9dcbd; color: #0a5a2c; }
.msg.bad { background: #fdecea; border-color: #f3b9b4; color: #8c1d18; }
.msg.warn { background: #fff7e0; border-color: #f0d68a; color: #6b4e00; }

/* Buttons */
.btn {
  display: inline-block; background: var(--blue); color: #fff; border: 1px solid var(--blue);
  padding: 10px 18px; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn.ghost { background: #fff; color: var(--blue); }
.btn.ghost:hover { background: #eaf2fd; }
.btn.small { padding: 5px 12px; font-size: .9rem; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline form { margin: 0; }

/* Panels */
.panel, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.panel.narrow, .panel.form { max-width: 620px; }
.panel.form { margin-left: auto; margin-right: auto; }
.panel.narrow { margin-left: auto; margin-right: auto; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.head h1, .head h2 { margin: 0; }

/* Home */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 18px 0 30px; }
.hero h1 { font-size: 2.2rem; line-height: 1.25; margin-bottom: 14px; }
.hero .lead { font-size: 1.12rem; color: #33415a; max-width: 34em; margin: 0 0 22px; }
.hero .coin { flex: none; max-width: 34vw; height: auto; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.features .card { margin: 0; border-top: 3px solid var(--gold); }
.features p { margin: 0; color: #3d4a5f; }

/* Forms */
form label { display: block; font-weight: 600; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid #b9c3d1; border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid #9cc3f7; outline-offset: 1px; }
form small { display: block; color: var(--muted); margin-top: 3px; }
.panel.form .btn { margin-top: 18px; }
.panel.form form + p { margin: 16px 0 0; }
.head form.inline input { width: 220px; }

/* Account */
.balance {
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; border-radius: var(--radius);
  padding: 24px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
}
.balance .label { margin: 0; color: #cfe0f8; }
.balance .amount { margin: 0; font-size: 2.3rem; font-weight: 700; line-height: 1.2; }
.balance .amount span { font-size: 1.1rem; color: #ffd45a; font-weight: 600; }
.balance .btn { background: var(--gold); border-color: var(--gold); color: #2a1d00; }
.balance .btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.balance .btn.ghost:hover { background: rgba(255, 255, 255, .15); }
.reqs { list-style: none; margin: 0; padding: 0; }
.reqs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.reqs li:first-child { border-top: 0; }

/* Tables */
.scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.grid th, table.grid td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid th { color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
table.grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plus { color: var(--ok); font-weight: 600; }
.minus { color: var(--bad); font-weight: 600; }
tr.dead td { color: #8d98a8; }
tr.dead .num { text-decoration: line-through; }
.note { color: var(--muted); max-width: 22em; overflow-wrap: anywhere; }
.pager { display: flex; gap: 10px; margin: 16px 0 0; }
.tag { background: #fff3cf; color: #6b4e00; border-radius: 6px; padding: 1px 7px; font-size: .78rem; }

/* Facts */
.facts { margin: 14px 0; }
.facts dt { color: var(--muted); font-size: .88rem; margin-top: 12px; }
.facts dd { margin: 2px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Admin */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.subnav a { padding: 6px 14px; border-radius: 999px; text-decoration: none; background: #e6ecf5; color: var(--ink); }
.subnav a.on { background: var(--ink); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats .card { margin: 0; }
.stats .label { margin: 0; color: var(--muted); font-size: .9rem; }
.stats .big { margin: 2px 0 0; font-size: 1.5rem; font-weight: 700; overflow-wrap: anywhere; }
.stats .big span { font-size: .9rem; color: var(--muted); font-weight: 500; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .9rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.foot a { color: var(--muted); }

@media (max-width: 700px) {
  .hero { flex-direction: column-reverse; align-items: flex-start; }
  .hero h1 { font-size: 1.7rem; }
  .hero .coin { width: 140px; max-width: none; }
  .logout { margin-left: 0; width: 100%; justify-content: space-between; }
  .balance .amount { font-size: 1.8rem; }
}
