/* =========================================
   BuddyPlanner v2 — Base & Reset
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css');

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--text-100);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }

button {
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: inherit; color: inherit;
  outline: none; -webkit-tap-highlight-color: transparent;
}

input, select, textarea {
  font-family: inherit; font-size: inherit; color: inherit;
  border: none; outline: none; background: none;
  -webkit-appearance: none; appearance: none;
}

ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ── App Shell ── */
#app {
  position: relative;
  width: 100%;
  max-width: var(--app-w);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-app);
  overflow: hidden;
}

/* Desktop frame */
@media (min-width: 431px) {
  body {
    background: #e2e8f0;
    background-image:
      var(--grad-bg-radial),
      var(--grad-bg-radial-gold);
  }
  #app {
    box-shadow: 0 0 80px rgba(0,0,0,0.1), inset 0 0 0 1px var(--border-subtle);
  }
}

/* ── Screen System ── */
.screen { display:none; flex-direction:column; min-height:100vh; min-height:100dvh; }
.screen.active { display:flex; animation: screenIn var(--dur-slow) var(--ease-out); }

.screen-scroll {
  flex:1; overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + var(--sp-4));
}

/* ── Keyframes ── */
@keyframes screenIn {
  from { opacity:0; transform:translateY(6px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes slideUp {
  from { opacity:0; transform:translateY(20px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; }
  to { opacity:1; }
}
@keyframes scaleIn {
  from { opacity:0; transform:scale(0.95); }
  to { opacity:1; transform:scale(1); }
}
@keyframes pulse {
  0%,100% { opacity:1; }
  50% { opacity:0.4; }
}
@keyframes float {
  0%,100% { transform:translateY(0); }
  50% { transform:translateY(-6px); }
}
@keyframes glow {
  0%,100% { box-shadow: 0 0 10px rgba(34,201,135,0.2); }
  50% { box-shadow: 0 0 24px rgba(34,201,135,0.45); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes dotBounce {
  0%,80%,100% { transform:scale(0); }
  40% { transform:scale(1); }
}
@keyframes rippleEffect {
  to { transform: scale(4); opacity:0; }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Utilities ── */
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

::-webkit-scrollbar { width:3px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: var(--r-full); }
::selection { background: rgba(34,201,135,0.25); color: var(--text-100); }
