/* web/css/app.css - Japanese Ink & Paper Aesthetic with Console Ergonomics */
:root {
  --washi-bg: #f5f0e6;
  --washi-card: #ece5d6;
  --sumi-ink: #161514;
  --sumi-faded: #6e675f;
  --hanko-red: #b83324;
  --hanko-dim: rgba(184, 51, 36, 0.12);
  --brush-border: #d4cabb;
  --accent-gold: #c9a85c;
  --font-serif: "Georgia", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100svh;
  width: 100vw;
  background-color: var(--washi-bg);
  background-image:
    radial-gradient(rgba(110, 103, 95, 0.15) 0.5px, transparent 0.5px),
    radial-gradient(rgba(110, 103, 95, 0.1) 0.5px, var(--washi-bg) 0.5px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  color: var(--sumi-ink);
  font-family: var(--font-sans);
  overflow: hidden;
  user-select: none;
}

header {
  position: relative;
  z-index: 50;
  height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.25rem;
  background: var(--washi-card);
  border-bottom: 1px solid var(--brush-border);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--sumi-ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hanko {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--hanko-red);
  color: var(--hanko-red);
  font-family: var(--font-serif);
  font-weight: 900;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.82rem;
  background: var(--hanko-dim);
}

.viewport {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: calc(100svh - 54px - 62px);
  overflow: hidden;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  width: 400%;
  height: 100%;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.carousel-slide {
  width: 25%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem 1.25rem 3rem 1.25rem;
}

.container {
  max-width: 580px;
  margin: 0 auto;
}

.card {
  position: relative;
  z-index: 15;
  background: var(--washi-card);
  border: 1px solid var(--brush-border);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 3px 10px rgba(22, 21, 20, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: var(--accent-gold);
}

.card:active {
  transform: scale(0.98);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: var(--washi-card);
  border-top: 1px solid var(--brush-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 48px;
  color: var(--sumi-faded);
  font-size: 0.72rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  gap: 2px;
  text-decoration: none;
  transition: color 0.15s ease, transform 0.1s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--hanko-red);
}

.nav-link, .brand, .card {
  cursor: pointer;
  user-select: none;
}

.nav-link:active, .brand:active {
  transform: scale(0.95);
  transition: transform 0.05s ease;
}

.dots-bar {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brush-border);
  transition: all 0.2s ease;
}

.dot.active {
  background: var(--hanko-red);
  transform: scale(1.3);
}
