/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Serif+JP:wght@400;500;600;700&family=IBM+Plex+Mono:wght@300;400;500&display=swap');

*, ::before, ::after{
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop{
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: var(--font-body); /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

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

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: var(--font-mono); /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.visible{
  visibility: visible;
}
.fixed{
  position: fixed;
}
.absolute{
  position: absolute;
}
.relative{
  position: relative;
}
.sticky{
  position: sticky;
}
.block{
  display: block;
}
.inline-block{
  display: inline-block;
}
.flex{
  display: flex;
}
.inline-flex{
  display: inline-flex;
}
.table{
  display: table;
}
.grid{
  display: grid;
}
.hidden{
  display: none;
}
.transform{
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.rounded{
  border-radius: 0.25rem;
}
.border{
  border-width: 1px;
}
.bg-white{
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}
.text-sm{
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-xs{
  font-size: 0.75rem;
  line-height: 1rem;
}
.uppercase{
  text-transform: uppercase;
}
.italic{
  font-style: italic;
}
.text-brand-text{
  color: var(--ink-900);
}
.antialiased{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.outline{
  outline-style: solid;
}
.filter{
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition{
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.ease-in-out{
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

:root {
  /* Base */
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-sunken: #f4f5f9;
  --bg-soft: #f8f9fc;
  --bg-panel: #fafbfd;
  --surface-line: #e5e7ee;
  --surface-line-strong: #c6cad6;

  --ink-900: #0e1021;
  --ink-800: #1c1f34;
  --ink-700: #353847;
  --ink-600: #555968;
  --ink-500: #787c8a;
  --ink-400: #9da1ae;
  --ink-300: #c6cad6;

  /* KEY */
  --key-50:  #f4f4ff;
  --key-100: #e8e8ff;
  --key-200: #d1d1ff;
  --key-300: #a5a5fe;
  --key-400: #8383fd;
  --key:     #6464FD;
  --key-600: #4b4be0;
  --key-700: #3838b6;
  --key-800: #2a2a8a;
  --key-900: #1e1e66;
  --key-deep: var(--key-700);
  --key-soft: var(--key-100);
  --key-tint: var(--key-50);
  --key-faint: #fafafe;

  /* Coral */
  --coral-50:  #fff5ef;
  --coral-100: #ffe3d2;
  --coral-200: #ffc6a5;
  --coral-400: #fdae85;
  --coral:     #FD9464;
  --coral-600: #e57647;
  --coral-700: #b85a34;

  /* Sky */
  --sky-50:  #eefaff;
  --sky-100: #d4f2ff;
  --sky-200: #a8e3ff;
  --sky-400: #87d5fd;
  --sky:     #64C8FD;
  --sky-600: #3ea3dc;
  --sky-700: #2b7ba8;

  /* Violet */
  --violet-50:  #f6f1ff;
  --violet-100: #eadfff;
  --violet-200: #d4beff;
  --violet-400: #b08bfe;
  --violet:     #9664FD;
  --violet-600: #764bdd;
  --violet-700: #5837a8;

  /* Mint */
  --mint-50:  #effef8;
  --mint-100: #d1fbea;
  --mint-200: #a6f3d4;
  --mint-400: #7ee9bc;
  --mint:     #64FDC8;
  --mint-600: #2fc99b;
  --mint-700: #1f9878;

  /* Semantic */
  --c-pos: var(--mint-700);
  --c-pos-soft: var(--mint-100);
  --c-pos-tint: var(--mint-50);
  --c-neg: #E5484D;
  --c-neg-soft: #fde3e4;
  --c-neg-tint: #fef5f5;
  --c-warn: var(--coral-700);
  --c-warn-soft: var(--coral-100);
  --c-info: var(--sky-700);
  --c-info-soft: var(--sky-100);
  --c-neu: var(--ink-500);
  --c-neu-soft: #eceef3;

  /* Chart palette */
  --c-1: var(--key);
  --c-2: var(--violet);
  --c-3: var(--sky);
  --c-4: var(--coral);
  --c-5: var(--mint-600);
  --c-6: #F5B544;
  --c-7: var(--key-800);

  /* Chart aliases */
  --rose: var(--key);
  --rose-deep: var(--key-700);
  --rose-soft: var(--key-100);
  --rose-tint: var(--key-50);
  --champagne: var(--coral);
  --champagne-soft: var(--coral-100);
  --gold: #F5B544;
  --gold-soft: #fdf0d6;
  --c-blue: var(--sky);
  --c-purple: var(--violet);
  --c-cyan: var(--sky-600);
  --c-orange: var(--coral);
  --c-pink: var(--violet-400);
  --c-green: var(--mint-600);

  /* VoC categories */
  --cat-product:  var(--key);
  --cat-pain:     var(--coral);
  --cat-motive:   var(--violet);
  --cat-benefit:  var(--mint-600);
  --cat-scene:    var(--sky);
  --cat-emotion:  #E86BA0;

  /* Fonts */
  --font-display: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-serif: "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Shadows */
  --shadow-xs: 0 1px 0 rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);

  /* Radii */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  /* Motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-out-quint: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --dur-micro: 120ms;
  --dur-fast: 180ms;
  --dur-base: 280ms;
  --dur-slow: 420ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}
button, input, select { font-family: inherit; }
a { color: var(--key); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: 0.005em; }

.num-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-display { font-family: var(--font-display); font-weight: 700; }
.text-mono { font-family: var(--font-mono); }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--ink-700); } /* #353847 on white ≈ 6.8:1, WCAG AA */

.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-23 { grid-template-columns: 2fr 1fr; }
.g-3 { grid-template-columns: 1fr 1fr 1fr; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-5 { grid-template-columns: repeat(5, 1fr); }
.g-6 { grid-template-columns: repeat(6, 1fr); }

/* Layout */
.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
@media (min-width: 1025px) {
  .app { min-width: 1440px; }
}
.topbar { flex-wrap: nowrap; }
.topbar > * { flex-shrink: 0; }
.main { min-width: 0; background: var(--bg); }
.content { padding: 24px 28px 60px; max-width: 1600px; }

/* Sidebar */
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--surface-line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 18px;
  border-bottom: 1px solid var(--surface-line);
  margin-bottom: 12px;
}
.sidebar-brand .mark {
  width: 28px; height: 28px;
  background: var(--key);
  border-radius: 4px;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px;
  font-family: var(--font-display);
}
.sidebar-brand .mark::before { content: "R"; }
.sidebar-brand .wordmark {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  color: var(--ink-900);
  letter-spacing: 0.01em;
}
.sidebar-brand .subtitle {
  font-size: 9px;
  color: var(--ink-500);
  letter-spacing: 0.14em;
  font-family: var(--font-mono);
  margin-top: 2px;
}
.sidebar-section {
  font-size: 10px;
  color: var(--ink-500);
  letter-spacing: 0.14em;
  padding: 16px 10px 6px;
  font-weight: 600;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink-700);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-left-color var(--dur-fast) var(--ease-out),
              padding-left var(--dur-fast) var(--ease-out);
}
.nav-item:hover { background: var(--bg-sunken); text-decoration: none; padding-left: 14px; }
.nav-item.active {
  background: var(--key-tint);
  color: var(--key-deep);
  font-weight: 600;
  border-left-color: var(--key);
}
.nav-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.nav-item.disabled:hover { padding-left: 10px; background: transparent; }
.nav-item .new-pill {
  margin-left: auto;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--key);
  color: #fff;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--surface-line);
  position: sticky; top: 0; z-index: 10;
}
.topbar-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap;
}
.topbar-sub {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-500);
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}
.topbar-spacer { flex: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  color: var(--ink-700);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.pill:hover { border-color: var(--surface-line-strong); color: var(--ink-900); background: var(--bg-sunken); }
.pill.active { background: var(--key-tint); border-color: var(--key); color: var(--key-deep); }
.pill.primary { background: var(--key); border-color: var(--key); color: #fff; }
.pill.primary:hover { background: var(--key-deep); color: #fff; }
.pill.ghost { background: transparent; }

/* Page head */
.breadcrumb {
  font-size: 11px;
  color: var(--ink-500);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 500;
}
.breadcrumb .sep { margin: 0 6px; color: var(--ink-400); }
.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: 0;
}
.page-sub {
  font-size: 13px;
  color: var(--ink-600);
  margin-top: 4px;
}

/* Rules */
.rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 10px;
}
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--surface-line);
}
.rule-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-600);
  font-weight: 600;
  text-transform: uppercase;
}

/* Card */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-sm);
  padding: 16px;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.card-lg { padding: 20px; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: 0;
}
.card-sub {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* KPI card */
.kpi {
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.kpi:hover { transform: translateY(-1px); }
.kpi-spark { position: absolute; right: 10px; top: 10px; opacity: 0.9; }
.kpi-label {
  font-size: 11px;
  color: var(--ink-600);
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-unit {
  font-size: 13px;
  color: var(--ink-500);
  margin-left: 4px;
  font-weight: 500;
}
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.kpi-delta.up { color: var(--c-pos); }
.kpi-delta.down { color: var(--c-neg); }
.kpi-foot {
  font-size: 10px;
  color: var(--ink-500);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 3px;
  background: var(--bg-sunken);
  color: var(--ink-700);
  border: 1px solid var(--surface-line);
  line-height: 1.6;
  transition: transform var(--dur-micro) var(--ease-out),
              background var(--dur-micro) var(--ease-out);
}
.badge.new { background: var(--coral); color: #fff; border-color: var(--coral); }
.badge.live { background: var(--c-pos-soft); color: var(--c-pos); border-color: var(--mint-200); }
.badge.gold { background: #fef3d6; color: #a56a14; border-color: #f5d98a; }
.badge.rose, .badge.key { background: var(--key-tint); color: var(--key-deep); border-color: var(--key-soft); }
.badge.pos { background: var(--c-pos-soft); color: var(--c-pos); border-color: var(--mint-200); }
.badge.neg { background: var(--c-neg-soft); color: var(--c-neg); border-color: #f2bfc1; }
.badge.neu { background: var(--c-neu-soft); color: var(--c-neu); border-color: var(--surface-line-strong); }
.badge.info { background: var(--c-info-soft); color: var(--c-info); border-color: var(--sky-200); }
.badge.warn { background: var(--c-warn-soft); color: var(--c-warn); border-color: var(--coral-200); }
.badge.violet { background: var(--violet-100); color: var(--violet-700); border-color: var(--violet-200); }

.badge.cat-product { background: var(--key-100); color: var(--key-700); border-color: var(--key-200); }
.badge.cat-pain, .badge.cat-painpoint { background: var(--coral-100); color: var(--coral-700); border-color: var(--coral-200); }
.badge.cat-motive, .badge.cat-purchasemotivation, .badge.cat-purchase_motivation { background: var(--violet-100); color: var(--violet-700); border-color: var(--violet-200); }
.badge.cat-benefit { background: var(--mint-100); color: var(--mint-700); border-color: var(--mint-200); }
.badge.cat-scene, .badge.cat-usagescene, .badge.cat-usage_scene { background: var(--sky-100); color: var(--sky-700); border-color: var(--sky-200); }
.badge.cat-emotion { background: #fce3ee; color: #a43172; border-color: #f2c4d8; }

/* Chip — alias for generic rounded pill */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  background: var(--bg-sunken);
  color: var(--ink-700);
  border: 1px solid var(--surface-line);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-micro) var(--ease-soft),
              border-color var(--dur-micro) var(--ease-soft),
              color var(--dur-micro) var(--ease-soft),
              transform 80ms var(--ease-soft),
              box-shadow var(--dur-micro) var(--ease-soft);
}
.btn:hover { border-color: var(--surface-line-strong); background: var(--bg-sunken); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--key); border-color: var(--key); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--key-deep); border-color: var(--key-deep); box-shadow: 0 4px 12px -6px rgba(100, 100, 253, 0.5); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-sunken); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 11px; }

/* Segmented */
.seg {
  display: inline-flex;
  background: var(--bg-sunken);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-sm);
  padding: 2px;
}
.seg button {
  background: none;
  border: none;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  color: var(--ink-600);
  font-family: inherit;
  white-space: nowrap;
  font-weight: 500;
}
.seg button.on {
  background: var(--bg-elev);
  color: var(--key-deep);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--surface-line);
  margin-bottom: 16px;
}
.tab {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink-600);
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.tab.active { color: var(--key-deep); border-bottom-color: var(--key); font-weight: 700; }
.tab:hover:not(.active) { color: var(--ink-800); }

