:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-muted: #eef3f2;
  --ink: #172221;
  --muted: #63716f;
  --line: #d6dfdd;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #c97917;
  --danger: #b42318;
  --success: #13795b;
  --shadow: 0 12px 32px rgba(23, 34, 33, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body * {
  min-width: 0;
}

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

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  white-space: normal;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.ghost {
  background: transparent;
  color: var(--muted);
}

.danger {
  background: #fff5f3;
  border-color: #f3beb7;
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  padding: 10px 11px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-muted);
  color: #394845;
  font-size: 12px;
  letter-spacing: 0;
  position: sticky;
  top: 0;
  z-index: 1;
}

td input,
td select,
td textarea {
  min-width: 96px;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.08), rgba(201, 121, 23, 0.08)),
    var(--bg);
}

.login-panel {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-panel h1,
.topbar h1,
.section-heading h2,
.panel-heading h2 {
  margin: 0;
}

.login-panel h1 {
  font-size: 28px;
}

.login-notice,
.login-status {
  margin: 0;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.login-notice {
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: #edf8f5;
  color: #0d5f59;
  font-weight: 700;
}

.login-links {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.login-links a {
  color: var(--primary);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-links span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.login-demo {
  width: 100%;
  margin-top: 4px;
}

.login-status {
  min-height: 20px;
  color: var(--muted);
}

.login-status:empty {
  display: none;
}

.login-status.error {
  color: var(--danger);
  font-weight: 800;
}

.login-status.success {
  color: var(--primary);
  font-weight: 800;
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.small {
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar h1 {
  font-size: 22px;
}

.topbar-brand {
  min-width: 0;
}

.email-verification-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(12px, 2vw, 28px);
  border-bottom: 1px solid rgba(201, 121, 23, 0.28);
  background: #fff8e8;
  color: var(--ink);
}

.email-verification-copy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.email-verification-copy > div {
  display: grid;
  gap: 2px;
}

.email-verification-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.email-verification-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.email-verification-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.email-verification-email {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.email-verification-status.success {
  color: var(--success);
  font-weight: 800;
}

.email-verification-status.error {
  color: var(--danger);
  font-weight: 800;
}

.email-verification-button {
  flex: 0 0 auto;
  border-color: rgba(201, 121, 23, 0.56);
  color: #8a520d;
  font-weight: 800;
  white-space: nowrap;
}

.email-verification-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: #6f4008;
}

.topbar-actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-actions {
  position: relative;
  justify-content: flex-end;
}

.menu-button {
  min-width: 96px;
  border-color: var(--line);
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.back-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px clamp(10px, 2vw, 24px) 0;
}

.back-bar button {
  flex: 1 1 0;
}

.menu-button::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 8px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  vertical-align: middle;
}

.topbar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: min(240px, calc(100vw - 24px));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topbar-menu button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.create-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(201, 121, 23, 0.22);
}

.create-button:hover:not(:disabled) {
  border-color: #a75f0e;
  background: #a75f0e;
}

.workspace-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px clamp(12px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  background: #fdfefe;
}

.workflow-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px clamp(12px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  background: #fdfefe;
}

.step-tab {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 8px 10px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.step-tab span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.step-tab strong {
  font-size: 13px;
  line-height: 1.25;
}

.step-tab.active {
  border-color: var(--primary);
  background: #e8f7f4;
  color: var(--primary-dark);
}

.nav-tab {
  min-width: max-content;
  min-height: 38px;
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.nav-tab.active {
  background: var(--ink);
  color: #fff;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 16px clamp(12px, 2vw, 28px) 28px;
}

.side-panel,
.workspace {
  display: grid;
  align-content: start;
  gap: 16px;
}

.panel,
.view {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 34, 33, 0.02);
}

.panel {
  padding: 16px;
}

.view {
  display: none;
  padding: 18px;
}

.active-view {
  display: block;
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 22px;
}

.panel-heading h2,
.panel h3 {
  font-size: 16px;
}

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

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

.two-col.compact {
  gap: 8px;
}

.scan-quantity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid #bdded8;
  border-radius: 999px;
  background: #e8f7f4;
  color: var(--primary-dark);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
}

.status-pill.warning {
  border-color: #f0cd9a;
  background: #fff7ea;
  color: #865109;
}

.status-pill.danger {
  border-color: #f3beb7;
  background: #fff5f3;
  color: var(--danger);
}

.review-list,
.warning-list,
.audit-log {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-list li,
.warning-list li,
.audit-log li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.review-list li strong,
.warning-list li strong {
  display: block;
  margin-bottom: 4px;
}

.review-list .done {
  border-color: #bfe1d7;
  background: #f1fbf8;
}

.warning-list li {
  border-color: #f0cd9a;
  background: #fffaf0;
}

.audit-log {
  max-height: 420px;
  overflow: auto;
}

.audit-log li {
  font-size: 12px;
  color: var(--muted);
}

.danger-panel {
  border-color: #f0b4b4;
  background: #fffafa;
}

.danger-button {
  border: 1px solid #b42318;
  background: #b42318;
  color: #fff;
}

.danger-button:hover:not(:disabled) {
  background: #912018;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 16px;
}

/* 有料プランのカード。契約中プランは上の current-plan パネルに別途出す */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.plan-grid .panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.plan-grid .panel > button {
  margin-top: auto;
  align-self: stretch;
}

.plan-status-notice {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.plan-status-notice.warning {
  color: #a3341c;
  font-weight: 600;
}

.project-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.room-manager {
  margin-bottom: 16px;
}

.room-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.room-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfd;
}

.room-card.active {
  border-color: var(--primary);
  background: #eefaf7;
}

.room-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.room-card-heading-action {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.room-card strong,
.room-card span {
  display: block;
}

.room-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.room-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.room-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.room-card dd {
  margin: 0;
  font-weight: 750;
}

.project-select-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfd;
}

.project-select-card.active {
  border-color: var(--primary);
  background: #eefaf7;
}

.project-select-card h3,
.project-select-card p,
.project-select-card dl {
  margin: 0;
}

.project-select-card dl {
  display: grid;
  gap: 8px;
}

.project-select-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-select-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-select-card dd {
  margin: 0;
  text-align: right;
}

.project-empty-state {
  display: grid;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfd;
  color: var(--muted);
}

.project-empty-state strong {
  color: var(--ink);
}

.metrics-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfd;
}

.metrics-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.metrics-grid strong {
  font-size: 22px;
}

.dashboard-start-panel {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto 14px;
  text-align: left;
}

.dashboard-start-panel .create-button {
  width: min(100%, 320px);
  min-height: 52px;
  justify-self: start;
  font-size: 17px;
  font-weight: 850;
}

.scan-app-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 980px;
  margin: 0 auto 14px;
  padding: 18px 20px;
  border: 2px solid #dc2626;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff1a8, #fff9d9);
  box-shadow: 0 8px 22px rgba(180, 35, 24, 0.14);
}

.scan-app-download-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.scan-app-download-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #b42318;
  color: #fff3a3;
  place-items: center;
}

.scan-app-download-icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.scan-app-download-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.scan-app-download-heading h3,
.scan-app-download-copy p {
  margin: 0;
}

.scan-app-download-heading h3 {
  color: #a61b13;
  font-size: 18px;
  line-height: 1.45;
}

.scan-app-download-copy p {
  color: #7f1d1d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
}

.scan-app-download-badge {
  border: 1px solid #b42318;
  border-radius: 999px;
  padding: 2px 8px;
  background: #b42318;
  color: #fff3a3;
  font-size: 11px;
  font-weight: 800;
}

.scan-app-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  background: #b42318;
  color: #fff3a3;
  font-size: 15px;
  font-weight: 800;
}

