@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500&family=Noto+Serif+JP:wght@300;400;500&family=Inter:wght@300;400;500&display=swap");
:root,
.zen {
  --zen-primary: #3D3D3D;
  --zen-primary-light: #6B6B6B;
  --zen-primary-dark: #1A1A1A;
  --zen-primary-container: #F0EDE8;
  --zen-on-primary: #FFFFFF;
  --zen-on-primary-container: #3D3D3D;
  --zen-accent: #8B4513;
  --zen-accent-light: #C4916C;
  --zen-accent-dark: #5C2D0A;
  --zen-accent-container: #F5EDE5;
  --zen-on-accent: #FFFFFF;
  --zen-on-accent-container: #5C2D0A;
  --zen-secondary: #7A7267;
  --zen-secondary-light: #A89E93;
  --zen-secondary-dark: #4D4740;
  --zen-secondary-container: #F0EDE8;
  --zen-on-secondary: #FFFFFF;
  --zen-on-secondary-container: #4D4740;
  --zen-error: #A0522D;
  --zen-error-container: #F5EDE5;
  --zen-on-error: #FFFFFF;
  --zen-on-error-container: #5C2D0A;
  --zen-success: #5B7A5E;
  --zen-success-container: #E8F0E8;
  --zen-on-success: #FFFFFF;
  --zen-warning: #B8860B;
  --zen-warning-container: #F5F0E0;
  --zen-on-warning: #FFFFFF;
  --zen-info: #4A5568;
  --zen-info-container: #E8ECF0;
  --zen-on-info: #FFFFFF;
  --zen-surface: #FAF8F5;
  --zen-surface-dim: #F0EDE8;
  --zen-surface-paper: #FFFFFF;
  --zen-surface-stone: #F5F2ED;
  --zen-surface-warm: #F8F5F0;
  --zen-surface-elevated: #FFFFFF;
  --zen-on-surface: #2D2B28;
  --zen-on-surface-variant: #6B6560;
  --zen-on-surface-muted: #9A948D;
  --zen-outline: #D4CFC8;
  --zen-outline-variant: #E8E4DE;
  --zen-divider: #EAE6E0;
  --zen-shape-none: 0;
  --zen-shape-xs: 2px;
  --zen-shape-sm: 4px;
  --zen-shape-md: 6px;
  --zen-shape-lg: 8px;
  --zen-shape-xl: 12px;
  --zen-shape-full: 9999px;
  --zen-font-primary: 'Inter', 'Noto Sans JP', 'Hiragino Sans', system-ui, sans-serif;
  --zen-font-display: 'Noto Serif JP', 'Noto Sans JP', Georgia, serif;
  --zen-font-body: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  --zen-font-mono: 'SF Mono', 'Fira Code', monospace;
  --zen-display-large: 300 3rem/1.3 var(--zen-font-display);
  --zen-display-medium: 300 2.25rem/1.35 var(--zen-font-display);
  --zen-display-small: 400 1.75rem/1.4 var(--zen-font-display);
  --zen-headline-large: 400 1.5rem/1.4 var(--zen-font-primary);
  --zen-headline-medium: 400 1.25rem/1.45 var(--zen-font-primary);
  --zen-headline-small: 500 1.125rem/1.45 var(--zen-font-primary);
  --zen-title-large: 500 1.0625rem/1.45 var(--zen-font-primary);
  --zen-title-medium: 500 0.9375rem/1.5 var(--zen-font-primary);
  --zen-title-small: 500 0.8125rem/1.45 var(--zen-font-primary);
  --zen-label-large: 400 0.8125rem/1.45 var(--zen-font-body);
  --zen-label-medium: 400 0.75rem/1.4 var(--zen-font-body);
  --zen-label-small: 400 0.6875rem/1.35 var(--zen-font-body);
  --zen-body-large: 300 1rem/1.7 var(--zen-font-body);
  --zen-body-medium: 300 0.875rem/1.65 var(--zen-font-body);
  --zen-body-small: 300 0.75rem/1.6 var(--zen-font-body);
  --zen-space-xs: 4px;
  --zen-space-sm: 8px;
  --zen-space-md: 16px;
  --zen-space-lg: 24px;
  --zen-space-xl: 40px;
  --zen-space-2xl: 64px;
  --zen-space-3xl: 96px;
  --zen-motion-duration-short: 250ms;
  --zen-motion-duration-medium: 400ms;
  --zen-motion-duration-long: 600ms;
  --zen-motion-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --zen-motion-ease-in: cubic-bezier(0.42, 0, 1, 1);
  --zen-motion-ease-out: cubic-bezier(0, 0, 0.58, 1);
  --zen-motion-ease-gentle: cubic-bezier(0.4, 0, 0.2, 1);
  --zen-elevation-0: none;
  --zen-elevation-1: 0 1px 3px rgba(45, 43, 40, 0.06);
  --zen-elevation-2: 0 2px 8px rgba(45, 43, 40, 0.08);
  --zen-elevation-3: 0 4px 16px rgba(45, 43, 40, 0.08);
  --zen-elevation-4: 0 8px 32px rgba(45, 43, 40, 0.10);
  --zen-state-hover-opacity: 0.04;
  --zen-state-focus-opacity: 0.06;
  --zen-state-pressed-opacity: 0.08;
}

