:root {
  --ink: #263231;
  --ink-2: #364442;
  --muted: #6c7774;
  --line: #d8ddd8;
  --line-strong: #b8c2bd;
  --paper: #eef1ef;
  --paper-2: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #f7f8f7;
  --sage: #5e7b68;
  --blue: #3e668c;
  --clay: #9a6b4f;
  --gold: #a28649;
  --danger: #a65353;
  --warning: #a0713e;
  --success: #4f7d5c;
  --shadow: 0 18px 42px rgba(38, 50, 49, 0.12);
  --soft-shadow: 0 8px 24px rgba(38, 50, 49, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Lato, "Aptos", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
label,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100svh;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.75fr);
  min-height: 100svh;
  background:
    linear-gradient(135deg, rgba(94, 123, 104, 0.14), rgba(62, 102, 140, 0.08)),
    var(--paper);
}

.login-brand {
  display: grid;
  align-content: space-between;
  gap: 36px;
  min-height: 100%;
  min-width: 0;
  padding: clamp(28px, 5vw, 72px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-lockup img {
  width: 180px;
  height: auto;
}

.prototype-mark {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.login-copy {
  width: 100%;
  max-width: 720px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sage);
  font-size: 13px;
  font-weight: 700;
}

.login-copy h1,
.screen-title h1,
.project-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.04;
  overflow-wrap: break-word;
}

.login-copy p,
.screen-title p,
.project-title p {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--muted);
}

.login-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 820px;
}

.login-stat {
  min-height: 104px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(184, 194, 189, 0.78);
  border-radius: var(--radius);
}

.login-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 500;
}

.login-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-panel-wrap {
  display: grid;
  align-items: center;
  min-width: 0;
  padding: clamp(20px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.62);
  border-left: 1px solid rgba(184, 194, 189, 0.8);
}

.login-panel {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-panel h2,
.panel h2,
.stage-detail h2,
.ai-output h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 500;
}

.field-stack {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span,
.field label,
.small-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 11px;
}

.field textarea,
.textarea {
  min-height: 92px;
  resize: vertical;
}

.login-roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.role-chip,
.filter-chip,
.stage-chip,
.nav-tab,
.tool-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.role-chip.active,
.filter-chip.active,
.stage-chip.active,
.nav-tab.active,
.tool-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.primary-button,
.secondary-button,
.quiet-button,
.danger-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.primary-button {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--soft-shadow);
}

.primary-button:hover,
.secondary-button:hover,
.quiet-button:hover,
.danger-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.quiet-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
}

.danger-button {
  background: rgba(166, 83, 83, 0.1);
  border: 1px solid rgba(166, 83, 83, 0.35);
  color: var(--danger);
}

