:root {
  --theme-bg: #0a0d1c;
  --theme-surface: #11152b;
  --theme-surface-elevated: rgb(22 27 54 / .82);
  --theme-border: rgb(236 238 255 / .12);
  --theme-text: #eceeff;
  --theme-text-muted: #8f96bd;
  --color-accent: #818cf8;
  --color-on-accent: #0b0d1a;
  --color-danger: #ff6b7d;
  --color-success: #34d399;
  --color-warning: #f5a623;
  --font-ui-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, -apple-system, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgb(0 0 0 / .22);
  --shadow-md: 0 8px 24px rgb(0 0 0 / .3);
  --shadow-lg: 0 24px 60px rgb(0 0 0 / .42);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-ios: cubic-bezier(.32, .72, 0, 1);
  --tw-safe-t: env(safe-area-inset-top, 0px);
  --tw-safe-b: env(safe-area-inset-bottom, 0px);
  --tw-safe-l: env(safe-area-inset-left, 0px);
  --tw-safe-r: env(safe-area-inset-right, 0px);
  --tw-top: calc(var(--tw-safe-t) + 72px);
  --tw-bottom: calc(var(--tw-safe-b) + 104px);
  --tw-full-w: min(560px, calc(100vw - 20px));
  --z-stage: 0;
  --z-pager: 10;
  --z-tabbar: 100;
  --z-app: 105;
  --z-reader: 200;
  --tw-z-settings: 220;
  --z-sheet: 240;
  --tw-z-island: 300;
  --z-toast: 400;
  --card: color-mix(in srgb, var(--theme-surface) 56%, transparent);
  --card-hi: color-mix(in srgb, var(--theme-surface) 74%, transparent);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--theme-bg);
  color: var(--theme-text);
  font-family: var(--font-ui-family);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body, button, input, select, textarea {
  font-family: var(--font-ui-family);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1, h2, h3, p, ul, ol, figure, blockquote {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.tw-stage {
  position: absolute;
  inset: 0;
  z-index: var(--z-stage);
  background: var(--theme-bg);
  overflow: hidden;
}

.tw-pager {
  position: absolute;
  inset: 0;
  z-index: var(--z-pager);
  touch-action: pan-y;
  overflow: hidden;
}

.tw-screen {
  position: absolute;
  inset: 0;
  transform-origin: 50% 70%;
  will-change: transform, opacity;
  contain: layout style;
}

.tw-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: var(--theme-bg);
  opacity: var(--tw-card-bg, 0);
  box-shadow: 0 30px 70px rgb(0 0 0 / .45), inset 0 0 0 1px var(--theme-border);
}

.tw-screen[data-moving="true"] {
  border-radius: var(--tw-card-r, 0);
  clip-path: inset(0 round var(--tw-card-r, 0));
}

.tw-screen[hidden] {
  display: none;
}

.tw-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: var(--tw-top) max(18px, var(--tw-safe-l)) var(--tw-bottom) max(18px, var(--tw-safe-r));
  scrollbar-width: none;
}

.tw-scroll::-webkit-scrollbar {
  display: none;
}

.tw-col {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.tw-title {
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin-bottom: 6px;
}

.tw-sub {
  color: var(--theme-text-muted);
  font-size: 14px;
  letter-spacing: .01em;
}

.tw-head {
  margin: 4px 4px 22px;
}

.tw-glass {
  background: var(--card);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), var(--shadow-sm);
}

[data-reduced-transparency="true"] .tw-glass {
  background: color-mix(in srgb, var(--theme-surface) 94%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-motion-profile="lite"] .tw-glass {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: color-mix(in srgb, var(--theme-surface) 86%, transparent);
}

[data-theme="light"] .tw-glass {
  box-shadow: inset 0 1px 0 #fff, 0 6px 20px rgb(30 34 80 / .08);
}

.tw-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: color-mix(in srgb, var(--color-accent) 80%, var(--theme-text));
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  white-space: nowrap;
}

.tw-rise {
  animation: tw-rise .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes tw-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(.985);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

[data-reduced-motion="true"] .tw-rise {
  animation: none;
}

.tw-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tw-safe-b) + 108px);
  z-index: var(--z-toast);
  transform: translate3d(-50%, 30px, 0) scale(.94);
  opacity: 0;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-text);
  background: var(--theme-surface-elevated);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid var(--theme-border);
  box-shadow: var(--shadow-md);
  transition: transform .5s var(--ease), opacity .3s ease;
  pointer-events: none;
}

.tw-toast[data-show="true"] {
  transform: translate3d(-50%, 0, 0) scale(1);
  opacity: 1;
}