.scan-app-download-button:hover:not(:disabled) {
  background: #8f1d14;
}

.saved-projects-panel {
  max-width: 980px;
  margin: 0 auto;
}

.sync-conflict-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e2a54b;
  border-radius: 8px;
  background: #fff8e8;
}

.sync-conflict-actions[hidden] {
  display: none;
}

.sync-conflict-actions p {
  margin: 0;
}

.load-more-projects {
  display: block;
  margin: 14px auto 0;
}

.project-form-panel {
  max-width: 760px;
  margin: 0 auto;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-table {
  max-height: 360px;
}

.scan-layout,
.drawing-layout,
.voice-layout,
.settings-grid,
.plan-grid {
  display: grid;
  gap: 16px;
}

.scan-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.lidar-import-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(201, 121, 23, 0.1)),
    #fbfdfd;
}

.lidar-import-panel h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

.lidar-flow span,
.scan-source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lidar-flow span {
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 8px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.scan-source-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.scan-primary-button {
  width: 100%;
  min-height: 56px;
  font-size: 17px;
  font-weight: 850;
}

.scan-source-card input[type="file"] {
  width: 100%;
  margin-top: 6px;
  font-size: 13px;
}

.scan-format-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scan-format-list span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  padding: 4px 9px;
  background: #f4fbfa;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.drawing-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.8fr);
}

.room-3d-section {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.room-3d-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
}

.segmented-control button {
  min-height: 34px;
  border-radius: 6px;
  padding-inline: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.segmented-control button.active {
  background: var(--primary);
  color: #fff;
}

.room-3d-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.room-3d-scene {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfb;
  touch-action: none;
}

.room-3d-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
}

.room-3d-view-controls,
.scan-photo-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 24px);
}