.zen.dark,
.zen[data-theme=dark],
[data-theme=dark] .zen {
  --zen-primary: #D4CFC8;
  --zen-primary-light: #FAF8F5;
  --zen-primary-dark: #A89E93;
  --zen-primary-container: #2D2B28;
  --zen-on-primary: #1A1A1A;
  --zen-on-primary-container: #D4CFC8;
  --zen-accent: #C4916C;
  --zen-accent-container: #3D3028;
  --zen-on-accent: #1A1A1A;
  --zen-on-accent-container: #C4916C;
  --zen-secondary: #A89E93;
  --zen-secondary-container: #3D3A35;
  --zen-on-secondary: #1A1A1A;
  --zen-on-secondary-container: #A89E93;
  --zen-error: #D4836B;
  --zen-error-container: #3D2820;
  --zen-on-error: #1A1A1A;
  --zen-on-error-container: #D4836B;
  --zen-success: #8BAF8E;
  --zen-success-container: #2D352D;
  --zen-warning: #D4A82D;
  --zen-warning-container: #3D3520;
  --zen-info: #8898A8;
  --zen-info-container: #2D3038;
  --zen-surface: #1A1918;
  --zen-surface-dim: #141312;
  --zen-surface-paper: #201F1E;
  --zen-surface-stone: #252423;
  --zen-surface-warm: #1E1D1C;
  --zen-surface-elevated: #2D2B28;
  --zen-on-surface: #E8E4DE;
  --zen-on-surface-variant: #A89E93;
  --zen-on-surface-muted: #7A7267;
  --zen-outline: #4D4740;
  --zen-outline-variant: #3D3A35;
  --zen-divider: #3D3A35;
  --zen-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.20);
  --zen-elevation-2: 0 2px 8px rgba(0, 0, 0, 0.25);
  --zen-elevation-3: 0 4px 16px rgba(0, 0, 0, 0.25);
  --zen-elevation-4: 0 8px 32px rgba(0, 0, 0, 0.30);
}

.zen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font: var(--zen-label-large);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--zen-motion-duration-short) var(--zen-motion-ease), color var(--zen-motion-duration-short) var(--zen-motion-ease), border-color var(--zen-motion-duration-short) var(--zen-motion-ease), box-shadow var(--zen-motion-duration-short) var(--zen-motion-ease);
  border-radius: var(--zen-shape-xs);
  height: 44px;
  padding: 0 28px;
}
.zen-btn:focus-visible {
  outline: 1px solid var(--zen-primary);
  outline-offset: 3px;
}
.zen-btn .zen-btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.zen-btn:disabled, .zen-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.zen-btn--filled,
.zen-btn {
  background: var(--zen-primary);
  color: var(--zen-on-primary);
}
.zen-btn--filled:hover,
.zen-btn:hover {
  background: var(--zen-primary-light);
}
.zen-btn--filled:active,
.zen-btn:active {
  background: var(--zen-primary-dark);
}

.zen-btn--outlined {
  background: transparent;
  color: var(--zen-primary);
  border: 1px solid var(--zen-outline);
}
.zen-btn--outlined:hover {
  background: var(--zen-surface-stone);
  border-color: var(--zen-primary);
}
.zen-btn--outlined:active {
  background: var(--zen-surface-dim);
}

.zen-btn--text {
  background: transparent;
  color: var(--zen-primary);
  padding: 0 16px;
}
.zen-btn--text:hover {
  background: rgba(61, 61, 61, var(--zen-state-hover-opacity));
}
.zen-btn--text:active {
  background: rgba(61, 61, 61, var(--zen-state-pressed-opacity));
}

.zen-btn--ghost {
  background: transparent;
  color: var(--zen-on-surface-variant);
  padding: 0 12px;
  letter-spacing: 0.06em;
  font: var(--zen-label-medium);
  text-transform: uppercase;
  position: relative;
}
.zen-btn--ghost::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--zen-motion-duration-medium) var(--zen-motion-ease);
}
.zen-btn--ghost:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.zen-btn--ghost:hover {
  color: var(--zen-primary);
}

.zen-btn--accent {
  background: var(--zen-accent);
  color: var(--zen-on-accent);
}
.zen-btn--accent:hover {
  background: var(--zen-accent-light);
}
.zen-btn--accent:active {
  background: var(--zen-accent-dark);
}

