/* oliver's room — shared styles. Colors come from CSS variables set by js/common.js */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&family=Noto+Sans+KR:wght@400;500;700&display=swap');

:root {
  --bg: #EEF3EC; --surface: #F8FBF6; --line: #D6E0D2; --chip: #B9C9B5; --text: #1E2A21; --sub: #2F3D32;
  --muted: #56645A; --accent: #4A7552; --on-accent: #FFFFFF; --badge-bg: rgba(248,251,246,0.62); --badge-text: #2F3D32;
  --danger: #A3412F; --shadow: 0 14px 30px rgba(40,70,45,0.14);
  --serif: 'Nanum Myeongjo', serif; --sans: 'Noto Sans KR', system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  transition: background 0.4s, color 0.4s, opacity 0.25s ease;
  -webkit-font-smoothing: antialiased;
}
body.leaving { opacity: 0; }
a { color: inherit; }
a:hover { opacity: 0.9; }
button, input, textarea { font-family: inherit; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.sub { color: var(--sub); }
.wrap { max-width: 1360px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.noscrollbar { scrollbar-width: none; }
.noscrollbar::-webkit-scrollbar { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* entrance */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes settleIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.enter-fade { animation: fadeIn 0.6s ease both; }
.enter-rise { animation: riseIn 0.7s var(--ease) both; }
.enter-settle { animation: settleIn 0.8s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  .enter-fade, .enter-rise, .enter-settle { animation: none; }
  * { transition-duration: 0.01s !important; }
}

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; }
.logo { font-family: var(--serif); font-weight: 800; font-size: 28px; letter-spacing: -0.01em; text-decoration: none; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.round-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px;
  background: var(--accent); color: var(--on-accent); border: 0; cursor: pointer; text-decoration: none; transition: background 0.4s, color 0.4s;
}
.search {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 1px solid var(--chip);
  border-radius: 22px; color: var(--muted); transition: border-color 0.4s;
}
.search input { background: transparent; border: 0; outline: none; color: var(--text); font-size: 14px; width: 140px; }

/* mode toggle with sliding pill */
.seg { position: relative; display: inline-flex; padding: 3px; gap: 2px; border-radius: 24px; border: 1px solid var(--chip); transition: border-color 0.4s; }
.seg .pill { position: absolute; z-index: 0; top: 3px; left: 3px; width: 52px; height: 38px; border-radius: 20px; background: var(--accent); transition: transform 0.4s var(--ease), background 0.4s ease; }
.seg button {
  position: relative; z-index: 1; width: 52px; height: 38px; padding: 0; border-radius: 20px; border: 0; background: transparent;
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--sub); transition: color 0.4s ease;
}
.seg button[aria-pressed="true"] { color: var(--on-accent); }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 22px; white-space: nowrap;
  border: 1px solid var(--chip); background: transparent; color: var(--sub); font-size: 14px; cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s, opacity 0.2s;
}
.chip .n { font-size: 12px; opacity: 0.75; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 22px; text-decoration: none;
  border: 1px solid var(--chip); background: transparent; color: var(--text); font-size: 14px; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger-solid { background: var(--danger); color: var(--on-accent); border-color: var(--danger); font-weight: 700; }
.btn:disabled { opacity: 0.5; cursor: default; }

.badge {
  position: absolute; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 10px;
  background: var(--badge-bg); color: var(--badge-text); font-size: 11px; letter-spacing: 0.04em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0.72; transition: opacity 0.4s ease;
}
.badge.icon { width: 22px; height: 22px; padding: 0; justify-content: center; border-radius: 11px; }
.badge.right { right: 10px; }
.badge.left { left: 10px; }
.badge.keep { opacity: 0; }
.tile:hover .badge, .tile:focus-visible .badge { opacity: 1; }

@media (max-width: 720px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .logo { font-size: 22px; }
  .search { display: none; }
}