/* Tables */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-600);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--surface-line-strong);
  text-transform: uppercase;
  background: var(--bg-sunken);
}
.tbl tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--surface-line);
  color: var(--ink-800);
  vertical-align: middle;
}
.tbl tbody tr { transition: background var(--dur-micro) var(--ease-soft); }
.tbl tbody tr:hover { background: var(--key-faint); }
.tbl .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl .rank { text-align: center; font-family: var(--font-mono); color: var(--ink-500); width: 40px; }

/* User cell */
.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--violet-100);
  color: var(--violet-700);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  border: 1px solid var(--violet-200);
  font-family: var(--font-display);
}
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.xl { width: 72px; height: 72px; font-size: 26px; }
.user-cell .name { font-weight: 600; color: var(--ink-900); font-size: 13px; }
.user-cell .uid { font-size: 10px; color: var(--ink-500); font-family: var(--font-mono); }

/* Post card */
.postcard {
  border: 1px solid var(--surface-line);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-bottom: 10px;
  background: var(--bg-elev);
  transition: transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.postcard:hover {
  transform: translateY(-1px);
  border-color: var(--key-300);
  box-shadow: 0 4px 14px -8px rgba(100, 100, 253, 0.25);
}
.postcard-head { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.postcard .body {
  font-size: 13px;
  color: var(--ink-800);
  line-height: 1.6;
  margin-bottom: 10px;
}
.postcard .foot {
  display: flex; gap: 14px;
  font-size: 12px; color: var(--ink-700);
  font-family: var(--font-mono);
}
.postcard .foot span { display: inline-flex; align-items: center; gap: 4px; }

/* AI hint */
.ai-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--key-deep);
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}
.ai-hint .sparkle { color: var(--key); }