.zen-btn--danger {
  background: var(--zen-error);
  color: var(--zen-on-error);
}
.zen-btn--danger:hover {
  opacity: 0.85;
}

.zen-btn--sm {
  height: 36px;
  padding: 0 20px;
  font: var(--zen-label-small);
  letter-spacing: 0.05em;
}
.zen-btn--sm .zen-btn__icon {
  width: 14px;
  height: 14px;
}

.zen-btn--lg {
  height: 52px;
  padding: 0 36px;
  font: var(--zen-label-large);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
}
.zen-btn--lg .zen-btn__icon {
  width: 18px;
  height: 18px;
}

.zen-btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--zen-shape-sm);
}
.zen-btn--icon.zen-btn--sm {
  width: 36px;
  height: 36px;
}
.zen-btn--icon.zen-btn--lg {
  width: 52px;
  height: 52px;
}

.zen-btn--full {
  width: 100%;
}

.zen-btn--loading {
  pointer-events: none;
}
.zen-btn--loading .zen-btn__label {
  visibility: hidden;
}
.zen-btn--loading::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: zen-spin 0.8s linear infinite;
}

@keyframes zen-spin {
  to {
    transform: rotate(360deg);
  }
}
.zen-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--zen-shape-sm);
  transition: box-shadow var(--zen-motion-duration-medium) var(--zen-motion-ease), transform var(--zen-motion-duration-medium) var(--zen-motion-ease);
}

.zen-card--paper,
.zen-card {
  background: var(--zen-surface-paper);
  color: var(--zen-on-surface);
  box-shadow: var(--zen-elevation-1);
}

.zen-card--outlined {
  background: var(--zen-surface-paper);
  color: var(--zen-on-surface);
  border: 1px solid var(--zen-outline-variant);
  box-shadow: none;
}

.zen-card--flat {
  background: var(--zen-surface-stone);
  color: var(--zen-on-surface);
  box-shadow: none;
}

.zen-card--interactive {
  cursor: pointer;
}
.zen-card--interactive:hover {
  box-shadow: var(--zen-elevation-2);
  transform: translateY(-1px);
}
.zen-card--interactive:active {
  transform: translateY(0);
  box-shadow: var(--zen-elevation-1);
}
.zen-card--interactive:focus-visible {
  outline: 1px solid var(--zen-primary);
  outline-offset: 2px;
}

.zen-card__media {
  position: relative;
  overflow: hidden;
}
.zen-card__media img,
.zen-card__media video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.zen-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 0;
}

.zen-card__header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.zen-card__title {
  font: var(--zen-title-medium);
  color: var(--zen-on-surface);
  margin: 0;
}

.zen-card__subtitle {
  font: var(--zen-body-small);
  color: var(--zen-on-surface-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

.zen-card__body {
  padding: 16px 24px 24px;
  font: var(--zen-body-medium);
  color: var(--zen-on-surface-variant);
}

.zen-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 24px;
}

.zen-card__actions--end {
  justify-content: flex-end;
}

.zen-card--accent {
  border-top: 2px solid var(--zen-accent);
}

.zen-card--accent-primary {
  border-top: 2px solid var(--zen-primary);
}

.zen-card--horizontal {
  flex-direction: row;
}
.zen-card--horizontal .zen-card__media {
  flex-shrink: 0;
  width: 140px;
}
.zen-card--horizontal .zen-card__media img {
  height: 100%;
  object-fit: cover;
}
.zen-card--horizontal .zen-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.zen-card--empty {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--zen-space-2xl) var(--zen-space-xl);
  min-height: 200px;
  border: 1px dashed var(--zen-outline);
  background: transparent;
  box-shadow: none;
}
.zen-card--empty .zen-card__title {
  font: var(--zen-headline-medium);
  color: var(--zen-on-surface-muted);
  font-weight: 300;
}
.zen-card--empty .zen-card__body {
  color: var(--zen-on-surface-muted);
  padding: 8px 0 0;
}

.zen-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.zen-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  font: var(--zen-body-large);
  color: var(--zen-on-surface);
  background: transparent;
  transition: border-color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-input input,
.zen-input textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 0;
  width: 100%;
}
.zen-input input::placeholder,
.zen-input textarea::placeholder {
  color: var(--zen-on-surface-muted);
  opacity: 1;
  font-weight: 300;
}
.zen-input textarea {
  min-height: 100px;
  resize: vertical;
  padding-top: 8px;
}

.zen-input--underline {
  border-bottom: 1px solid var(--zen-outline);
  padding: 0;
}
.zen-input--underline:hover {
  border-bottom-color: var(--zen-on-surface-variant);
}
.zen-input--underline:focus-within {
  border-bottom-color: var(--zen-primary);
  border-bottom-width: 2px;
  padding-bottom: 0;
}