.room-3d-view-controls button,
.scan-photo-controls button {
  min-height: 32px;
  border-color: rgba(15, 118, 110, 0.22);
  border-radius: 6px;
  padding-inline: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 6px 18px rgba(23, 34, 33, 0.08);
}

.scan-photo-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111817;
  touch-action: none;
}

.scan-photo-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 80ms ease-out;
  will-change: transform;
}

.scan-photo-meta {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  display: grid;
  gap: 2px;
  max-width: min(360px, calc(100% - 24px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(17, 24, 23, 0.76);
  color: #fff;
  backdrop-filter: blur(10px);
}

.scan-photo-meta strong {
  font-size: 13px;
}

.scan-photo-meta span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.scan-photo-measurements {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 58px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  pointer-events: none;
}

.scan-photo-measurements span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(17, 24, 23, 0.78);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.scan-photo-measurements small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-photo-measurements strong {
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 13px;
  line-height: 1.15;
}

.scan-photo-empty {
  display: grid;
  min-height: 340px;
  place-items: center;
  gap: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.scan-photo-empty strong {
  color: var(--ink);
  font-size: 16px;
}

.scan-photo-empty span {
  max-width: 560px;
  line-height: 1.7;
}

.scan-model-viewport {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #111817;
}

.scan-model-viewer {
  width: 100%;
  height: 100%;
  min-height: 340px;
  background: #111817;
}

.scan-panorama-viewport {
  position: absolute;
  inset: 0;
  display: grid;
  min-height: 340px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(45, 86, 80, 0.32), transparent 58%),
    #111817;
}

.scan-panorama-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
  touch-action: none;
  cursor: grab;
  outline: none;
}

.scan-panorama-canvas.is-dragging {
  cursor: grabbing;
}

.scan-panorama-canvas:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(126, 231, 217, 0.9);
}

.scan-panorama-loading,
.scan-panorama-error {
  position: relative;
  z-index: 2;
  display: grid;
  max-width: min(480px, calc(100% - 36px));
  place-items: center;
  gap: 10px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.scan-panorama-loading strong,
.scan-panorama-error strong {
  color: #fff;
}

.scan-panorama-error span {
  line-height: 1.65;
}

.scan-panorama-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #7ee7d9;
  border-radius: 50%;
  animation: panorama-spin 0.85s linear infinite;
}

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

.scan-panorama-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 6px;
  background: rgba(10, 18, 17, 0.82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.scan-panorama-controls button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.scan-panorama-controls button:hover {
  background: rgba(255, 255, 255, 0.17);
}

.scan-panorama-help {
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  white-space: nowrap;
}

.scan-panorama-download {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 7px 10px;
  color: #172221;
  background: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

/* フルスクリーンAPI非対応(iOS Safari)向けのfixed配置フォールバック */
.scan-panorama-viewport.scan-panorama-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 40;
  min-height: 100%;
}

.scan-panorama-progress {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ビューア起動後(低解像度プレビュー表示中)の読込進捗バッジ */
.scan-panorama-progress-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(10, 18, 17, 0.82);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(10px);
}

.scan-panorama-pending-stage {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.scan-panorama-pending-elapsed {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.scan-legacy-appearance-notice {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: grid;
  max-width: min(430px, calc(100% - 24px));
  gap: 2px;
  border: 1px solid rgba(255, 202, 98, 0.38);
  border-radius: 10px;
  padding: 9px 11px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(22, 24, 18, 0.88);
  font-size: 12px;
  line-height: 1.5;
  backdrop-filter: blur(10px);
}

.scan-legacy-appearance-notice strong {
  color: #ffe2a4;
}

/* Sparkガウシアンスプラットビューア用キャンバス（実写3Dタブの高精細表示） */
.splat-model-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
  background: #111817;
  touch-action: none;
  cursor: grab;
}

.splat-model-canvas:active {
  cursor: grabbing;
}

.scan-model-loading,
.scan-model-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 340px;
  padding: 18px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.scan-model-empty strong {
  color: #fff;
  font-size: 16px;
}

.scan-model-empty span {
  max-width: 620px;
  line-height: 1.7;
}

.scan-model-download {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.room-3d-empty {
  display: grid;
  min-height: 340px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.room-3d-summary {
  display: grid;
}

.room-3d-summary[hidden] {
  display: none;
}

.room-3d-guidance {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: none;
}

.room-3d-guidance-main,
.room-3d-guidance-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.room-3d-guidance-main span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 850;
}

.room-3d-guidance-main strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.room-3d-guidance-meter {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e7eeed;
}

.room-3d-guidance-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

.room-3d-guidance-stats {
  flex-wrap: wrap;
}

.room-3d-guidance-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.room-3d-measurements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
}

.room-3d-measurements span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  padding: 7px 8px;
  background: #f4fbfa;
}

.room-3d-measurements small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-3d-measurements strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.room-3d-guidance ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.voice-layout,
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-step {
  margin-top: 16px;
}

.compact-heading {
  margin-bottom: 8px;
}

.voice-note-list {
  display: grid;
  gap: 10px;
}

.voice-empty-state {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbfb;
}

.voice-empty-state strong {
  color: var(--ink);
  font-size: 14px;
}

.voice-note-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.voice-note-card-button {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.voice-note-card-button span:first-child {
  display: grid;
  gap: 2px;
}

.voice-note-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.voice-note-card p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.voice-note-audio {
  width: 100%;
  height: 36px;
}

.review-panel .panel-heading {
  display: block;
}

.tool-panel {
  align-self: start;
}

.drawing-board-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfb;
}

#drawingBoard {
  width: 100%;
  min-width: 620px;
  min-height: 420px;
  display: block;
}