/* Sentiment bar */
.senti-bar { display: flex; height: 8px; border-radius: 2px; overflow: hidden; background: var(--bg-sunken); }
.senti-bar .p { background: var(--c-pos); }
.senti-bar .u { background: var(--c-neu); }
.senti-bar .n { background: var(--c-neg); }

/* Horizontal bar */
.bar-h { display: flex; align-items: center; gap: 10px; }
.bar-h .track {
  flex: 1; height: 6px; background: var(--bg-sunken);
  border-radius: 2px; overflow: hidden;
}
.bar-h .fill { height: 100%; background: var(--key); border-radius: 2px; }
.bar-h .value { font-family: var(--font-mono); font-size: 11px; color: var(--ink-600); min-width: 44px; text-align: right; }

/* Stage stepper */
.stage-stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; position: relative; }
.stage-stepper::before {
  content: ""; position: absolute; top: 15px; left: 10%; right: 10%; height: 2px;
  background: var(--surface-line); z-index: 0;
}
.stage-stepper .step {
  display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 1;
}
.stage-stepper .step .dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-elev);
  border: 2px solid var(--surface-line-strong);
  color: var(--ink-500);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
}
.stage-stepper .step.done .dot { background: var(--key); border-color: var(--key); color: #fff; }
.stage-stepper .step.current .dot { background: #fff; border-color: var(--key); color: var(--key); box-shadow: 0 0 0 3px var(--key-soft); }
.stage-stepper .step .label { font-size: 11px; color: var(--ink-700); font-weight: 500; text-align: center; }
.stage-stepper .step.done .label, .stage-stepper .step.current .label { color: var(--ink-900); font-weight: 700; }
.stage-stepper .step .date { font-size: 10px; color: var(--ink-500); font-family: var(--font-mono); }

/* Timeline */
.tl-day {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
  padding: 14px 0 6px;
  border-bottom: 1px solid var(--surface-line);
  margin: 14px 0 8px;
  letter-spacing: 0;
}
.tl-day .weekday { color: var(--ink-500); margin-left: 8px; font-size: 11px; font-weight: 500; }
.tl-row { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 5px 0; }
.tl-time {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); padding-top: 10px;
  font-variant-numeric: tabular-nums;
}
.tl-card-wrap { position: relative; padding-left: 26px; }
.tl-card-wrap::before {
  content: ""; position: absolute; left: 9px; top: -5px; bottom: -5px; width: 1px; background: var(--surface-line);
}
.tl-dot {
  position: absolute; left: 0; top: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-elev);
  border: 1.5px solid var(--surface-line-strong);
  display: grid; place-items: center; z-index: 1;
}
.tl-card {
  background: var(--bg-elev);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 12px;
}
.tl-card.milestone {
  background: var(--key-tint);
  border-color: var(--key-soft);
}
.tl-card-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 11px; margin-bottom: 3px; letter-spacing: 0.04em; }
.tl-card .title { font-weight: 700; color: var(--ink-900); font-size: 13px; }
.tl-card .body { color: var(--ink-700); font-size: 12px; line-height: 1.5; }
.tl-card .foot { display: flex; gap: 12px; margin-top: 6px; font-size: 10px; color: var(--ink-500); font-family: var(--font-mono); }
.tl-card .foot span { display: inline-flex; align-items: center; gap: 3px; }