.zen-input--outlined {
  border: 1px solid var(--zen-outline);
  border-radius: var(--zen-shape-xs);
  padding: 0 16px;
}
.zen-input--outlined:hover {
  border-color: var(--zen-on-surface-variant);
}
.zen-input--outlined:focus-within {
  border-color: var(--zen-primary);
}

.zen-input--filled {
  background: var(--zen-surface-stone);
  border: none;
  border-bottom: 1px solid var(--zen-outline);
  border-radius: var(--zen-shape-xs) var(--zen-shape-xs) 0 0;
  padding: 0 16px;
}
.zen-input--filled:hover {
  border-bottom-color: var(--zen-on-surface-variant);
}
.zen-input--filled:focus-within {
  border-bottom-color: var(--zen-primary);
  border-bottom-width: 2px;
}

.zen-field__label {
  font: var(--zen-label-medium);
  color: var(--zen-on-surface-variant);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zen-field:focus-within .zen-field__label {
  color: var(--zen-primary);
}

.zen-input__label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font: var(--zen-body-large);
  color: var(--zen-on-surface-muted);
  pointer-events: none;
  transition: all var(--zen-motion-duration-short) var(--zen-motion-ease);
  transform-origin: left top;
}

.zen-input--outlined .zen-input__label {
  left: 16px;
  background: var(--zen-surface-paper);
  padding: 0 4px;
}

.zen-input--underline:focus-within .zen-input__label, .zen-input--underline.zen-input--has-value .zen-input__label {
  top: 0;
  transform: translateY(-100%) scale(0.75);
  color: var(--zen-primary);
}

.zen-input--outlined:focus-within .zen-input__label, .zen-input--outlined.zen-input--has-value .zen-input__label {
  top: 0;
  transform: translateY(-50%) scale(0.75);
  color: var(--zen-primary);
}

.zen-input__leading,
.zen-input__trailing {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--zen-on-surface-muted);
}

.zen-input__trailing {
  cursor: pointer;
}
.zen-input__trailing:hover {
  color: var(--zen-on-surface);
}

.zen-field__supporting {
  font: var(--zen-body-small);
  color: var(--zen-on-surface-muted);
}

.zen-field__counter {
  font: var(--zen-body-small);
  color: var(--zen-on-surface-muted);
  text-align: right;
}

.zen-field--error .zen-input--underline {
  border-bottom-color: var(--zen-error);
}
.zen-field--error .zen-input--underline:focus-within {
  border-bottom-color: var(--zen-error);
}
.zen-field--error .zen-input--outlined {
  border-color: var(--zen-error);
}
.zen-field--error .zen-input--outlined:focus-within {
  border-color: var(--zen-error);
}
.zen-field--error .zen-field__label,
.zen-field--error .zen-input__label {
  color: var(--zen-error) !important;
}
.zen-field--error .zen-field__supporting {
  color: var(--zen-error);
}

.zen-field--disabled {
  opacity: 0.3;
  pointer-events: none;
}

.zen-input--sm {
  min-height: 40px;
  font: var(--zen-body-medium);
}

.zen-input--lg {
  min-height: 56px;
  font: var(--zen-body-large);
  font-size: 1.125rem;
}

.zen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: var(--zen-label-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  border-radius: var(--zen-shape-xs);
  padding: 2px 8px;
  min-height: 20px;
  vertical-align: middle;
}

.zen-badge--filled,
.zen-badge {
  background: var(--zen-primary);
  color: var(--zen-on-primary);
}

.zen-badge--tonal {
  background: var(--zen-surface-dim);
  color: var(--zen-on-surface);
}

.zen-badge--outlined {
  background: transparent;
  color: var(--zen-on-surface-variant);
  border: 1px solid var(--zen-outline);
}

.zen-badge--secondary {
  background: var(--zen-secondary);
  color: var(--zen-on-secondary);
}
.zen-badge--secondary.zen-badge--tonal {
  background: var(--zen-secondary-container);
  color: var(--zen-on-secondary-container);
}

.zen-badge--accent {
  background: var(--zen-accent);
  color: var(--zen-on-accent);
}
.zen-badge--accent.zen-badge--tonal {
  background: var(--zen-accent-container);
  color: var(--zen-on-accent-container);
}

.zen-badge--error {
  background: var(--zen-error);
  color: var(--zen-on-error);
}
.zen-badge--error.zen-badge--tonal {
  background: var(--zen-error-container);
  color: var(--zen-on-error-container);
}

.zen-badge--success {
  background: var(--zen-success);
  color: var(--zen-on-success);
}
.zen-badge--success.zen-badge--tonal {
  background: var(--zen-success-container);
  color: var(--zen-on-surface);
}

