:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #65736d;
  --paper: #fffdf9;
  --soft: #f7f2ea;
  --line: rgba(23, 33, 29, 0.12);
  --orange: #f47b2a;
  --orange-dark: #b44915;
  --green: #1f7b63;
  --gold: #caa25a;
  --charcoal: #101816;
  --shadow: 0 24px 70px rgba(19, 25, 23, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

:lang(ja) {
  font-family: Meiryo, "Yu Gothic", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 66px;
  transform: translateX(-50%);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.78);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), #ffb25b);
  color: white;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(244, 123, 42, 0.28);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 13px;
  border-radius: 8px;
  color: rgba(23, 33, 29, 0.76);
  font-size: 0.94rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(244, 123, 42, 0.1);
  color: var(--ink);
}

.nav-cta,
.primary-action,
.secondary-action,
.panel-link,
.quiet-button,
.availability-actions button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.nav-cta,
.primary-action {
  background: var(--charcoal);
  color: white;
  padding: 0 18px;
  box-shadow: 0 14px 34px rgba(16, 24, 22, 0.22);
}

.primary-action:hover,
.nav-cta:hover {
  background: #22332e;
}

.full {
  width: 100%;
}

.secondary-action,
.panel-link {
  min-width: 144px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
  color: white;
  backdrop-filter: blur(10px);
}

.hero-section {
  position: relative;
  display: grid;
  min-height: 92vh;
  overflow: hidden;
  align-items: end;
  padding: 140px max(24px, calc((100vw - 1120px) / 2)) 86px;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(12, 17, 16, 0.82) 0%, rgba(12, 17, 16, 0.55) 34%, rgba(12, 17, 16, 0.16) 72%),
    linear-gradient(0deg, rgba(12, 17, 16, 0.48) 0%, transparent 28%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  color: white;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #ffb25b;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.9rem, 9vw, 8.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.hero-copy {
  max-width: 580px;
  color: rgba(255, 255, 255, 0.83);
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.trust-strip div {
  padding: 28px max(22px, calc((100vw - 1120px) / 2));
  background: #fffaf2;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  margin-bottom: 5px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.trust-strip span {
  color: var(--muted);
}

.section-grid,
.split-band,
.delivery-panel {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  padding: 96px 0;
}

.section-copy {
  position: sticky;
  top: 120px;
  align-self: start;
}

.section-copy p:not(.eyebrow),
.split-band p,
.delivery-panel p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

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

.service-card {
  min-height: 238px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 42px rgba(23, 33, 29, 0.06);
}

.service-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 8px;
  background: #fff2e8;
  color: var(--orange-dark);
  font-size: 0.8rem;
  font-weight: 900;
}

.service-card p {
  color: var(--muted);
  line-height: 1.6;
}

.split-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 44px;
  align-items: end;
  padding: 58px;
  background: var(--charcoal);
  color: white;
}

.split-band p {
  color: rgba(255, 255, 255, 0.72);
}

.delivery-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 96px 0 130px;
}

.delivery-panel > div {
  max-width: 720px;
}

.panel-link {
  border-color: var(--line);
  background: var(--ink);
  color: white;
}

.chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 35;
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: white;
  cursor: pointer;
  font-weight: 850;
  box-shadow: var(--shadow);
}

.chat-launcher span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.22);
}

.chat-widget {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 40;
  display: flex;
  width: min(390px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 118px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transform-origin: bottom right;
  pointer-events: none;
  backdrop-filter: blur(24px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.chat-widget.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background: var(--charcoal);
  color: white;
}

.chat-header strong,
.chat-header small {
  display: block;
}

.chat-header small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.64);
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.chat-intake,
.chat-body {
  padding: 18px;
}

.chat-intake label,
.composer label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: none;
}

input {
  height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding: 12px 13px;
}

input:focus,
textarea:focus {
  border-color: rgba(244, 123, 42, 0.78);
  box-shadow: 0 0 0 4px rgba(244, 123, 42, 0.12);
}

.messages {
  display: flex;
  min-height: 230px;
  max-height: 320px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 4px 2px 14px;
}

.message {
  width: fit-content;
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(23, 33, 29, 0.08);
}

.message.customer {
  align-self: flex-end;
  background: #fff0e4;
}

.message.admin,
.message.system {
  align-self: flex-start;
}

.message.system {
  background: #ecf7f2;
  color: var(--green);
}