/* Switch / checkbox */
.switch {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 11px; color: var(--ink-700);
}
.switch .slot {
  width: 28px; height: 16px;
  background: var(--ink-300);
  border-radius: 8px;
  position: relative;
  transition: background 100ms;
}
.switch .slot::after {
  content: ""; position: absolute;
  width: 12px; height: 12px;
  background: #fff; border-radius: 50%;
  top: 2px; left: 2px;
  transition: left 100ms;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.switch.on .slot { background: var(--key); }
.switch.on .slot::after { left: 14px; }

.checkbox { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 11px; color: var(--ink-700); -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.checkbox .box {
  width: 14px; height: 14px;
  border: 1.5px solid var(--surface-line-strong);
  border-radius: 2px;
  background: #fff;
  display: inline-block;
  position: relative;
}
.checkbox.on .box {
  background: var(--key); border-color: var(--key);
}
.checkbox.on .box::after {
  content: "✓"; color: #fff; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; line-height: 1;
}

/* Chart helpers */
.chart-wrap { position: relative; width: 100%; }
.chart-legend {
  display: flex; gap: 14px; margin-top: 10px;
  font-size: 11px; color: var(--ink-600);
  flex-wrap: wrap;
}
.chart-legend .dot {
  width: 10px; height: 10px; border-radius: 2px;
  display: inline-block; margin-right: 6px;
  vertical-align: middle;
}

/* Image placeholder */
.img-placeholder {
  background: repeating-linear-gradient(45deg, var(--bg-sunken), var(--bg-sunken) 8px, var(--bg-soft) 8px, var(--bg-soft) 16px);
  border: 1px dashed var(--surface-line-strong);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--ink-500);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Overlay / sidepanel */
.overlay {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.45);
  z-index: 200;
  display: flex; justify-content: flex-end;
}
.sidepanel {
  width: 540px;
  background: var(--bg-elev);
  height: 100vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}

/* Utilities */
.w-full { width: 100%; }
.scroll-x { overflow-x: auto; }
.nowrap { white-space: nowrap; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F0F1F5; }
::-webkit-scrollbar-thumb { background: #CDD0D8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== MOBILE ===== */
.icon-btn { display: none; }
.sidebar-scrim { display: none; }
.topbar.mobile { display: none; }
.topbar-sheet { display: none; }

@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; min-width: 0; }

  .sidebar.mobile {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 86vw;
    height: 100vh;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(.2,.8,.2,1);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
  }
  .sidebar.mobile.open { transform: translateX(0); }
  .sidebar-scrim {
    display: block;
    position: fixed; inset: 0;
    background: rgba(15, 18, 32, 0.45);
    z-index: 299;
    animation: scrim-in 160ms ease-out;
  }
  @keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }

  .topbar:not(.mobile) { display: none; }
  .topbar.mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--surface-line);
    position: sticky; top: 0; z-index: 20;
  }
  .icon-btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    background: var(--bg-elev);
    border: 1px solid var(--surface-line);
    color: var(--ink-800);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
  }
  .icon-btn:hover { background: var(--bg-sunken); }
  .icon-btn.active { background: var(--key-tint); border-color: var(--key); color: var(--key-deep); }

  .topbar-sheet {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--surface-line);
    position: sticky; top: 58px; z-index: 19;
    box-shadow: var(--shadow-sm);
  }
  .topbar-sheet-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--ink-700);
  }
  .topbar-sheet-row > label {
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-500);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    width: 40px;
    flex-shrink: 0;
  }
  .topbar-sheet-row .seg.wrap { flex-wrap: wrap; }

  .content { padding: 14px 14px 40px; max-width: 100%; }

  .page-title { font-size: 20px; }
  .page-sub { font-size: 12px; }

  .grid { gap: 12px; }
  .g-2 { grid-template-columns: 1fr; }
  .g-23 { grid-template-columns: 1fr; }
  .g-3 { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-5 { grid-template-columns: repeat(2, 1fr); }
  .g-6 { grid-template-columns: repeat(3, 1fr); }

  .kpi { padding: 12px 14px; }
  .kpi-value { font-size: 22px; }
  .kpi-label { font-size: 10px; }
  .kpi-spark { transform: scale(0.75); transform-origin: top right; }

  .card { padding: 14px; }
  .card-lg { padding: 16px; }
  .card-title { font-size: 14px; }

  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
  .tbl { min-width: 600px; }
  .tbl thead th, .tbl tbody td { padding: 8px 10px; font-size: 12px; }

  .tbl-cards { display: block; min-width: 0; }
  .tbl-cards thead { display: none; }
  .tbl-cards tbody, .tbl-cards tr { display: block; }
  .tbl-cards tr {
    border: 1px solid var(--surface-line);
    border-radius: var(--r-sm);
    padding: 12px;
    margin-bottom: 10px;
    background: var(--bg-elev);
  }
  .tbl-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 0 !important;
    border-bottom: 1px dashed var(--surface-line) !important;
    font-size: 12px;
  }
  .tbl-cards td:last-child { border-bottom: 0 !important; }
  .tbl-cards td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
  }
  .tbl-cards td[data-label="USER"], .tbl-cards td.full-row { justify-content: flex-start; flex-direction: column; align-items: stretch; }
  .tbl-cards td[data-label="USER"]::before, .tbl-cards td.full-row::before { display: none; }

  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .tab { flex-shrink: 0; padding: 10px 12px; font-size: 12px; }

  .seg { flex-wrap: wrap; }

  .sidepanel { width: 100vw; max-width: 100vw; }

  .avatar.xl { width: 56px; height: 56px; font-size: 20px; }

  .stage-stepper .step .label { font-size: 10px; }
  .stage-stepper .step .date { font-size: 9px; }

  .tl-row { grid-template-columns: 48px 1fr; gap: 8px; }
}

@media (max-width: 640px) {
  .g-4, .g-5 { grid-template-columns: 1fr 1fr; }
  .g-6 { grid-template-columns: 1fr 1fr; }
  .content { padding: 12px 12px 32px; }
  .page-title { font-size: 18px; }
  .kpi-value { font-size: 20px; }

  .postcard { padding: 12px; }

  .topbar.mobile .topbar-title { font-size: 13px; }

  .stage-stepper .step .label { display: none; }
}

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes refa-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes refa-rise-sm {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes refa-pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(100, 100, 253, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(100, 100, 253, 0); }
}
@keyframes refa-sheet-in {
  from { transform: translateX(100%); }
  to   { transform: none; }
}

.page-enter {
  animation: refa-rise-sm var(--dur-base) var(--ease-out-quint) both;
}
.postsheet-root {
  animation: refa-sheet-in var(--dur-base) var(--ease-out-quint) both;
}
.fav-star-on {
  animation: refa-pulse-soft 1.4s var(--ease-out-quint) 1;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(100, 100, 253, 0.35);
  outline-offset: 1px;
  transition: outline-color var(--dur-micro) var(--ease-out);
}

.btn:focus-visible,
.tab:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
button:focus-visible {
  outline: 2px solid var(--key);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