.zen-badge--warning {
  background: var(--zen-warning);
  color: var(--zen-on-warning);
}
.zen-badge--warning.zen-badge--tonal {
  background: var(--zen-warning-container);
  color: var(--zen-on-surface);
}

.zen-badge--sm {
  font-size: 0.5625rem;
  padding: 1px 6px;
  min-height: 16px;
}

.zen-badge--lg {
  font: var(--zen-label-medium);
  letter-spacing: 0.04em;
  padding: 4px 12px;
  min-height: 26px;
}

.zen-badge--dot {
  width: 6px;
  height: 6px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--zen-accent);
}

.zen-badge__icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.zen-badge__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 2px;
  margin-right: -4px;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  transition: opacity var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-badge__remove:hover {
  opacity: 1;
}

.zen-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
  background: var(--zen-surface-dim);
  color: var(--zen-on-surface-variant);
  font: var(--zen-title-medium);
  font-weight: 300;
  letter-spacing: 0.04em;
  border-radius: var(--zen-shape-sm);
  width: 40px;
  height: 40px;
}

.zen-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.zen-avatar__initials {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.zen-avatar__icon {
  width: 20px;
  height: 20px;
}

.zen-avatar--xs {
  width: 24px;
  height: 24px;
  font: var(--zen-label-small);
}
.zen-avatar--xs .zen-avatar__icon {
  width: 14px;
  height: 14px;
}

.zen-avatar--sm {
  width: 32px;
  height: 32px;
  font: var(--zen-label-medium);
}
.zen-avatar--sm .zen-avatar__icon {
  width: 16px;
  height: 16px;
}

.zen-avatar--lg {
  width: 56px;
  height: 56px;
  font: var(--zen-headline-medium);
  font-weight: 300;
}
.zen-avatar--lg .zen-avatar__icon {
  width: 24px;
  height: 24px;
}

.zen-avatar--xl {
  width: 80px;
  height: 80px;
  font: var(--zen-display-small);
  font-weight: 300;
}
.zen-avatar--xl .zen-avatar__icon {
  width: 32px;
  height: 32px;
}

.zen-avatar--circle {
  border-radius: var(--zen-shape-full);
}

.zen-avatar--square {
  border-radius: var(--zen-shape-xs);
}

.zen-avatar--stone {
  background: var(--zen-surface-stone);
  color: var(--zen-on-surface-variant);
}

.zen-avatar--ink {
  background: var(--zen-primary);
  color: var(--zen-on-primary);
}

.zen-avatar--accent {
  background: var(--zen-accent-container);
  color: var(--zen-on-accent-container);
}

.zen-avatar__status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--zen-surface-paper);
}
.zen-avatar__status--online {
  background: var(--zen-success);
}
.zen-avatar__status--offline {
  background: var(--zen-outline);
}
.zen-avatar__status--busy {
  background: var(--zen-error);
}
.zen-avatar__status--away {
  background: var(--zen-warning);
}

.zen-avatar--xs .zen-avatar__status,
.zen-avatar--sm .zen-avatar__status {
  width: 8px;
  height: 8px;
  border-width: 1.5px;
}

.zen-avatar--lg .zen-avatar__status,
.zen-avatar--xl .zen-avatar__status {
  width: 14px;
  height: 14px;
  border-width: 2.5px;
}

.zen-avatar-group {
  display: flex;
  align-items: center;
}
.zen-avatar-group .zen-avatar {
  border: 2px solid var(--zen-surface-paper);
  margin-left: -6px;
}
.zen-avatar-group .zen-avatar:first-child {
  margin-left: 0;
}

.zen-avatar-group__overflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--zen-shape-sm);
  background: var(--zen-surface-dim);
  color: var(--zen-on-surface-muted);
  font: var(--zen-label-medium);
  border: 2px solid var(--zen-surface-paper);
  margin-left: -6px;
}

.zen-alert {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--zen-shape-sm);
  font: var(--zen-body-medium);
  color: var(--zen-on-surface);
  border-left: 2px solid transparent;
  transition: opacity var(--zen-motion-duration-medium) var(--zen-motion-ease);
}

.zen-alert__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.zen-alert__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.zen-alert__title {
  font: var(--zen-title-small);
  margin: 0;
}

.zen-alert__body {
  font: var(--zen-body-medium);
  margin: 0;
  color: var(--zen-on-surface-variant);
}

.zen-alert__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.zen-alert__dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.4;
  cursor: pointer;
  border-radius: var(--zen-shape-sm);
  padding: 0;
  margin: -4px -4px -4px 0;
  transition: opacity var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-alert__dismiss:hover {
  opacity: 0.8;
}