.drawing-grid {
  stroke: #dce6e4;
  stroke-width: 1;
}

.drawing-element {
  cursor: pointer;
  transition: opacity 160ms ease;
}

.drawing-element:hover {
  opacity: 0.78;
}

.drawing-element.selected {
  stroke: var(--accent);
  stroke-width: 4;
}

.dimension-line {
  stroke: #546461;
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.dimension-guide {
  stroke: #92a09d;
  stroke-width: 1.5;
}

.dimension-label {
  fill: #172221;
  font-size: 13px;
  font-weight: 750;
}

.element-label {
  fill: #172221;
  font-size: 14px;
  font-weight: 800;
}

.drawing-label-backplate {
  fill: rgba(255, 255, 255, 0.9);
  stroke: rgba(15, 118, 110, 0.16);
  stroke-width: 1;
}

.drawing-marker-bg {
  fill: #fff;
  stroke: #0f766e;
  stroke-width: 1.5;
}

.drawing-marker-bg.selected {
  fill: #fff8ee;
  stroke: var(--accent);
  stroke-width: 2;
}

.drawing-marker-text {
  fill: #172221;
  font-size: 12px;
  font-weight: 850;
  text-anchor: middle;
  dominant-baseline: middle;
}

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

.analysis-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfd;
}

.analysis-card h3 {
  margin: 0 0 8px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.json-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101918;
  color: #d8e8e5;
}

.json-panel summary {
  cursor: pointer;
  padding: 12px 14px;
}

.json-panel pre {
  margin: 0;
  max-height: 480px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.estimate-table input,
.estimate-table select {
  border-radius: 6px;
  padding: 8px;
  min-width: 86px;
}

.estimate-table textarea {
  min-width: 150px;
  border-radius: 6px;
  padding: 8px;
}

.totals-bar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.totals-bar span {
  color: var(--muted);
}

.totals-bar strong {
  color: var(--ink);
}

.report-preview {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(14px, 3.5vw, 36px);
  background:
    radial-gradient(circle at 18% -12%, rgba(15, 118, 110, 0.07), transparent 55%),
    var(--surface-muted);
}

/* --- 帳票（見積書/請求書）シート --- */
.doc-sheet {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
  background: #fff;
  border-top: 6px solid var(--primary);
  padding: clamp(22px, 5vw, 56px);
  box-shadow: 0 16px 40px rgba(23, 34, 33, 0.14);
  font-size: 14px;
  line-height: 1.6;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.doc-sheet[data-doc-mode="invoice"] {
  border-top-color: var(--accent);
}

.doc-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  border-bottom: 3px double var(--ink);
  padding-bottom: 18px;
}

.doc-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

.doc-meta {
  margin: 0;
  display: grid;
  gap: 2px;
  font-size: 12.5px;
}

.doc-meta div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.doc-meta dt {
  color: var(--muted);
}

.doc-meta dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.doc-parties {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.doc-client-name {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
}

.doc-client-name span {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 500;
}

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

.doc-grand-total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
  padding: 12px 18px;
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  background: rgba(15, 118, 110, 0.06);
}

.doc-sheet[data-doc-mode="invoice"] .doc-grand-total {
  border-left-color: var(--accent);
  background: rgba(201, 121, 23, 0.08);
}

.doc-grand-total span {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.doc-grand-total strong {
  font-size: clamp(24px, 3.4vw, 30px);
  font-variant-numeric: tabular-nums;
}

.doc-project-meta {
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.doc-project-meta div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 4px;
}

.doc-project-meta dt {
  color: var(--muted);
}

.doc-project-meta dd {
  margin: 0;
}

.doc-company {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 4px 76px 4px 0;
  font-size: 13px;
}

.doc-company strong {
  font-size: 16px;
}

.doc-company p {
  margin: 0;
  color: var(--muted);
}

.doc-stamp {
  position: absolute;
  top: 2px;
  right: 0;
  width: 64px;
  height: 64px;
  object-fit: contain;
  object-position: center;
}

.doc-table-wrap {
  overflow-x: auto;
}

.doc-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
}

.doc-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
}