.icon-button {
  width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row.spaced {
  margin-top: 10px;
}

.button-row.section-actions {
  margin-top: 16px;
}

.login-footnote {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.main-layout {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  background: var(--paper);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.sidebar .brand-lockup {
  display: grid;
  gap: 10px;
}

.sidebar .brand-lockup img {
  width: 170px;
}

.sidebar-title {
  color: var(--muted);
  font-size: 13px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-tab {
  justify-content: flex-start;
  border-radius: 6px;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.route-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.route-card strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.content {
  min-width: 0;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -24px -24px 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 241, 239, 0.92);
  backdrop-filter: blur(14px);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
}

.mobile-brand img {
  width: 126px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.language-select,
.country-select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 7px 10px;
}

.screen-title,
.project-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.title-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.screen-title h1,
.project-title h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card,
.panel,
.project-card,
.stage-card,
.stage-detail,
.ai-output,
.upload-tile,
.comment-item,
.activity-item,
.approval-item,
.queue-item,
.guide-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.summary-card {
  min-height: 104px;
  padding: 15px;
}

.summary-card span,
.project-meta,
.stage-meta,
.muted {
  color: var(--muted);
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
  box-shadow: 0 1px 0 rgba(38, 50, 49, 0.03);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.project-list {
  display: grid;
  gap: 12px;
}

.project-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--soft-shadow);
}

.create-layout,
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.create-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wide-field {
  grid-column: 1 / -1;
}

.guide-steps {
  display: grid;
  gap: 10px;
}

.guide-steps.compact {
  gap: 8px;
}

.guide-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
}

.guide-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}

.guide-step strong {
  display: block;
  font-weight: 650;
}

.guide-step p {
  margin: 4px 0 0;
  color: var(--muted);
}

.talking-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-list .secondary-button {
  justify-content: flex-start;
}

.project-visual {
  min-height: 132px;
  border-radius: 6px;
  border: 1px solid rgba(38, 50, 49, 0.12);
  overflow: hidden;
  background-color: #ccd8d2;
}

.visual-1 {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(38, 50, 49, 0.05)),
    repeating-linear-gradient(45deg, #c9d5ce 0 10px, #819d8b 10px 18px, #f6f4ef 18px 23px);
}

.visual-2 {
  background-image:
    linear-gradient(180deg, rgba(38, 50, 49, 0.08), rgba(255, 255, 255, 0.22)),
    repeating-linear-gradient(90deg, #c5ccd0 0 12px, #3e668c 12px 16px, #eef1ef 16px 28px);
}

.visual-3 {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(38, 50, 49, 0.05)),
    repeating-linear-gradient(-35deg, #d8c7b8 0 14px, #9a6b4f 14px 20px, #eef1ef 20px 28px);
}

.visual-4 {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(38, 50, 49, 0.08)),
    repeating-radial-gradient(circle at 20% 20%, #dfe5e2 0 5px, #5e7b68 5px 8px, #f8f8f5 8px 16px);
}

.visual-5 {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(38, 50, 49, 0.07)),
    repeating-linear-gradient(0deg, #ddd9cf 0 8px, #a28649 8px 12px, #eef1ef 12px 24px);
}

.project-body {
  min-width: 0;
}

.project-topline,
.stage-topline,
.comment-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-body h3,
.stage-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.status-pill,
.risk-pill,
.approval-pill,
.file-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.status-approved,
.status-complete {
  border-color: rgba(79, 125, 92, 0.35);
  color: var(--success);
  background: rgba(79, 125, 92, 0.1);
}

.status-progress,
.status-pending {
  border-color: rgba(160, 113, 62, 0.35);
  color: var(--warning);
  background: rgba(160, 113, 62, 0.1);
}

.status-delay,
.status-rejected {
  border-color: rgba(166, 83, 83, 0.35);
  color: var(--danger);
  background: rgba(166, 83, 83, 0.1);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 12px;
  font-size: 13px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  position: relative;
  flex: 1;
  min-width: 88px;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e6e2;
}

.progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--blue));
}

.progress-value {
  min-width: 42px;
  text-align: right;
  color: var(--ink);
  font-weight: 600;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.queue-list,
.activity-list,
.comments-list,
.file-list,
.approval-list,
.stage-list {
  display: grid;
  gap: 10px;
}

.queue-item {
  padding: 12px;
}

.queue-item strong {
  display: block;
  font-weight: 600;
}

.queue-item span {
  color: var(--muted);
  font-size: 13px;
}

.ai-preview {
  min-height: 176px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
}

.ai-preview p {
  margin: 0 0 10px;
}

.ai-preview ul,
.ai-output ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.project-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.5fr);
  gap: 18px;
  align-items: start;
}

.project-header {
  margin-bottom: 18px;
}

.project-title {
  align-items: start;
}

.project-title-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.project-summary-grid .summary-card {
  min-height: 86px;
}

.stage-card {
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.stage-card.active {
  border-color: var(--ink);
  background: #f8faf8;
}

.stage-card h3 {
  font-size: 16px;
}

.stage-meta {
  display: grid;
  gap: 4px;
  margin: 8px 0 10px;
  font-size: 13px;
}

.stage-detail {
  min-width: 0;
  padding: 18px;
}

.stage-detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.stage-detail h2 {
  font-size: 28px;
}

.stage-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: thin;
}

