/* Shared touch layout for the source console, agent console and public shop. */
html { scroll-padding-block: 20px 96px; }
.row, .muted, h1, h2, p, a { overflow-wrap: anywhere; }
.row p.muted { white-space: pre-wrap; }
.order-status { display: inline-block; padding: 5px 10px; border-radius: 7px; background: var(--soft); color: var(--accent); font-size: 14px; }
.order-next { margin: 5px 0 12px; }
.row > span.muted { display: block; }
#message:not(:empty) { display: flex; align-items: flex-start; gap: 8px; }
.feedback-text { flex: 1; min-width: 0; align-self: center; overflow-wrap: anywhere; }
button.feedback-close { flex: 0 0 44px; width: 44px; min-height: 44px; margin: 0; padding: 0; color: var(--accent); background: transparent; font-size: 24px; }
input, textarea, select { font-size: 16px; min-height: 46px; }
button, .link { min-height: 44px; line-height: 1.5; }
label { line-height: 1.6; }
textarea { min-height: 100px; resize: vertical; }
.mobile-tabs { display: none; }
.create-site-panel { margin-bottom: 20px; }
.create-site-panel > summary {
  padding: 16px 20px; cursor: pointer; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-weight: 600; color: var(--accent);
}
.create-site-panel > section { margin: 12px 0 0; }
.customer-auth > summary { cursor: pointer; min-height: 48px; padding: 12px; border-radius: 8px; background: var(--soft); color: var(--accent); font-size: 16px; }
.customer-auth > .grid { margin-top: 14px; }
.customer-steps { padding-left: 22px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 24px; font-size: 14px; line-height: 1.6; }
.customer-steps li { min-width: 0; overflow-wrap: anywhere; }
.benefit-points { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.benefit-points li { min-width: 0; padding: 10px; border-radius: 8px; background: var(--soft); }
.benefit-points b { display: block; color: var(--accent); font-size: 15px; }
.benefit-points span { display: block; margin-top: 5px; color: #52647e; font-size: 13px; line-height: 1.5; }
.service-help { margin: 12px 0; }
.service-help summary { cursor: pointer; padding: 11px 0; min-height: 46px; line-height: 1.5; font-size: 15px; color: var(--accent); }
.service-help summary:focus-visible { outline: 3px solid #f0aa32; outline-offset: 3px; }
.agent-tasks { padding-left: 23px; }
.agent-tasks > li { margin: 18px 0; padding-left: 5px; }
.agent-tasks > li > p { margin: 6px 0; }
.flow-steps { display: flex; gap: 8px; padding: 0; list-style-position: inside; font-size: 14px; color: var(--accent); }
.flow-steps li { flex: 1; min-width: 0; padding: 8px 4px; border-bottom: 2px solid var(--line); }
.task-state { display: inline-block; margin: 6px 0 0 8px; padding: 3px 8px; border-radius: 6px; font-size: 13px; background: #f1f5f9; color: #52647e; }
.task-state.done { background: #e2f6ea; color: #176139; }
.order-review { padding: 14px; margin-top: 12px; border: 2px solid var(--accent); border-radius: 10px; background: var(--soft); }
.review-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.order-review ~ button[hidden] { display: none; }
#orders-checked { display: block; margin: 8px 0; }
@media (max-width:600px) {
  .service-benefits .benefit-points span { display: none; }
  .service-benefits .flow-steps { margin: 8px 0; gap: 6px; }
  #mobile-account:has([data-command="customer_logout"]) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  #mobile-account:has([data-command="customer_logout"]) h2 { width: 100%; margin-bottom: 0; }
  #mobile-account:has([data-command="customer_logout"]) p { flex: 1; margin: 0; min-width: 0; }
  .benefit-points { gap: 6px; }
  .benefit-points li { padding: 9px 6px; }
  .benefit-points b { font-size: 14px; }
  .benefit-points span { font-size: 12px; }
  .service-benefits h2 { font-size: 20px; }
  .service-benefits .benefit-points { margin: 8px 0; }
  .service-benefits .service-help { margin: 4px 0 0; }
}
.customer-auth > summary:focus-visible { outline: 3px solid #f0aa32; outline-offset: 3px; }
.create-site-panel summary:focus-visible { outline: 3px solid #f0aa32; outline-offset: 3px; }
@media (max-width: 600px) {
  html { scroll-padding-top: 16px; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body > nav:not(.mobile-tabs) { padding: 15px 16px; gap: 12px; min-height: 52px; align-items: center; }
  body > nav:not(.mobile-tabs) a { display: inline-flex; align-items: center; min-height: 44px; }
  main { padding: 18px 14px 8px; }
  header { margin: 0 0 22px; padding: 3px 0 3px 13px; }
  header h1 { font-size: 23px; line-height: 1.4; margin: 6px 0; }
  header p { margin: 5px 0; font-size: 14px; }
  header small { font-size: 12px; letter-spacing: 1px; }
  h2 { font-size: 19px; line-height: 1.5; margin-top: 0; }
  p { font-size: 15px; }
  section, .card { padding: 18px 16px; margin-bottom: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body[data-mode="dashboard"] #app > .profit-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  body[data-mode="dashboard"] #app > .profit-summary section { padding: 12px 8px; border-radius: 9px; }
  body[data-mode="dashboard"] #app > .profit-summary p { font-size: 12px; margin: 0 0 5px; line-height: 1.5; }
  body[data-mode="dashboard"] #app > .profit-summary .money { font-size: 19px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  label { font-size: 14px; margin: 14px 0; }
  input, textarea, select { padding: 12px; border-radius: 8px; }
  form > button { width: 100%; margin-right: 0; }
  .row { padding: 17px 0; font-size: 15px; }
  .row b { display: inline-block; font-size: 16px; margin-bottom: 4px; }
  .muted { font-size: 14px; line-height: 1.75; }
  .row > button { display: block; width: 100%; margin: 10px 0 0; }
  #message:not(:empty) { position: sticky; top: 8px; z-index: 5; box-shadow: 0 3px 14px #20314e18; font-size: 15px; }
  .mobile-tabs {
    position: fixed; inset: auto 0 0; z-index: 20; display: flex; justify-content: space-around;
    gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid #dfe7f2; box-shadow: 0 -4px 20px #20314e0b;
  }
  .mobile-tabs a { display: flex; justify-content: center; align-items: center; min-height: 46px; flex: 1; color: var(--accent); border-radius: 8px; background: var(--soft); font-size: 15px; }
  .mobile-tabs a:active { background: #dbeafe; }
  [id^="mobile-"] { scroll-margin-block: 18px 96px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