.doc-sheet[data-doc-mode="invoice"] .doc-table th {
  background: #a05f10;
}

.doc-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
}

.doc-table .doc-row-no {
  width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.doc-table td.doc-row-no {
  color: var(--muted);
}

.doc-table .doc-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.doc-table .doc-unit {
  white-space: nowrap;
}

.doc-table .doc-spec {
  color: var(--muted);
}

.doc-room-row td {
  background: var(--surface-muted);
  border-top: 2px solid var(--primary);
  font-weight: 600;
}

.doc-sheet[data-doc-mode="invoice"] .doc-room-row td {
  border-top-color: var(--accent);
}

.doc-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 10px;
}

.doc-summary dl {
  margin: 0 0 0 auto;
  width: min(320px, 100%);
  display: grid;
  gap: 6px;
}

.doc-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.doc-summary dt {
  color: var(--muted);
}

.doc-summary dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.doc-summary .doc-summary-total {
  border-bottom: 3px double var(--ink);
  padding-top: 4px;
  font-size: 17px;
  font-weight: 700;
}

.doc-summary .doc-summary-total dt {
  color: var(--ink);
}

.doc-summary .doc-summary-total dd {
  color: var(--primary-dark);
}

.doc-sheet[data-doc-mode="invoice"] .doc-summary .doc-summary-total dd {
  color: #a05f10;
}

.doc-notes {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.doc-notes h4 {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

.doc-notes p {
  margin: 0;
  white-space: pre-line;
}

.doc-internal-memo {
  max-width: 820px;
  margin: 16px auto 0;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--muted);
}

.doc-internal-memo h4 {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--ink);
}

.doc-internal-memo p {
  margin: 0;
}

.doc-internal-memo ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* --- 見積書/請求書モード切替 --- */
.doc-mode-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.doc-mode-button {
  min-height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-weight: 600;
}

.doc-mode-button:hover:not(:disabled) {
  transform: none;
}

.doc-mode-button:hover:not(.is-active) {
  background: var(--surface-muted);
}

.doc-mode-button.is-active {
  background: var(--primary);
  color: #fff;
}

.honorific-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.document-customer-editor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(320px, 100%);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.document-customer-editor input {
  min-width: 210px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 10px;
}

.stamp-setting {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.stamp-setting h4,
.stamp-setting p {
  margin: 0;
}

.stamp-setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.stamp-upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  color: var(--primary);
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.stamp-upload-button:focus-within {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.stamp-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stamp-preview-box {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.stamp-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 680px) {
  .document-customer-editor {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    white-space: normal;
  }

  .document-customer-editor input {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }
}

.honorific-select select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
}

/* --- ダウンロード形式メニュー --- */
.download-wrap {
  position: relative;
}

.download-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 264px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.download-option {
  display: grid;
  gap: 2px;
  min-height: auto;
  border: none;
  border-radius: 8px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
}

.download-option:hover:not(:disabled) {
  transform: none;
  background: var(--surface-muted);
}

.download-option strong {
  font-size: 14px;
  color: var(--ink);
}

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

.report-drawing {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f9fbfb;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(360px, calc(100% - 36px));
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.paywall-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 32, 30, 0.55);
}

.paywall-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.paywall-modal h2 {
  margin: 4px 0 8px;
}

.paywall-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.paywall-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 18px 0 12px;
}

.paywall-plan {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.paywall-plan h3 {
  margin: 0;
}

.paywall-plan .paywall-price {
  font-size: 20px;
  font-weight: 700;
}

.paywall-plan button {
  margin-top: 8px;
}

.paywall-setup-fee {
  margin: 0 0 8px;
}

.document-conflict-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 32, 30, 0.6);
}

.document-conflict-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 16px;
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.document-conflict-modal h2 {
  margin: 4px 0 8px;
  font-size: clamp(21px, 5vw, 28px);
  line-height: 1.3;
}

.document-conflict-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.document-conflict-options button {
  display: grid;
  min-height: 72px;
  gap: 4px;
  align-content: center;
  justify-items: start;
  padding: 12px 16px;
  text-align: left;
}

.document-conflict-options button strong {
  font-size: 15px;
}

.document-conflict-options button span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.document-conflict-options button.primary span {
  color: rgba(255, 255, 255, 0.82);
}

.document-conflict-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.document-conflict-cancel {
  width: 100%;
  margin-top: 8px;
}

[hidden] {
  display: none !important;
}

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

