.state-screen {
  min-height: 100dvh;
  background: var(--bg);
}

.state-screen.with-nav {
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

.state-bar {
  display: flex;
  min-height: 58px;
  padding: 8px 16px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.state-bar .brand {
  flex: 1;
}

.state-title-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 58px;
  padding: 8px 16px;
  align-items: center;
  gap: 9px;
  background: rgba(8, 9, 10, 0.96);
  border-bottom: 1px solid var(--border);
}

.state-title-bar h1,
.state-title-bar p {
  margin: 0;
}

.state-title-bar h1 {
  font-size: 17px;
  line-height: 1.3;
}

.state-title-bar p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.state-title-copy {
  flex: 1;
  min-width: 0;
}

.state-content {
  display: grid;
  padding: 26px 16px 22px;
  justify-items: center;
}

.state-hero {
  display: grid;
  width: min(100%, 340px);
  justify-items: center;
  text-align: center;
}

.state-symbol {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 10px 0 18px;
  place-items: center;
  color: var(--gold-strong);
  background: #1a170f;
  border: 1px solid var(--gold-dark);
  border-radius: 16px;
}

.state-symbol svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.6;
}

.state-symbol.warn {
  color: var(--warning);
  background: #241e10;
  border-color: #655226;
}

.state-symbol.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #683331;
}

.state-symbol.info {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #2e4d7b;
}

.state-hero h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.state-hero p {
  max-width: 310px;
  margin: 9px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.6;
}

.state-actions {
  display: grid;
  width: min(100%, 320px);
  margin-top: 24px;
  gap: 8px;
}

.state-actions .text-button {
  width: 100%;
}

.state-note {
  display: flex;
  width: min(100%, 340px);
  margin-top: 22px;
  padding: 10px 12px;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 10px;
  line-height: 1.5;
}

.state-note svg {
  width: 16px;
  flex: 0 0 16px;
  color: var(--gold);
}

.skeleton-panel {
  width: min(100%, 358px);
  margin-top: 20px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.skeleton-line,
.skeleton-block {
  background: linear-gradient(90deg, #1b1d1f 20%, #282a2d 40%, #1b1d1f 60%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-line {
  height: 10px;
  margin-bottom: 12px;
}

.skeleton-line.short {
  width: 36%;
}

.skeleton-line.medium {
  width: 64%;
}

.skeleton-block {
  height: 54px;
  margin-top: 15px;
}

@keyframes skeleton-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.state-list {
  width: min(100%, 358px);
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.state-list li {
  display: flex;
  min-height: 50px;
  padding: 10px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-strong);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
}

.state-list li:last-child {
  border-bottom: 0;
}

.state-list strong {
  color: var(--text-soft);
  font-size: 11px;
}

.state-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.state-list .list-copy {
  flex: 1;
  min-width: 0;
}

.state-list .list-copy strong,
.state-list .list-copy small {
  display: block;
}

.state-list .status-dot {
  margin-left: 2px;
}

.retry-button.is-loading {
  color: var(--muted);
  background: var(--surface-raised);
  border-color: var(--border);
}

.retry-button.is-loading svg {
  animation: state-spin 900ms linear infinite;
}

@keyframes state-spin {
  to { transform: rotate(360deg); }
}

.confirm-sheet {
  width: min(100%, 358px);
  margin-top: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.confirm-summary {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.confirm-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.confirm-summary strong {
  font-size: 14px;
}

.confirm-summary small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.confirm-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.confirm-values div {
  min-height: 65px;
  padding: 11px 14px;
  border-right: 1px solid var(--border);
}

.confirm-values div:last-child {
  border-right: 0;
}

.confirm-values span,
.confirm-values strong {
  display: block;
}

.confirm-values span {
  color: var(--muted);
  font-size: 9px;
}

.confirm-values strong {
  margin-top: 6px;
  font-size: 16px;
}

.confirm-warning {
  display: flex;
  margin: 12px 14px;
  padding: 9px 10px;
  align-items: flex-start;
  gap: 8px;
  color: #eed58d;
  background: #241e10;
  border: 1px solid #5e4e25;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.5;
}

.confirm-warning svg {
  width: 16px;
  flex: 0 0 16px;
}

.confirm-actions {
  display: grid;
  padding: 0 14px 14px;
  gap: 8px;
}

.confirm-actions .secondary-button {
  order: 2;
}

.confirm-actions .primary-button {
  order: 1;
}

.session-footnote {
  margin-top: 22px;
  color: var(--muted);
  font-size: 10px;
}