.stage-chip {
  flex: 0 0 auto;
  min-width: 116px;
  border-radius: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.detail-field {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.detail-field strong {
  font-size: 16px;
  font-weight: 600;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.range-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--sage);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.work-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.upload-tile {
  min-height: 124px;
  padding: 14px;
  background: var(--surface-2);
}

.upload-tile strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.upload-tile p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.upload-tile input {
  display: none;
}

.file-list {
  margin-top: 10px;
}

.file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.file-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(62, 102, 140, 0.1);
  color: var(--blue);
  font-weight: 700;
}

.file-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row span {
  color: var(--muted);
  font-size: 12px;
}

.comment-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.comment-item {
  padding: 12px;
}

.comment-topline strong {
  font-weight: 600;
}

.comment-item p {
  margin: 8px 0 0;
}

.translation-text {
  margin-top: 8px;
  padding: 10px;
  border-radius: 6px;
  background: rgba(94, 123, 104, 0.1);
  color: var(--ink);
}

.approval-list {
  margin-top: 10px;
}

.approval-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.approval-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e3e9e5;
  color: var(--muted);
  font-size: 12px;
}

.approval-item.done .approval-step {
  background: var(--success);
  color: var(--surface);
}

.approval-item.current .approval-step {
  background: var(--warning);
  color: var(--surface);
}

.ai-panel {
  display: grid;
  gap: 12px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tool-chip {
  min-height: 48px;
  border-radius: 6px;
  justify-content: flex-start;
  text-align: left;
}

.ai-output {
  min-height: 210px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(94, 123, 104, 0.08), rgba(62, 102, 140, 0.07)), var(--surface);
}

.ai-output h2 {
  font-size: 18px;
}

.ai-output p {
  margin: 0 0 10px;
}

.ask-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.activity-item {
  padding: 10px 12px;
}

.activity-item strong {
  display: block;
  font-weight: 600;
}

.activity-item span {
  color: var(--muted);
  font-size: 13px;
}

.bottom-nav {
  display: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-2);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--surface);
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

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

@media (max-width: 1180px) {
  .summary-grid,
  .project-summary-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .section-grid,
  .create-layout,
  .guide-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-panel-wrap {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .login-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 18px 14px 86px;
  }

  .topbar {
    margin: -18px -14px 18px;
    padding: 12px 14px;
  }

  .mobile-brand {
    display: flex;
  }

  .screen-title,
  .project-title,
  .stage-detail-header {
    display: grid;
    align-items: start;
  }

  .title-actions {
    justify-content: flex-start;
  }

  .project-title-actions {
    justify-content: flex-start;
  }

  .project-workspace {
    grid-template-columns: 1fr;
  }

  .stage-list {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    padding: 8px max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .bottom-nav .nav-tab {
    justify-content: center;
    min-height: 44px;
    padding: 8px 6px;
    font-size: 13px;
  }
}

@media (max-width: 680px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    margin-left: 0;
  }

  .topbar-actions .secondary-button {
    display: none;
  }

  .mobile-brand span {
    display: none;
  }

  .mobile-brand img {
    width: 118px;
  }

  .login-brand {
    padding: 24px 18px;
  }

  .login-panel-wrap {
    padding: 18px;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-copy h1,
  .screen-title h1,
  .project-title h1 {
    font-size: 32px;
  }

  .login-stats,
  .summary-grid,
  .project-summary-grid,
  .detail-grid,
  .control-grid,
  .upload-grid,
  .tool-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .login-roles {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-visual {
    min-height: 118px;
  }

  .project-topline,
  .stage-topline,
  .comment-topline {
    display: grid;
    justify-items: start;
  }

  .topbar-actions {
    gap: 6px;
  }

  .language-select {
    max-width: none;
  }

  .country-select,
  .language-select {
    width: 100%;
    min-width: 0;
  }

  .ask-row,
  .file-row,
  .approval-item {
    grid-template-columns: 1fr;
  }

  .file-symbol,
  .approval-step {
    display: none;
  }

  .button-row {
    display: grid;
  }

  .bottom-nav .nav-tab {
    font-size: 12px;
    padding-left: 4px;
    padding-right: 4px;
  }
}