@media (max-width: 820px) {
  .email-verification-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .email-verification-button {
    width: 100%;
    min-height: 44px;
  }

  .scan-app-download-card {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .scan-app-download-copy {
    align-items: flex-start;
  }

  .scan-app-download-button {
    width: 100%;
  }

  .section-heading,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .doc-parties {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .doc-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .doc-meta div {
    justify-content: flex-start;
  }

  .metrics-grid,
  .dashboard-layout,
  .scan-layout,
  .drawing-layout,
  .voice-layout,
  .settings-grid,
  .plan-grid,
  .side-panel,
  .two-col,
  .scan-quantity-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    padding: 14px 12px;
  }

  .topbar-brand {
    flex: 1 1 auto;
  }

  .topbar h1 {
    font-size: 19px;
    line-height: 1.25;
  }

  .topbar-actions {
    width: auto;
    flex: 0 0 auto;
    align-self: center;
  }

  .menu-button {
    width: auto;
  }

  .workflow-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px 10px;
  }

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

  .step-tab {
    min-height: 56px;
    padding: 8px;
  }

  .app-grid {
    padding: 12px 10px 22px;
  }

  .back-bar {
    padding-inline: 10px;
  }

  .view,
  .panel {
    padding: 12px;
  }

  #drawingBoard {
    min-width: 0;
    min-height: 300px;
    aspect-ratio: 720 / 460;
  }

  .room-3d-scene,
  .room-3d-canvas,
  .room-3d-empty,
  .scan-photo-empty,
  .scan-model-empty,
  .scan-model-viewer,
  .scan-panorama-viewport,
  .scan-panorama-canvas {
    min-height: 300px;
  }

  .room-3d-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1 1 0;
  }

  .room-3d-view-controls,
  .scan-photo-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
    justify-content: center;
  }

  .scan-panorama-controls {
    right: 10px;
    bottom: 10px;
    left: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: none;
  }

  .scan-panorama-controls button {
    min-height: 40px;
  }

  .scan-panorama-help {
    margin-right: auto;
  }

  .scan-photo-measurements {
    left: 10px;
    right: 10px;
    bottom: 54px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .room-3d-guidance {
    padding: 10px;
  }

  .room-3d-measurements {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  table {
    min-width: 620px;
  }

  .estimate-table {
    min-width: 720px;
  }

  .button-row button,
  .button-row button {
    flex: 1 1 130px;
  }

  .section-heading h2 {
    font-size: 20px;
    line-height: 1.3;
  }

  .metrics-grid strong {
    font-size: 20px;
  }

  .report-preview {
    padding: 12px;
  }
}

@media (max-width: 430px) {
  .workflow-nav,
  .lidar-flow {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 20px;
  }

  .topbar {
    gap: 10px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .topbar .eyebrow {
    font-size: 10px;
  }

  .menu-button {
    min-width: 86px;
    padding-inline: 10px;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .room-card-heading {
    gap: 8px;
  }

  .room-3d-measurements {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .email-verification-banner,
  .workflow-nav,
  .back-bar,
  .side-panel,
  .section-heading,
  .view:not(#view-estimate),
  .toast,
  .no-print,
  #view-estimate > .table-wrap,
  #view-estimate > .totals-bar {
    display: none !important;
  }

  .app-grid,
  .workspace,
  #view-estimate {
    display: block !important;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  #view-estimate {
    padding: 0;
  }

  .report-preview {
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: none;
  }

  .doc-sheet {
    max-width: none;
    box-shadow: none;
    padding: 0 0 12px;
    border-top-width: 4px;
  }

  .doc-table-wrap,
  .table-wrap {
    overflow: visible;
  }

  table,
  .doc-table {
    min-width: 0;
  }
}

/* --- スキャン受信状況タイムライン --- */
.scan-receive-panel {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.scan-receive-timeline {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scan-receive-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.scan-receive-step div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.scan-receive-step strong {
  font-size: 13px;
  line-height: 1.4;
}

.scan-receive-step span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.scan-receive-dot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
}

.scan-receive-step.done {
  background: #e8f7f4;
  border-color: #bdded8;
}

.scan-receive-step.done .scan-receive-dot {
  border-color: var(--primary);
  background: var(--primary);
}

.scan-receive-step.active {
  background: #fff7ea;
  border-color: #f0cd9a;
}

.scan-receive-step.active .scan-receive-dot {
  border-color: var(--accent);
  background: var(--accent);
  animation: scan-receive-pulse 1.4s ease-in-out infinite;
}

@keyframes scan-receive-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 121, 23, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(201, 121, 23, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .scan-panorama-spinner,
  .scan-receive-step.active .scan-receive-dot {
    animation: none;
  }
}

.scan-receive-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.scan-receive-hint.warning {
  color: #865109;
  background: #fff7ea;
  border: 1px solid #f0cd9a;
  border-radius: 10px;
  padding: 10px 12px;
}

.scan-receive-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid #bdded8;
  background: #e8f7f4;
  border-radius: 10px;
  padding: 12px 14px;
}

.scan-receive-summary dl {
  display: flex;
  gap: 18px;
  margin: 0;
  flex-wrap: wrap;
}

.scan-receive-summary dt {
  font-size: 11px;
  color: var(--muted);
}

.scan-receive-summary dd {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .scan-receive-timeline {
    grid-template-columns: 1fr;
  }

  .scan-receive-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .scan-receive-summary button {
    width: 100%;
  }
}

/* --- 3Dビューア: 面選択パネル / 要確認チップ --- */
.room-3d-selection {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  display: grid;
  gap: 6px;
  width: min(430px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 12px 36px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(23, 34, 33, 0.14);
}

.room-3d-selection strong {
  font-size: 14px;
}

.room-3d-selection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.room-3d-selection-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e8f5f2;
  color: var(--primary-dark) !important;
  font-size: 11px !important;
  font-weight: 850;
  line-height: 1 !important;
  white-space: nowrap;
}

.room-3d-selection-status.is-excluded {
  background: #e7eceb;
  color: #52635f !important;
}

.room-3d-selection span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.room-3d-selection .room-3d-selection-warning {
  color: #865109;
  background: #fff7ea;
  border-radius: 6px;
  padding: 4px 8px;
}

.room-3d-selection button.secondary {
  justify-self: start;
  font-size: 12px;
  padding: 6px 12px;
}

.room-3d-wall-editor {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.room-3d-wall-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.room-3d-wall-fields label:last-child {
  grid-column: 1 / -1;
}

.room-3d-wall-fields label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.room-3d-wall-fields input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
}

.room-3d-wall-fields input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(15, 118, 110, 0.12);
}

.room-3d-wall-calculation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.room-3d-wall-calculation span {
  display: grid;
  gap: 2px;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-muted);
}

.room-3d-wall-calculation strong {
  color: var(--text);
  font-size: 15px;
}

.room-3d-wall-exclude {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  border: 1px solid #cbd7d5;
  border-radius: 9px;
  padding: 8px 10px;
  background: #f7faf9;
  cursor: pointer;
}

.room-3d-wall-exclude input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary);
}

