/* Web app */
#view { outline: none; min-height: 70vh; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.page { padding: 40px 0 0; }
.page h1 { font-size: clamp(40px, 5vw, 58px); margin: 6px 0 4px; }
.page h2 { font: 650 20px/1.3 var(--body); margin: 0 0 12px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-head .eyebrow a { color: inherit; text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.modes { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; }
.modes button { border: 0; background: transparent; color: var(--muted); font: 600 13.5px/1 var(--body); padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 32px; }
.modes button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.alert { background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); border-radius: 12px; padding: 12px 16px; margin: 0 0 20px; }
.msg { min-height: 1.4em; margin: 10px 0 0; color: var(--muted); }
.small { font-size: 14px; }
.narrow { width: min(680px, 100% - 32px); }
.panel { padding: 24px 28px; margin-top: 20px; }
.row { display: flex; gap: 10px; margin-top: 16px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input:not([type=file]) { width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 17px var(--body); padding: 0 14px; }
input:focus { border-color: var(--teal); outline: 3px solid var(--teal-soft); }

/* Sign in */
.auth { display: grid; place-items: center; padding: 56px 0; }
.auth-card { width: min(460px, 100%); padding: 32px 32px 26px; }
.auth-card h1 { font-size: 52px; margin: 6px 0 8px; }
.providers { display: grid; gap: 10px; margin-top: 22px; }
.wide { width: 100%; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 20px 0 4px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.email-form .btn { margin-top: 12px; }
.code { font: 500 26px var(--mono) !important; letter-spacing: 0.4em; text-align: center; }
.linkish { background: none; border: 0; color: var(--teal); font: inherit; cursor: pointer; padding: 10px 0 0; text-decoration: underline; text-underline-offset: 3px; }
.fine { font-size: 13.5px; margin-top: 22px; }

/* Homes */
.file-btn { position: relative; }
.drop { display: grid; grid-template-columns: 1fr; padding: 22px 26px; margin-bottom: 28px; border-style: dashed; border-width: 1.5px; transition: border-color 0.2s, background 0.2s; }
.drop.over { border-color: var(--teal); background: var(--teal-soft); }
.drop h2 { font: 650 18px/1.3 var(--body); }
.howto { margin: 0; padding-left: 20px; }
.howto li { margin: 4px 0; }
.home-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.home-card { display: block; text-decoration: none; color: var(--ink); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.home-card:hover { transform: translateY(-3px); }
.thumb { background: #fff; aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 10px; border-bottom: 1px solid var(--line); }
.thumb svg { width: 100%; height: 100%; }
.thumb.empty { color: #56676A; font-size: 14px; }
.meta { display: grid; gap: 2px; padding: 14px 18px 16px; }
.meta .mono { color: var(--dim); }
.empty-state { text-align: center; padding: 40px 0; color: var(--muted); }

/* One home */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .home-layout { grid-template-columns: 1fr; } }
.sheet { overflow: hidden; background: #fff; }
.plan-view { padding: 20px; }
.plan-view svg { width: 100%; height: auto; display: block; }
.three-view { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(120% 90% at 50% 30%, var(--teal-soft), transparent 70%), var(--paper); }
.three-view canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.hint { position: absolute; bottom: 10px; right: 14px; font-size: 12px; color: var(--muted); margin: 0; }
.side { padding: 20px 22px; }
.rooms-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 16px; }
.rooms-table th, .rooms-table td { text-align: left; padding: 9px 4px; border-bottom: 1px solid var(--line); font-weight: 400; }
.rooms-table thead th { font-weight: 600; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.rooms-table tbody th { font-weight: 600; }
.rooms-table td.mono { color: var(--dim); white-space: nowrap; }
.rooms-table tfoot th, .rooms-table tfoot td { border-bottom: 0; font-weight: 650; padding-top: 12px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid; margin-right: 8px; vertical-align: -1px; }

/* Account */
.facts-list { margin: 0; }
.facts-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.danger-zone h2 { color: var(--danger); }

@media print {
  body { background: #fff; }
  .top, .no-print, .foot, .skip { display: none !important; }
  .card { box-shadow: none; border: 0; }
  .home-layout { grid-template-columns: 1fr; }
  .page { padding: 0; }
}