.message p {
  margin-bottom: 4px;
  line-height: 1.42;
}

.message small,
.attachment-chip {
  color: var(--muted);
  font-size: 0.76rem;
}

.attachment-chip {
  display: inline-flex;
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.composer {
  display: grid;
  gap: 10px;
}

.file-picker {
  margin: 0;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(244, 123, 42, 0.55);
  border-radius: 8px;
  background: rgba(244, 123, 42, 0.08);
  color: var(--orange-dark);
}

.admin-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(244, 123, 42, 0.11), transparent 32rem),
    #f6f5f0;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
}

.login-card {
  display: grid;
  width: min(430px, 100%);
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.login-card h1 {
  margin-bottom: 10px;
  font-size: clamp(2.3rem, 7vw, 3.5rem);
}

.login-card p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid rgba(180, 73, 21, 0.22);
  border-radius: 8px;
  background: #fff0e8;
  color: var(--orange-dark) !important;
  font-weight: 750;
}

.admin-topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(18px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.78);
  backdrop-filter: blur(20px);
}

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 750;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(31, 123, 99, 0.12);
}

.admin-layout {
  display: grid;
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 108px);
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  margin: 16px auto;
}

.inbox-panel,
.desk-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.86);
  box-shadow: 0 20px 60px rgba(23, 33, 29, 0.08);
}

.panel-heading,
.desk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h1,
.desk-header h2,
.empty-state h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.quiet-button {
  min-height: 38px;
  padding: 0 12px;
  background: #efe9df;
  color: var(--muted);
}

.conversation-list {
  display: grid;
  max-height: calc(100vh - 174px);
  overflow-y: auto;
}

.conversation-button {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 17px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.conversation-button:hover,
.conversation-button.is-active {
  background: #fff3e7;
}

.conversation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conversation-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  min-width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
}

.conversation-button p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-panel {
  display: grid;
  min-width: 0;
}

.empty-state {
  align-self: center;
  justify-self: center;
  max-width: 430px;
  padding: 32px;
  text-align: center;
}

.empty-state p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.conversation-desk {
  display: grid;
  min-height: 100%;
  grid-template-rows: auto 1fr auto;
}

.desk-header small {
  color: var(--muted);
}

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

.availability-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.availability-actions button:hover {
  border-color: rgba(244, 123, 42, 0.52);
  background: #fff3e7;
}

.admin-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 20px;
}

.admin-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.92);
}

.admin-composer textarea {
  min-height: 68px;
}

.admin-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: grid;
  width: min(340px, calc(100vw - 32px));
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: var(--charcoal);
  color: white;
  box-shadow: var(--shadow);
}

.admin-toast span {
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 860px) {
  .topbar {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    transform: none;
  }

  .nav-links {
    display: none;
  }

  .hero-section {
    min-height: 88vh;
    padding-top: 118px;
  }

  .trust-strip,
  .section-grid,
  .split-band,
  .delivery-panel,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .trust-strip div {
    padding: 22px;
  }

  .section-grid {
    gap: 30px;
    padding: 70px 0;
  }

  .section-copy {
    position: static;
  }

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

  .split-band {
    padding: 34px 24px;
  }

  .delivery-panel {
    align-items: flex-start;
    padding: 72px 0 104px;
  }

  .admin-layout {
    min-height: auto;
  }

  .conversation-list {
    max-height: 310px;
  }

  .admin-composer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(3.1rem, 16vw, 4.1rem);
  }

  h2 {
    font-size: clamp(1.75rem, 9vw, 2.4rem);
  }

  .nav-cta {
    display: none;
  }

  .topbar,
  .admin-topbar {
    min-width: 0;
  }

  .brand {
    min-width: 0;
  }

  .brand strong,
  .brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-section {
    padding-inline: 18px;
  }

  .hero-content,
  .hero-copy {
    max-width: 100%;
  }

  .hero-actions,
  .delivery-panel {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action,
  .panel-link {
    width: 100%;
  }

  .chat-widget {
    right: 14px;
    bottom: 82px;
  }

  .chat-launcher {
    right: 14px;
    bottom: 14px;
  }

  .admin-status {
    flex: 0 0 auto;
    width: 28px;
    overflow: hidden;
    color: transparent;
    white-space: nowrap;
  }

  .panel-heading,
  .desk-header {
    align-items: flex-start;
    flex-direction: column;
  }

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