.zen-alert--info,
.zen-alert {
  background: var(--zen-info-container);
  border-left-color: var(--zen-info);
}
.zen-alert--info .zen-alert__icon,
.zen-alert .zen-alert__icon {
  color: var(--zen-info);
}
.zen-alert--info .zen-alert__title,
.zen-alert .zen-alert__title {
  color: var(--zen-info);
}

.zen-alert--success {
  background: var(--zen-success-container);
  border-left-color: var(--zen-success);
}
.zen-alert--success .zen-alert__icon {
  color: var(--zen-success);
}
.zen-alert--success .zen-alert__title {
  color: var(--zen-success);
}

.zen-alert--warning {
  background: var(--zen-warning-container);
  border-left-color: var(--zen-warning);
}
.zen-alert--warning .zen-alert__icon {
  color: var(--zen-warning);
}
.zen-alert--warning .zen-alert__title {
  color: var(--zen-warning);
}

.zen-alert--error {
  background: var(--zen-error-container);
  border-left-color: var(--zen-error);
}
.zen-alert--error .zen-alert__icon {
  color: var(--zen-error);
}
.zen-alert--error .zen-alert__title {
  color: var(--zen-error);
}

.zen-alert--outlined {
  background: transparent;
  border: 1px solid var(--zen-outline-variant);
  border-left-width: 2px;
}
.zen-alert--outlined.zen-alert--info {
  border-left-color: var(--zen-info);
}
.zen-alert--outlined.zen-alert--success {
  border-left-color: var(--zen-success);
}
.zen-alert--outlined.zen-alert--warning {
  border-left-color: var(--zen-warning);
}
.zen-alert--outlined.zen-alert--error {
  border-left-color: var(--zen-error);
}

.zen-alert--enter {
  animation: zen-alert-enter var(--zen-motion-duration-medium) var(--zen-motion-ease);
}

.zen-alert--exit {
  animation: zen-alert-exit var(--zen-motion-duration-medium) var(--zen-motion-ease) forwards;
}

@keyframes zen-alert-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes zen-alert-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.zen-appbar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 8px;
  background: var(--zen-surface);
  color: var(--zen-on-surface);
  border-bottom: 1px solid var(--zen-divider);
  z-index: 10;
  transition: background-color var(--zen-motion-duration-short) var(--zen-motion-ease);
}

.zen-appbar--sm,
.zen-appbar {
  height: 56px;
}

.zen-appbar--md {
  height: 96px;
  flex-wrap: wrap;
  align-content: space-between;
  padding-bottom: 16px;
}
.zen-appbar--md .zen-appbar__title {
  order: 1;
  width: 100%;
  padding: 0 12px;
  font: var(--zen-headline-medium);
  font-weight: 300;
}

.zen-appbar--lg {
  height: 128px;
  flex-wrap: wrap;
  align-content: space-between;
  padding-bottom: 20px;
  border-bottom: none;
}
.zen-appbar--lg .zen-appbar__title {
  order: 1;
  width: 100%;
  padding: 0 12px;
  font: var(--zen-display-small);
  font-weight: 300;
}

.zen-appbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--zen-on-surface);
  cursor: pointer;
  border-radius: var(--zen-shape-sm);
  padding: 0;
  transition: background-color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-appbar__nav:hover {
  background: rgba(45, 43, 40, var(--zen-state-hover-opacity));
}
.zen-appbar__nav svg {
  width: 20px;
  height: 20px;
}

.zen-appbar__title {
  flex: 1;
  font: var(--zen-title-large);
  color: var(--zen-on-surface);
  margin: 0;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.zen-appbar__actions {
  display: flex;
  align-items: center;
  gap: 0;
}

.zen-appbar__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--zen-on-surface-variant);
  cursor: pointer;
  border-radius: var(--zen-shape-sm);
  padding: 0;
  transition: background-color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-appbar__action:hover {
  background: rgba(45, 43, 40, var(--zen-state-hover-opacity));
}
.zen-appbar__action svg {
  width: 20px;
  height: 20px;
}

.zen-appbar--transparent {
  background: transparent;
  border-bottom: none;
}

.zen-appbar--elevated {
  background: var(--zen-surface-paper);
  box-shadow: var(--zen-elevation-1);
  border-bottom: none;
}

.zen-navrail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  min-height: 100%;
  padding: 16px 0;
  gap: 4px;
  background: var(--zen-surface);
  border-right: 1px solid var(--zen-divider);
  flex-shrink: 0;
}

.zen-navrail__header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
}

.zen-navrail__items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.zen-navrail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  width: 56px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: var(--zen-on-surface-muted);
  transition: color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-navrail__item:hover {
  color: var(--zen-on-surface);
}

