/* Shared Jinja shell stylesheet (tracked directly; React bundles are built with frontend/npm run build). */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

:root {
  /* トチサガース ブランドブルー（旧画面 .user-navbar / settings-button--primary の #2366b8 基準） */
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2366b8;
  --brand-700: #1d4f94;
  --brand-800: #1f3f75;
  --brand-900: #1d3a66;
}

input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-600); }

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  background: #f8fafc;
  color: #0f172a;
  font-family: Inter, "Noto Sans JP", "Hiragino Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.min-h-screen { min-height: 100vh; }
.min-h-9 { min-height: 2.25rem; }
.min-h-11 { min-height: 2.75rem; }
.min-h-40 { min-height: 10rem; }
.min-w-5 { min-width: 1.25rem; }
.min-w-11 { min-width: 2.75rem; }
.w-full { width: 100%; }
.w-8 { width: 2rem; }
.w-64 { width: 16rem; }
.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-11 { height: 2.75rem; }
.h-14 { height: 3.5rem; }
.h-full { height: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.page-shell--narrow { max-width: 42rem; }
.page-shell--standard { max-width: 48rem; }
.page-shell--wide { max-width: 64rem; }
.page-shell--extra-wide { max-width: 72rem; }
.max-h-64 { max-height: 16rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-4 { margin-bottom: 1rem; }
.ml-1 { margin-left: 0.25rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-1 { padding: 0.25rem; }
.p-3 { padding: 0.75rem; }
.p-6 { padding: 1.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-16 { padding-bottom: 4rem; }
.pl-9 { padding-left: 2.25rem; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.sticky { position: sticky; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.top-full { top: 100%; }
.right-0 { right: 0; }
.right-4 { right: 1rem; }
.-right-0\.5 { right: -0.125rem; }
.-top-0\.5 { top: -0.125rem; }
.left-1\/2 { left: 50%; }
.left-3 { left: 0.75rem; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-200\/60 { border-color: rgb(226 232 240 / 0.6); }
.border-slate-200\/80 { border-color: rgb(226 232 240 / 0.8); }
.border-brand-600 { border-color: var(--brand-600); }
.border-brand-700 { border-color: var(--brand-700); }
.border-amber-200 { border-color: #fde68a; }
.bg-white { background: #fff; }
.bg-white\/95 { background: rgb(255 255 255 / 0.95); }
.bg-slate-50 { background: #f8fafc; }
.bg-slate-100 { background: #f1f5f9; }
.bg-slate-200 { background: #e2e8f0; }
.bg-brand-50 { background: var(--brand-50); }
.bg-brand-100 { background: #dbeafe; }
.bg-brand-600 { background: var(--brand-600); }
.bg-amber-50 { background: #fffbeb; }
.bg-amber-400 { background: #fbbf24; }
.bg-amber-500 { background: #f59e0b; }
.bg-violet-600 { background: #7c3aed; }
.bg-rose-600 { background: #e11d48; }
.bg-black\/40 { background: rgb(0 0 0 / 0.4); }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.leading-\[2\.75rem\] { line-height: 2.75rem; }
.text-center { text-align: center; }
.text-white { color: #fff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-brand-600 { color: var(--brand-600); }
.text-brand-700 { color: var(--brand-700); }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-amber-900 { color: #78350f; }
.text-rose-600 { color: #e11d48; }
.no-underline { text-decoration: none; }
.antialiased { -webkit-font-smoothing: antialiased; }
.shadow-sm { box-shadow: 0 1px 2px rgb(15 23 42 / 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(15 23 42 / 0.1); }
.backdrop-blur { backdrop-filter: blur(8px); }
.transition { transition: all 0.15s ease; }
.transition-all { transition: all 0.15s ease; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.opacity-95 { opacity: 0.95; }
.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.list-none { list-style: none; }
.divide-y > * + * { border-top: 1px solid #f1f5f9; }
.object-contain { object-fit: contain; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mypage-card {
  border-radius: 1rem;
  border: 1px solid rgb(226 232 240 / 0.6);
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
}
.form-label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 500; color: #334155; }
.form-input {
  min-height: 2.75rem; width: 100%; border-radius: 0.75rem; border: 1px solid #e2e8f0;
  background: #fff; padding: 0.5rem 0.75rem; font-size: 0.875rem;
}
.btn-primary {
  display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center;
  border-radius: 0.75rem; background: var(--brand-600); color: #fff; padding: 0.625rem 1.25rem;
  font-size: 0.875rem; font-weight: 600; border: none; text-decoration: none; cursor: pointer;
}
.btn-primary:hover { background: var(--brand-700); }
a:hover.bg-slate-50, a.hover\:bg-slate-50:hover { background: #f8fafc; }
.hover\:bg-white\/10:hover { background: rgb(255 255 255 / 0.1); }
a.text-brand-600:hover, .hover\:text-brand-600:hover { color: var(--brand-600); }
a.text-slate-500:hover, .hover\:text-brand-600:hover { color: var(--brand-600); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-slate-100:hover { background: #f1f5f9; }
.hover\:opacity-95:hover { opacity: 0.95; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
.disabled\:opacity-50:disabled { opacity: 0.5; }

@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:hidden { display: none; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:flex-row { flex-direction: row; }
  .sm\:flex-wrap { flex-wrap: wrap; }
  .sm\:items-center { align-items: center; }
  .sm\:justify-center { justify-content: center; }
  .sm\:gap-x-4 { column-gap: 1rem; }
  .sm\:gap-y-1 { row-gap: 0.25rem; }
}

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

.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;
}

/* === announcements restyle additions === */
.w-4 { width: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.bg-brand-700 { background: var(--brand-700); }
.bg-rose-50 { background: #fff1f2; }
.text-rose-700 { color: #be123c; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.leading-relaxed { line-height: 1.625; }
.accent-brand-600 { accent-color: var(--brand-600); }

/* Top bar: notification + nickname controls */
.notification-indicator {
  min-height: 2.75rem;
  min-width: 4.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.95);
  color: var(--brand-700);
  padding: 0 0.75rem;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transition: background 0.15s ease, transform 0.15s ease;
}

.notification-indicator:hover {
  background: #fff;
  transform: translateY(-1px);
}

.notification-icon {
  display: inline-flex;
  font-size: 1.05rem;
  line-height: 1;
}

.count-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #facc15;
  color: #111827;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.count-badge.is-muted {
  min-width: 2.1rem;
  background: #eff6ff;
  color: var(--brand-700);
  font-size: 0.7rem;
}

.nav-icon-button {
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.95);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-icon-button:hover {
  background: #fff;
  transform: translateY(-1px);
}

.nav-drawer summary::-webkit-details-marker {
  display: none;
}

.nav-drawer__backdrop {
  position: fixed;
  inset: 0;
  z-index: 490;
  display: none;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
  opacity: 0;
}

.nav-drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 500;
  width: min(22rem, calc(100vw - 1.5rem));
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, var(--brand-50) 0%, #ffffff 9rem);
  color: #0f172a;
  box-shadow: -18px 0 44px rgba(15, 23, 42, 0.22);
  transform: translateX(104%);
  transition: transform 0.24s ease-out;
}

.nav-drawer:not([open]) .nav-drawer__panel {
  display: none;
}

.nav-drawer[open] .nav-drawer__backdrop {
  display: block;
  animation: navDrawerBackdropIn 0.2s ease-out forwards;
}

.nav-drawer[open] .nav-drawer__panel {
  transform: translateX(0);
  animation: navDrawerSlideIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem 0.5rem;
  border-bottom: 1px solid rgb(35 102 184 / 0.12);
}

.nav-drawer__eyebrow {
  color: var(--brand-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav-drawer__title {
  margin-top: 0.15rem;
  color: #0f172a;
  font-size: 1.18rem;
  font-weight: 800;
}

.nav-drawer__subtitle {
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.85rem;
}

.nav-drawer__close {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgb(35 102 184 / 0.18);
  border-radius: 9999px;
  background: #fff;
  color: var(--brand-700);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.nav-drawer__home {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgb(35 102 184 / 0.18);
  border-radius: 9999px;
  background: #fff;
  padding: 0 0.85rem;
  color: var(--brand-700);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-drawer__home:hover {
  background: var(--brand-50);
  transform: translateY(-1px);
}

.nav-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 0.9rem max(1rem, env(safe-area-inset-bottom));
}

.nav-menu-section {
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.nav-menu-section__title {
  margin-bottom: 0.45rem;
  padding: 0 0.25rem;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav-menu-link {
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.8rem;
  padding: 0.55rem 0.65rem;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-menu-link:hover {
  background: var(--brand-50);
  color: var(--brand-700);
  transform: translateX(2px);
}

.nav-menu-link.is-active {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 8px 18px rgb(35 102 184 / 0.22);
}

.nav-menu-link--locked {
  color: #94a3b8;
  cursor: not-allowed;
}

.nav-menu-link__icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: #f1f5f9;
  font-size: 1rem;
}

.nav-menu-link__icon::before {
  content: "";
  width: 1.12rem;
  height: 1.12rem;
  background: currentColor;
  color: var(--brand-600);
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.nav-menu-link.is-active .nav-menu-link__icon {
  background: rgb(255 255 255 / 0.18);
}

.nav-menu-link.is-active .nav-menu-link__icon::before {
  color: #fff;
}

.nav-menu-link--locked .nav-menu-link__icon::before {
  color: #94a3b8;
}

.nav-menu-link__icon[data-icon="box"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="yen"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='m6 3 6 8 6-8'/%3E%3Cpath d='M6 11h12'/%3E%3Cpath d='M6 15h12'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="bell"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.27 21a2 2 0 0 0 3.46 0'/%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="sliders"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21v-7'/%3E%3Cpath d='M4 10V3'/%3E%3Cpath d='M12 21v-9'/%3E%3Cpath d='M12 8V3'/%3E%3Cpath d='M20 21v-5'/%3E%3Cpath d='M20 12V3'/%3E%3Cpath d='M2 14h4'/%3E%3Cpath d='M10 8h4'/%3E%3Cpath d='M18 16h4'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="list"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13'/%3E%3Cpath d='M8 12h13'/%3E%3Cpath d='M8 18h13'/%3E%3Cpath d='M3 6h.01'/%3E%3Cpath d='M3 12h.01'/%3E%3Cpath d='M3 18h.01'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="book"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5z'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="message"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H7l-4 4V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="credit-card"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='14' x='2' y='5' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="logout"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E");
}

.nav-menu-link__icon[data-icon="lock"] {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.nav-menu-link__label {
  flex: 1;
  min-width: 0;
}

.nav-menu-link__chevron {
  color: currentColor;
  font-size: 1.25rem;
  opacity: 0.55;
}

@keyframes navDrawerBackdropIn {
  to {
    opacity: 1;
  }
}

@keyframes navDrawerSlideIn {
  from {
    transform: translateX(104%);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-drawer__panel,
  .nav-menu-link {
    transition: none;
  }
  .nav-drawer[open] .nav-drawer__panel {
    animation: none;
  }
  .nav-drawer[open] .nav-drawer__backdrop {
    animation: none;
    opacity: 1;
  }
}

.user-navbar-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-icon-button {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.user-icon-button:hover {
  background: rgb(255 255 255 / 0.1);
  transform: translateY(-1px);
}

.user-icon-button:focus-visible {
  outline: 3px solid rgb(255 255 255 / 0.35);
  outline-offset: 2px;
}

.user-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9999px;
  border: 1px solid rgb(226 232 240 / 0.9);
  background: #fff;
  color: var(--brand-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  text-transform: uppercase;
}

.nickname-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  /* ナビヘッダー(text-white)内に置かれても入力文字が見えるように色をリセット */
  color: #0f172a;
}

.nickname-modal.active {
  display: flex;
}

.nickname-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.nickname-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), 23rem);
  border-radius: 1rem;
  background: #fff;
  padding: 1.75rem 2rem 2rem;
  box-shadow: 0 24px 48px rgba(13, 54, 106, 0.22);
}

.nickname-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.nickname-modal__title {
  margin-bottom: 0.75rem;
  color: var(--brand-700);
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
}

.nickname-modal__subtitle {
  margin-bottom: 1.25rem;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  white-space: pre-line;
}

.nickname-modal__form label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--brand-700);
  font-size: 0.85rem;
  font-weight: 700;
}

.nickname-modal__form input {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid rgb(35 102 184 / 0.3);
  border-radius: 0.625rem;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  /* Tailwind preflight の color:inherit / background transparent を打ち消す */
  color: #0f172a;
  background-color: #fff;
  caret-color: #0f172a;
}

.nickname-modal__form input:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgb(35 102 184 / 0.15);
  outline: none;
}

.nickname-modal__hint {
  margin-top: 0.375rem;
  color: #64748b;
  font-size: 0.8rem;
}

.nickname-modal__error {
  min-height: 1.25rem;
  margin-top: 0.5rem;
  color: #dc2626;
  font-size: 0.85rem;
}

.nickname-modal__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.nickname-modal__actions button {
  flex: 1;
  min-height: 2.5rem;
  border-radius: 0.625rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.nickname-modal__cancel {
  border: 1px solid rgb(35 102 184 / 0.3);
  background: #fff;
  color: var(--brand-700);
}

.nickname-modal__save {
  border: 0;
  background: var(--brand-600);
  color: #fff;
}

.nickname-modal__save:hover {
  background: var(--brand-700);
}

/* Flask flash messages: React toast と同じ見え方のフローティング通知 */
.flash-toast-stack {
  position: fixed;
  top: 72px;
  left: 50%;
  z-index: 60;
  width: min(calc(100% - 2rem), 28rem);
  transform: translateX(-50%);
  pointer-events: none;
}

.flash-toast {
  display: none;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--brand-600);
  border-radius: 0.75rem;
  background: #fff;
  color: #1e293b;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
  animation: flashToastIn 0.18s ease-out;
}

.flash-toast--error {
  border-left-color: #dc2626;
}

.flash-toast .success-icon {
  color: var(--brand-600);
  font-size: 1rem;
  line-height: 1;
}

.flash-toast .error-icon {
  color: #dc2626;
  font-size: 1rem;
  line-height: 1;
}

.flash-toast--leaving {
  animation: flashToastOut 0.2s ease-in forwards;
}

@keyframes flashToastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flashToastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 768px) {
  .flash-toast-stack {
    top: 64px;
  }
}

/* === auth screens additions（認証系 Jinja 画面用の追加ユーティリティ） === */
.max-w-md { max-width: 28rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }

/* 認証画面のカード（.mypage-card に重ねてブランドブルーの上品なシャドウを付与） */
.auth-card {
  box-shadow: 0 12px 32px rgba(35, 102, 184, 0.12);
}

/* 認証画面ヘッダーは旧UIと同じく左寄せ */
.auth-header-inner {
  justify-content: flex-start;
}

/* 認証画面の背景：淡いブルーのアクセント */
.auth-body {
  background:
    linear-gradient(180deg, var(--brand-50) 0%, #f8fafc 320px);
}

/* Reactマウント前の空白をなくし、フッターだけ先に見えるちらつきを抑える */
.react-root-shell {
  min-height: min(560px, calc(100vh - 180px));
}

.react-root-loader {
  display: none;
  min-height: min(420px, calc(100vh - 220px));
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  color: var(--brand-700);
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
}

.react-root-shell--show-loader .react-root-loader {
  display: flex;
  animation: reactRootLoaderIn 0.18s ease-out forwards;
}

.react-root-shell--mounted {
  min-height: 0;
}

.react-page-enter {
  animation: reactPageEnter 0.22s ease-out both;
}

.react-root-loader__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--brand-200);
  border-top-color: var(--brand-600);
  border-radius: 9999px;
  animation: reactRootSpin 0.75s linear infinite;
}

@keyframes reactRootSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes reactRootLoaderIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reactPageEnter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    /* none でない transform が残ると fixed 子孫の基準が崩れる */
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .react-root-shell--show-loader .react-root-loader,
  .react-page-enter {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
