:root {
  color-scheme: light;
  --c1: #007aff;
  --c2: #5ac8fa;
  --c3: #5856d6;
  --c4: #1f9d55;
  --c5: #ff9f0a;
  --bg: color-mix(in srgb, var(--c2) 18%, #eef1f4);
  --card: color-mix(in srgb, var(--c2) 7%, #ffffff);
  --fill: color-mix(in srgb, var(--c3) 8%, #f6f7f9);
  --text: #121826;
  --muted: #5d6b82;
  --line: color-mix(in srgb, var(--c3) 16%, #e3e7ee);
  --danger: #d2193b;
  --ink: var(--c1);
  --btn: color-mix(in srgb, var(--c2) 34%, white);
  --shadow: 0 16px 40px color-mix(in srgb, var(--c3) 14%, transparent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: color-mix(in srgb, var(--c3) 18%, #0c1016);
    --card: color-mix(in srgb, var(--c1) 10%, #161b22);
    --fill: color-mix(in srgb, var(--c3) 12%, #10141a);
    --text: #f4f7fb;
    --muted: #a9b4c4;
    --line: color-mix(in srgb, var(--c2) 18%, #2c3544);
    --btn: color-mix(in srgb, var(--c3) 32%, #1b212b);
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); max-width: 100%; overflow-x: hidden; overflow-y: auto; }
button, input, select { font: inherit; color: var(--text); }
button {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c1) 42%, var(--line)) !important;
  background: color-mix(in srgb, var(--c1) 14%, var(--card)) !important;
  color: var(--c1) !important;
  border-radius: 12px !important;
  min-height: 40px;
  padding: 8px 12px !important;
  font-weight: 750;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
button:hover { transform: translateY(-1px); }
button:active { transform: scale(0.97); }
.tabs button, .seg button {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
}
.tabs button.on, .seg button.on, .themes button.on {
  background: color-mix(in srgb, var(--c1) 16%, var(--card)) !important;
  color: var(--c1) !important;
  border-color: color-mix(in srgb, var(--c1) 40%, transparent) !important;
}
.primary, .add, .login-card .primary {
  background: var(--c1) !important;
  color: #fff !important;
  border-color: var(--c1) !important;
}
#logoutBtn, .danger, .item button {
  background: color-mix(in srgb, var(--danger) 12%, var(--card)) !important;
  color: var(--danger) !important;
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line)) !important;
}
img { display: block; }
.login {
  min-height: 100dvh;
  overflow: auto;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
}
@media (max-width: 800px) {
  .login { height: 100dvh; min-height: 0; align-content: start; overflow-x: hidden; overflow-y: auto; padding-top: calc(20px + env(safe-area-inset-top)); }
  .login-card button { min-height: 52px; }
}
.brand { display: flex; gap: 14px; align-items: center; }
.brand h1 { margin: 0; font-size: 34px; letter-spacing: -0.04em; }
.brand p { margin: 4px 0 0; color: var(--muted); }
.login-card, .card, .block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.login-card { display: grid; gap: 12px; padding: 18px; }
label { display: grid; gap: 4px; margin: 0; min-width: 0; font-size: 13px; font-weight: 650; color: var(--muted); }
input, select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--fill);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 16px;
}
input[type="date"], input[type="month"] {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 46px;
  min-height: 46px;
  padding: 0 10px !important;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  text-align: center;
}
input[type="date"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  line-height: 1.2;
  padding: 0;
  margin: 0;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value {
  display: inline-block;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  text-align: center;
}
.primary, .ghost, .google {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 750;
}
.primary { background: var(--c1); color: white; }
.login-card .primary { background: var(--c1) !important; color: #fff !important; border-color: var(--c1) !important; }
.login-card .ghost { background: color-mix(in srgb, var(--c1) 10%, var(--card)) !important; color: var(--c1) !important; border-color: color-mix(in srgb, var(--c1) 28%, var(--line)) !important; }
.login-card .google {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--card) !important; color: var(--text) !important; border: 1px solid var(--line) !important;
}
.login-card .google::before { content: "G"; color: var(--c1); font-weight: 800; }
.login-card #loginThemeBtn {
  width: auto !important; justify-self: center; min-height: 34px !important;
  margin-top: 2px; padding: 4px 14px 4px 48px !important; border-radius: 999px !important;
  background: transparent !important; color: var(--muted) !important;
  border: 1px dashed color-mix(in srgb, var(--c2) 70%, var(--line)) !important;
  box-shadow: none !important; font-size: 13px; font-weight: 650; position: relative;
}
.login-card #loginThemeBtn::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 8px; height: 8px;
  margin-top: -4px; border-radius: 50%; background: var(--c1);
  box-shadow: 12px 0 0 var(--c2), 24px 0 0 var(--c5);
}
.login-card .link, .login-card .link:hover {
  justify-self: end; min-height: 0 !important; padding: 0 !important;
  border: 0 !important; background: transparent !important; color: var(--c1) !important;
  box-shadow: none !important; transform: none; font-size: 13px;
}
.ghost { background: color-mix(in srgb, var(--c3) 12%, var(--card)); color: var(--c3); border-color: color-mix(in srgb, var(--c3) 35%, var(--line)); }
.msg { min-height: 1.2em; margin: 0; color: var(--text); font-size: 14px; }
@media (max-width: 800px) {
  .login { align-content: start; overflow: auto; padding-bottom: 48px; }
}
.muted { color: var(--muted); }
.shell { min-height: 100dvh; width: 100%; max-width: 100%; margin: 0 auto; overflow-x: clip; }
@media (max-width: 800px) {
  .shell { max-width: 430px; }
}
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}
.top strong { flex: 1; font-size: 18px; }
#guideBtn {
  position: fixed; z-index: 9;
  top: calc(12px + env(safe-area-inset-top)); left: 14px;
  width: 36px; height: 36px; min-width: 36px; min-height: 36px !important;
  padding: 0 !important; border-radius: 50% !important;
  font-size: 18px; font-weight: 800; line-height: 1;
}
.top { padding-left: 58px; }
.guide { gap: 8px; }
.guide h3 { margin: 8px 0 0; font-size: 15px; color: var(--c1); }
.guide p { margin: 0; line-height: 1.55; font-size: 14px; }
.add {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px !important;
  padding: 0 !important; border-radius: 50% !important;
  display: inline-flex !important; align-items: center; justify-content: center;
  background: var(--c1) !important; color: #fff !important; border-color: var(--c1) !important;
}
.add svg { display: block; width: 20px; height: 20px; }
.add:hover, .add:active { transform: none; }
.tabs {
  position: fixed;
  z-index: 6;
  left: 18px; right: 18px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.tabs button {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 14px; min-height: 44px; font-size: 12px; font-weight: 700;
}
.tabs button.on { background: var(--btn); color: var(--c1); }
.tabs button:hover, .seg button:hover { transform: none; box-shadow: none; }
#view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  overflow-x: clip;
  touch-action: pan-y;
  padding: 4px 18px calc(220px + env(safe-area-inset-bottom));
}
.block {
  display: grid;
  gap: 14px;
  padding: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  contain: none;
}
.block > button { justify-self: start; margin-top: 2px; }
.group { margin: 14px 0 4px; font-size: 13px; color: var(--muted); }
.hero { font-size: clamp(28px, 7vw, 36px); font-weight: 780; letter-spacing: -0.04em; margin: 2px 0; }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-width: 0; }
.row b { flex: 1; min-width: 0; text-align: center; }
.row label { flex: 1; min-width: 0; }
.row > button { flex: 0 0 40px; width: 40px; padding: 0 !important; }
.row > button.qmark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 13px;
  line-height: 1;
}
.seg { display: flex; gap: 4px; background: var(--fill); padding: 4px; border-radius: 14px; width: 100%; position: relative; }
.seg[data-seg] button, .tabs button:not(#logoutBtn) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  transform: none !important;
}
.seg[data-seg] button.on, .tabs button:not(#logoutBtn).on {
  color: var(--c1) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.seg .pill, .tabs .pill {
  position: absolute; z-index: 0; pointer-events: none; border-radius: 12px;
  background: var(--btn); box-shadow: none;
}
.tabs .pill { background: var(--btn); border-radius: 14px; }
.seg button, .tabs button { position: relative; z-index: 1; }
.seg button { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--muted); border-radius: 10px; min-height: 36px; padding: 6px 4px !important; transition: color .28s ease; }
.seg button.on { background: var(--card); color: var(--c1); font-weight: 750; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.bar { height: 8px; background: var(--fill); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--c1), var(--c2)); transition: width .55s ease; }
.block { padding: 12px; max-width: 100%; min-width: 0; overflow: visible; contain: none; align-content: start; }
#view.swap { animation: soft .28s ease; }
@keyframes soft { from { opacity: .55; } to { opacity: 1; } }
.item button {
  min-height: 34px;
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
}
.rail-wrap { position: relative; }
.rail-wrap:after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 6px; width: 22px;
  background: linear-gradient(90deg, transparent, var(--card));
  pointer-events: none;
}
.rail {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 18px 6px 0;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
@media (hover: hover) and (pointer: fine) {
  .rail, .daybars {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--c1) 70%, white) transparent;
    padding-bottom: 12px;
  }
  .rail::-webkit-scrollbar, .daybars::-webkit-scrollbar { display: block; height: 8px; }
  .rail::-webkit-scrollbar-thumb, .daybars::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--c1) 70%, white);
    border-radius: 99px;
  }
  .rail::-webkit-scrollbar-track, .daybars::-webkit-scrollbar-track { background: transparent; }
  .rail-wrap:after { bottom: 16px; }
}
.rail button {
  position: relative;
  flex: 0 0 22%;
  scroll-snap-align: start;
  min-height: 72px !important;
  padding: 8px 4px !important;
  border-radius: 16px !important;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; line-height: 1.15; text-align: center;
}
.rail button b { font-size: 12px; font-weight: 750; }
.rail button span { color: var(--muted); font-size: 11px; }
.rail.cats button { min-height: 40px !important; border-radius: 999px !important; font-size: 13px; }
.rail .x {
  position: absolute; top: 4px; right: 6px;
  color: var(--danger); font-style: normal; font-weight: 800; font-size: 16px; line-height: 1;
}
button.tiny {
  min-height: 28px !important; padding: 4px 10px !important; font-size: 12px; width: auto;
}
.home { display: grid; gap: 14px; }
#view { gap: 14px; }
.login-card { gap: 14px; }
.mark { font-size: 10px; line-height: 1; color: var(--c1); min-height: 12px; white-space: nowrap; }
.daybars .col { flex: 0 0 36px; }
.daybars { overflow-x: auto; padding-top: 8px; }
.scroll button {
  flex: 0 0 108px;
  border: 1px solid var(--line);
  background: var(--btn);
  color: var(--c1);
  border-radius: 14px;
  min-height: 76px;
}
.list .item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sumline { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.list .item:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.tight { gap: 10px; }
.tight .hero { font-size: 30px; color: var(--c1); }
.goal { gap: 8px; }
.fine { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.fine b { font-size: 12px; }
.goalhead { display: flex; justify-content: space-between; align-items: center; }
.goalhead b { color: var(--c3); font-size: 22px; }
.pie-wrap { position: relative; width: min(210px, 68vw); margin: 8px auto; }
.pie-svg { width: 100%; height: auto; display: block; overflow: visible; }
.slice { cursor: pointer; }
.slice.on { stroke: #fff; stroke-width: 2; }
.pie-tip {
  position: absolute; left: 22%; right: 22%; top: 22%; bottom: 22%;
  display: grid; align-content: center; justify-items: center; text-align: center;
  pointer-events: none; gap: 2px;
}
.pie-tip b { font-size: 13px; line-height: 1.2; }
.pie-tip span { font-size: 16px; font-weight: 780; color: var(--c1); }
.pie-tip small { color: var(--muted); font-size: 12px; }
.pie-row { cursor: pointer; border-radius: 10px; }
.pie-row.on { background: color-mix(in srgb, var(--c1) 12%, transparent); }
.pie-empty { width: min(176px, 52vw); aspect-ratio: 1; margin: 10px auto; border-radius: 50%; border: 16px solid var(--fill); box-sizing: border-box; }
.pie-sweep { animation: pieSweep 1.2s cubic-bezier(.22,.75,.2,1) forwards; }
@keyframes pieSweep { to { stroke-dashoffset: 0; } }
.login-card button { width: 100%; }
.mark { font-size: 10px; line-height: 1.1; color: var(--c1); font-weight: 700; min-height: 12px; text-align: center; }
.loading {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  background: var(--bg); color: var(--muted);
}
.loading p { margin: 0; font-weight: 700; }
.fxgrid, .fxcards { display: contents; }
.fxgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.fxresult b { display: block; font-size: 28px; color: var(--c1); letter-spacing: -0.03em; }
.fxresult span { display: block; margin-top: 4px; font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 128px; width: 100%; max-width: 100%; }
.bars .col {
  border: 0 !important; background: transparent !important; color: var(--muted) !important;
  box-shadow: none !important; padding: 0 !important; min-height: 0; border-radius: 8px !important;
}
.bars .col.on i { outline: 2px solid var(--c1); outline-offset: 2px; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; }
.filters label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; min-width: 0; text-align: center; }
.filters input, .filters select {
  height: 46px; min-height: 46px; text-align: center; text-align-last: center;
  padding: 0 10px !important;
}
.months { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; width: 100%; }
.months label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; min-width: 0; text-align: center; }
.txend { display: flex; align-items: center; gap: 8px; }
.item > div:first-child { min-width: 0; }
.item > div:last-child { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 899px) {
  html, body { height: 100%; overflow: hidden; }
  .shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .top {
    flex: none;
    padding-top: calc(28px + env(safe-area-inset-top));
  }
  #view {
    flex: 1;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    margin-bottom: calc(86px + env(safe-area-inset-bottom));
    padding: 8px 16px 20px;
  }
  .block, label, .months, .filters, .daybars { contain: none; }
  .tabs {
    position: fixed;
    z-index: 8;
    left: max(14px, calc(50% - 201px));
    right: max(14px, calc(50% - 201px));
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: auto;
    margin: 0;
    transform: none;
    border-radius: 22px;
    background: color-mix(in srgb, var(--card) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.2) blur(18px);
    backdrop-filter: saturate(1.2) blur(18px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    pointer-events: auto;
  }
  #view { padding-bottom: 20px; }
  .tabs button { min-width: 0; padding: 6px 2px !important; font-size: 12px; }
  #guideBtn {
    position: fixed;
    top: calc(26px + env(safe-area-inset-top));
    left: 14px;
    right: auto;
    bottom: auto;
    z-index: 9;
  }
  .months, .filters { grid-template-columns: 1fr; }
}
.sum2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sum2 span { font-weight: 700; font-size: 13px; line-height: 1.35; }
select.theme-btn {
  min-height: 52px; border-radius: 16px; font-weight: 750;
  background: color-mix(in srgb, var(--c1) 14%, var(--card));
  color: var(--c1); border: 1px solid color-mix(in srgb, var(--c1) 42%, var(--line));
}
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions button { width: auto; }
.palette label { display: grid; gap: 8px; justify-items: center; width: 48px; margin: 0; }
.palette i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.palette input[type="color"] {
  width: 48px; height: 48px; min-height: 48px; padding: 0; margin: 0;
  border: 1px solid var(--line); border-radius: 14px; background: transparent; cursor: pointer;
}
.palette input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.palette input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 12px; }
.palette input[type="color"]::-moz-color-swatch { border: 0; border-radius: 12px; }
.col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.col i {
  display: block; width: min(100%, 22px); height: calc(var(--h) * 1px);
  max-height: 72px;
  background: linear-gradient(180deg, var(--c2), var(--c1)); border-radius: 7px 7px 3px 3px;
  transform-origin: bottom; animation: grow .55s cubic-bezier(.2,.8,.2,1);
}
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.col .mark { flex: 0 0 14px; height: 14px; font-size: 10px; font-weight: 650; line-height: 14px; color: var(--muted); }
.col span { color: var(--muted); font-size: 10px; }
.daybars { overflow-x: auto; max-width: 100%; min-width: 0; touch-action: pan-x; contain: none; }
.daybars .bars { min-width: 760px; width: max-content; }
.block { animation: none; }
.toast { transition: opacity .2s ease; }
.item { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.neg { color: var(--danger); }
.pos { color: var(--c4); }
canvas { width: 100%; height: 220px; }
.sheet {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(8, 12, 20, 0);
  align-items: end;
  visibility: hidden;
  pointer-events: none;
  transition: background .28s ease, visibility .28s ease;
}
.sheet.open {
  background: rgba(8, 12, 20, 0.46);
  visibility: visible;
  pointer-events: auto;
}
.sheet .panel {
  background: var(--card);
  color: var(--text);
  border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
  max-height: 88dvh;
  overflow: auto;
  transform: translateY(110%);
  transition: transform .36s cubic-bezier(.22,.85,.2,1);
}
.sheet.open .panel { transform: translateY(0); }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-items: center; margin-top: 12px; }
.cmp b { font-size: 13px; }
.cmp span { font-size: 12px; color: var(--muted); }
.cmpbars { display: grid; gap: 3px; }
.cmpbars i { display: block; height: 6px; border-radius: 99px; background: var(--c1); }
.cmpbars i.alt { background: var(--c5); }
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.themes button { text-align: left; border: 1px solid var(--line); background: var(--fill); border-radius: 14px; padding: 12px; min-height: 72px; }
.themes button.on { border-color: var(--c1); color: var(--c1); }
.swatches { display: flex; gap: 4px; margin-top: 6px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.toast {
  position: fixed; left: 50%; bottom: 108px; transform: translateX(-50%);
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 12px; opacity: 0; pointer-events: none;
}
.toast.show { opacity: 1; }
@media (min-width: 900px) {
  .login {
    width: min(440px, calc(100% - 48px));
    margin: 0 auto;
    grid-template-columns: 1fr;
    align-items: center;
  }
  .brand { display: flex; }
  .brand img { width: 112px; height: 112px; margin-bottom: 18px; }
  .tabs {
    top: 0; left: 0; bottom: 0; right: auto;
    width: 156px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 8px;
  }
  .top { padding-left: 18px; }
  #guideBtn {
    position: fixed;
    top: 12px;
    left: 8px;
    width: 140px;
    height: 40px;
    min-height: 40px !important;
    margin: 0;
    border-radius: 14px !important;
    z-index: 10;
  }
  .tabs { padding-top: 60px; }
  #logoutBtn { margin-top: auto; }
  .top, #view { margin-left: 156px; }
  #view { width: auto; padding: 12px 28px 36px; }
  .sheet.open { align-items: center; justify-content: center; }
  .sheet .panel { width: min(520px, 92vw); border-radius: 22px; transform: translateY(18px) scale(.96); }
  .sheet.open .panel { transform: none; }
}
