:root {
  --paper: #ece5d8;
  --paper-2: #e0d6c3;
  --ink: #211a15;
  --ink-soft: #6b5f55;
  --study: #56622b;
  --mood: #c2452d;
  --hi: #f2c230;
  --fs: 1;
  --peek: calc(52px + env(safe-area-inset-bottom));
  --half: 50dvh;
  --full: calc(100dvh - 118px - env(safe-area-inset-top));
}

/* 글씨 크기 (설정에서 고름, 이 기기에 저장) */
html[data-fs="s"] { --fs: .9; }
html[data-fs="l"] { --fs: 1.12; }
html[data-fs="xl"] { --fs: 1.25; }

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
[hidden] { display: none !important; }

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font: calc(15px * var(--fs))/1.4 'IBM Plex Sans KR', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* 상단 */
.top {
  position: relative;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 13px) 14px 10px 17px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.logo {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  font: 400 31px/.85 'Black Han Sans', sans-serif;
  letter-spacing: -1.5px;
}
.logo span {
  padding: 2px 5px 3px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  letter-spacing: -.5px;
  transform: rotate(-4deg) translate(-3px, -3px);
}
.top-r { display: flex; align-items: flex-end; gap: 11px; }
.logo a { display: flex; align-items: flex-end; gap: inherit; color: inherit; text-decoration: none; }
.logo a:active { transform: translate(1px, 1px); }
.me {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 33px;
  padding: 0 7px;
  border: 1.5px dashed var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}
.me.in { border-style: solid; background: var(--paper-2); }
.me .mk { width: 25px; height: 25px; }
.mode {
  display: flex;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1.5deg);
}
.mode button { padding: 6px 11px 7px; font-weight: 700; font-size: 14px; }
.mode button.on { background: var(--ink); color: var(--paper); }