.zen-navrail__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  border-radius: var(--zen-shape-sm);
  transition: background-color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-navrail__icon svg {
  width: 20px;
  height: 20px;
}

.zen-navrail__label {
  font: var(--zen-label-small);
  text-align: center;
  letter-spacing: 0.02em;
}

.zen-navrail__item--active {
  color: var(--zen-on-surface);
}
.zen-navrail__item--active .zen-navrail__icon {
  background: var(--zen-surface-dim);
  color: var(--zen-primary);
}
.zen-navrail__item--active .zen-navrail__label {
  font-weight: 500;
}

.zen-navrail__item:hover .zen-navrail__icon {
  background: rgba(45, 43, 40, var(--zen-state-hover-opacity));
}

.zen-navrail__item--active:hover .zen-navrail__icon {
  background: var(--zen-surface-dim);
}

.zen-sidebar {
  display: flex;
  flex-direction: column;
  width: 280px;
  min-height: 100%;
  padding: 16px 12px;
  gap: 2px;
  background: var(--zen-surface);
  border-right: 1px solid var(--zen-divider);
  flex-shrink: 0;
  overflow-y: auto;
}

.zen-sidebar__header {
  padding: 12px;
  font: var(--zen-label-medium);
  color: var(--zen-on-surface-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zen-sidebar__section-title {
  font: var(--zen-label-medium);
  color: var(--zen-on-surface-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 20px 12px 8px;
}

.zen-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: var(--zen-on-surface-variant);
  font: var(--zen-label-large);
  border-radius: var(--zen-shape-sm);
  transition: background-color var(--zen-motion-duration-short) var(--zen-motion-ease), color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-sidebar__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
}
.zen-sidebar__item:hover {
  background: rgba(45, 43, 40, var(--zen-state-hover-opacity));
  color: var(--zen-on-surface);
}

.zen-sidebar__item--active {
  background: var(--zen-surface-dim);
  color: var(--zen-on-surface);
}
.zen-sidebar__item--active svg {
  opacity: 1;
}
.zen-sidebar__item--active:hover {
  background: var(--zen-surface-dim);
}

.zen-sidebar__badge {
  margin-left: auto;
  font: var(--zen-label-small);
  color: var(--zen-on-surface-muted);
}

.zen-bottomnav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  height: 64px;
  background: var(--zen-surface);
  border-top: 1px solid var(--zen-divider);
  padding: 8px 0;
}

.zen-bottomnav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: var(--zen-on-surface-muted);
  padding: 0;
}

.zen-bottomnav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 28px;
  border-radius: var(--zen-shape-sm);
}
.zen-bottomnav__icon svg {
  width: 20px;
  height: 20px;
}

.zen-bottomnav__label {
  font: var(--zen-label-small);
}

.zen-bottomnav__item--active {
  color: var(--zen-on-surface);
}
.zen-bottomnav__item--active .zen-bottomnav__icon {
  background: var(--zen-surface-dim);
  color: var(--zen-primary);
}
.zen-bottomnav__item--active .zen-bottomnav__label {
  font-weight: 500;
}

.zen-tabs {
  display: flex;
  width: 100%;
  border-bottom: 1px solid var(--zen-divider);
  position: relative;
}

.zen-tabs--scrollable {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.zen-tabs--scrollable::-webkit-scrollbar {
  display: none;
}

.zen-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 80px;
  height: 44px;
  padding: 0 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--zen-on-surface-muted);
  font: var(--zen-label-large);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  transition: color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-tab:hover {
  color: var(--zen-on-surface);
}
.zen-tab::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--zen-primary);
  transform: scaleX(0);
  transition: transform var(--zen-motion-duration-medium) var(--zen-motion-ease);
}
.zen-tab svg {
  width: 18px;
  height: 18px;
}

.zen-tab--active {
  color: var(--zen-on-surface);
}
.zen-tab--active::after {
  transform: scaleX(1);
}

.zen-tabs--icon-label .zen-tab {
  height: 56px;
  gap: 4px;
}

.zen-tabs--secondary .zen-tab::after {
  left: 0;
  right: 0;
}

.zen-tabs--scrollable .zen-tab {
  flex: none;
  min-width: auto;
}

.zen-tab__badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  background: var(--zen-accent);
  color: var(--zen-on-accent);
  font: var(--zen-label-small);
  font-size: 0.5625rem;
  border-radius: var(--zen-shape-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.zen-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--zen-outline);
  border-radius: var(--zen-shape-xs);
  background: transparent;
  color: var(--zen-on-surface);
  font: var(--zen-label-medium);
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: background-color var(--zen-motion-duration-short) var(--zen-motion-ease), border-color var(--zen-motion-duration-short) var(--zen-motion-ease), color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-chip:hover {
  background: rgba(45, 43, 40, var(--zen-state-hover-opacity));
  border-color: var(--zen-on-surface-variant);
}
.zen-chip:focus-visible {
  outline: 1px solid var(--zen-primary);
  outline-offset: 2px;
}
.zen-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.zen-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.zen-chip__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: -4px;
  border: none;
  background: transparent;
  color: var(--zen-on-surface-muted);
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
}
.zen-chip__remove:hover {
  color: var(--zen-on-surface);
}
.zen-chip__remove svg {
  width: 14px;
  height: 14px;
}