.room-3d-wall-exclude span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.room-3d-wall-editor.is-excluded .room-3d-wall-exclude {
  border-color: #91a39f;
  background: #e7eceb;
}

.room-3d-wall-total {
  border-left: 3px solid var(--primary);
  padding-left: 8px;
  color: var(--primary-dark) !important;
  font-weight: 800;
}

.room-3d-wall-note {
  font-size: 11px !important;
}

.room-3d-wall-editor button.primary {
  min-height: 42px;
  justify-self: stretch;
}

.room-3d-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-3d-selection-actions button.secondary[data-selection-action="exclude-opening"] {
  border-color: #d8c7f7;
  background: #f6f1fe;
  color: #5b21b6;
}

.room-3d-selection-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 760px) {
  .room-3d-selection {
    top: 10px;
    right: 10px;
    bottom: auto;
    left: 10px;
    width: auto;
    max-width: none;
    max-height: calc(100% - 20px);
  }
}

.room-3d-review-chips {
  display: grid;
  gap: 6px;
  margin: 10px 0 4px;
}

.room-3d-review-chips small {
  color: #865109;
  font-weight: 700;
  font-size: 11.5px;
}

.room-3d-review-chips div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-3d-review-chips button {
  border: 1px solid #f0cd9a;
  background: #fff7ea;
  color: #865109;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
}

.room-3d-review-chips button:hover {
  background: #ffedd0;
}

/* --- ステップ2→3への明示的な進行ボタン --- */
.step-advance-row {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.step-advance-row p {
  margin: 0;
  font-size: 13px;
}

.step-advance-row button {
  min-width: 260px;
}

@media (max-width: 720px) {
  .step-advance-row {
    flex-direction: column;
    align-items: stretch;
  }

  .step-advance-row button {
    min-width: 0;
    width: 100%;
  }
}

.voice-note-card {
  position: relative;
}

.voice-note-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid #f3beb7;
  background: #fff5f3;
  color: var(--danger);
  border-radius: 999px;
}

/* --- 部屋詳細ヘッダー（ステップ2の2階層化） --- */
.room-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.room-detail-header .room-detail-title {
  flex: 1;
  min-width: 140px;
}

.room-detail-header h3 {
  margin: 0;
  font-size: 18px;
}

/* --- 音声メモカードのヘッダー行（ボタン重なり修正） --- */
.voice-note-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.voice-note-card-head .voice-note-card-button {
  flex: 1;
  min-width: 0;
}

.voice-note-card-head .status-pill {
  flex: none;
}

.voice-note-delete {
  position: static;
  flex: none;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid #f3beb7;
  background: #fff5f3;
  color: var(--danger);
  border-radius: 999px;
}