.zen-chip--selected {
  background: var(--zen-primary);
  border-color: var(--zen-primary);
  color: var(--zen-on-primary);
}
.zen-chip--selected:hover {
  background: var(--zen-primary-light);
  border-color: var(--zen-primary-light);
}

.zen-chip--tonal.zen-chip--selected {
  background: var(--zen-surface-dim);
  border-color: var(--zen-outline-variant);
  color: var(--zen-on-surface);
}

.zen-chip--assist {
  border-color: var(--zen-outline-variant);
}

.zen-chip--filter.zen-chip--selected {
  padding-left: 8px;
}

.zen-chip__check {
  width: 14px;
  height: 14px;
  display: none;
}

.zen-chip--selected .zen-chip__check {
  display: flex;
}

.zen-chip:disabled,
.zen-chip[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.zen-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zen-chip-group--scrollable {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.zen-chip-group--scrollable::-webkit-scrollbar {
  display: none;
}

.zen-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 43, 40, 0.25);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--zen-motion-duration-medium) var(--zen-motion-ease), visibility var(--zen-motion-duration-medium);
}
.zen-modal-backdrop.zen-modal-backdrop--open {
  opacity: 1;
  visibility: visible;
}

.zen-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(520px, 100vw - 48px);
  max-height: calc(100vh - 48px);
  background: var(--zen-surface-paper);
  color: var(--zen-on-surface);
  border-radius: var(--zen-shape-md);
  box-shadow: var(--zen-elevation-4);
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  transition: transform var(--zen-motion-duration-medium) var(--zen-motion-ease-gentle), opacity var(--zen-motion-duration-medium) var(--zen-motion-ease);
}
.zen-modal-backdrop--open .zen-modal {
  transform: translateY(0);
  opacity: 1;
}

.zen-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 28px 0;
  gap: 16px;
}

.zen-modal__title {
  font: var(--zen-headline-medium);
  font-weight: 300;
  color: var(--zen-on-surface);
  margin: 0;
}

.zen-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--zen-on-surface-muted);
  cursor: pointer;
  border-radius: var(--zen-shape-sm);
  padding: 0;
  margin: -4px -4px -4px 0;
  flex-shrink: 0;
  transition: color var(--zen-motion-duration-short) var(--zen-motion-ease), background-color var(--zen-motion-duration-short) var(--zen-motion-ease);
}
.zen-modal__close:hover {
  color: var(--zen-on-surface);
  background: rgba(45, 43, 40, var(--zen-state-hover-opacity));
}
.zen-modal__close svg {
  width: 18px;
  height: 18px;
}

.zen-modal__body {
  padding: 20px 28px 28px;
  font: var(--zen-body-medium);
  color: var(--zen-on-surface-variant);
  overflow-y: auto;
  flex: 1;
}

.zen-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 28px 28px;
}

.zen-modal__divider {
  height: 1px;
  background: var(--zen-divider);
  margin: 0;
  border: none;
}

.zen-modal--fullscreen {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}
.zen-modal--fullscreen .zen-modal__header {
  height: 56px;
  padding: 0 12px 0 8px;
  border-bottom: 1px solid var(--zen-divider);
}
.zen-modal--fullscreen .zen-modal__title {
  font: var(--zen-title-large);
  flex: 1;
  padding-left: 8px;
}
.zen-modal--fullscreen .zen-modal__body {
  padding: 28px;
}

.zen-modal-backdrop--bottom {
  align-items: flex-end;
}

.zen-modal--bottom-sheet {
  width: 100%;
  max-width: 600px;
  max-height: 75vh;
  border-radius: var(--zen-shape-lg) var(--zen-shape-lg) 0 0;
  transform: translateY(100%);
}
.zen-modal-backdrop--open .zen-modal--bottom-sheet {
  transform: translateY(0);
}

.zen-modal__handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 0;
}
.zen-modal__handle::before {
  content: "";
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--zen-outline);
}

.zen-modal--compact {
  width: min(400px, 100vw - 48px);
}
.zen-modal--compact .zen-modal__header {
  padding: 24px 24px 0;
}
.zen-modal--compact .zen-modal__body {
  padding: 16px 24px 24px;
}
.zen-modal--compact .zen-modal__footer {
  padding: 0 24px 24px;
}