/* --- PC向けレイアウト調整 --- */
@media (min-width: 960px) {
  .topbar,
  .workflow-nav,
  .back-bar,
  .app-grid {
    padding-left: max(clamp(16px, 4vw, 48px), calc((100vw - 1160px) / 2));
    padding-right: max(clamp(16px, 4vw, 48px), calc((100vw - 1160px) / 2));
  }

  .view {
    padding: 26px 28px 34px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .room-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }

  .scan-receive-timeline {
    gap: 12px;
  }

  .room-detail-header {
    padding: 14px 18px;
  }

  .step-advance-row {
    padding: 18px 22px;
  }
}

/* パネルの見た目を統一（角丸・影・余白のリズム） */
.panel,
.view {
  border-radius: 14px;
}

.panel {
  padding: 18px;
  box-shadow: 0 1px 2px rgba(23, 34, 33, 0.04);
}

.review-list li,
.warning-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
  line-height: 1.6;
}

.review-list li.done {
  border-color: #bdded8;
  background: #f2faf8;
}

.review-list li strong,
.warning-list li strong {
  display: block;
  font-size: 13px;
}

.warning-list li {
  border-left: 3px solid var(--accent);
  font-size: 12.5px;
  color: var(--muted);
}

.estimate-table tbody tr:nth-child(even) {
  background: #fbfdfd;
}

/* --- ステップ3 見積作成（全部屋） --- */
.quote-summary-table {
  min-width: 560px;
}

.quote-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  white-space: nowrap;
}

.quote-unapproved {
  color: #865109;
  background: #fff7ea;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 750;
}

/* 反映チェックを外した明細行（最終見積に含まれない） */
.quote-row-excluded td {
  opacity: 0.45;
}

.quote-row-excluded td:first-child {
  opacity: 1;
}

.quote-room-head th {
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 13px;
  padding: 10px;
}

.quote-room-head-total {
  float: right;
  font-variant-numeric: tabular-nums;
  line-height: 28px;
}

.quote-add-item-button {
  float: right;
  min-height: 28px;
  margin: 0 12px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  border-color: var(--line);
  color: var(--primary-dark);
}

.quote-add-item-button:hover:not(:disabled) {
  border-color: var(--primary);
}

.quote-totals-panel {
  display: flex;
  justify-content: flex-end;
}

.quote-totals {
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 260px;
}

.quote-totals div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.quote-totals dt {
  color: var(--muted);
  font-size: 13px;
}

.quote-totals dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.quote-totals .quote-grand {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.quote-totals .quote-grand dd {
  font-size: 20px;
  color: var(--primary-dark);
}

/* 横スクロールで入力内容が隠れるため、Step 3 の明細だけをモバイルでカード化する。 */
@media (max-width: 820px) {
  #view-quote .estimate-table {
    display: block;
    min-width: 0;
  }

  #view-quote .estimate-table thead {
    display: none;
  }

  #view-quote .estimate-table tbody {
    display: block;
    padding: 10px;
    background: #f5f8f7;
  }

  #view-quote .estimate-table .quote-room-head {
    display: block;
    margin: 0 0 10px;
  }

  #view-quote .estimate-table .quote-room-head:not(:first-child) {
    margin-top: 16px;
  }

  #view-quote .estimate-table .quote-room-head th {
    position: static;
    display: flex;
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
  }

  #view-quote .estimate-table .quote-room-head-total {
    float: none;
    order: 1;
    margin-left: auto;
  }

  #view-quote .estimate-table .quote-add-item-button {
    float: none;
    order: 2;
    flex: 1 0 100%;
    min-height: 40px;
    margin: 0;
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 14px 10px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: var(--surface);
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 6px;
    border: 0;
    padding: 0;
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:not(:first-child)::before {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:first-child {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:first-child::after {
    content: "見積に反映";
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(2),
  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(3) {
    grid-column: 1 / -1;
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(2)::before {
    content: "工事項目";
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(3)::before {
    content: "仕様";
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(4)::before {
    content: "単位";
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(5)::before {
    content: "数量";
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(6)::before {
    content: "単価";
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(7) {
    align-self: stretch;
    border-radius: 8px;
    padding: 10px;
    background: var(--surface-muted);
  }

  #view-quote #quoteItemsBody > tr[data-room-id][data-item-id] > td:nth-child(7)::before {
    content: "金額";
  }

  #view-quote #quoteItemsBody input,
  #view-quote #quoteItemsBody select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  #view-quote #quoteItemsBody input[data-field="approved"] {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    margin: 0;
  }

  #view-quote #quoteItemsBody > tr.quote-row-excluded > td:not(:first-child) {
    opacity: 0.62;
  }

  #view-quote #quoteItemsBody > tr:not(.quote-room-head):not([data-item-id]) {
    display: block;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
  }

  #view-quote #quoteItemsBody > tr:not(.quote-room-head):not([data-item-id]) > td {
    display: block;
    border: 0;
    padding: 14px;
  }
}
