/* CasioLens Warranty OS — base (templates may override) */
.clwo-shell {
  --clwo-ink: #1a2332;
  --clwo-muted: #5c6b7a;
  --clwo-line: #e8eef4;
  --clwo-p: #0b3a6e;
  font-family: "Inter", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  color: var(--clwo-ink);
  max-width: min(860px, 100%);
  margin: 0 auto;
  padding: 28px 16px 48px;
  box-sizing: border-box;
}
.clwo-shell *, .clwo-shell *::before, .clwo-shell *::after { box-sizing: border-box; }

.clwo-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 16px;
}
.clwo-modal[hidden] { display: none !important; }
.clwo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.clwo-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 96vw);
  max-height: min(92dvh, 900px);
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
  border-radius: 18px;
  border: 1px solid #e8eef4;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  padding: 20px 22px 16px;
  color: #1a2332;
  animation: clwoPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes clwoPop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.clwo-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  color: #475569;
  z-index: 2;
}
.clwo-modal-close:hover { background: #f1f5f9; }

#clwo-toast-host {
  position: fixed;
  z-index: 100000;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.clwo-toast {
  pointer-events: auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
.clwo-toast--ok {
  border-color: #a7f3d0;
  color: #047857;
  background: #ecfdf5;
}
body.clwo-modal-open { overflow: hidden; }

.clwo-result-inline {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #e8eef4;
  background: linear-gradient(180deg, #fff, #f7f9fc);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

@media (max-width: 600px) {
  .clwo-shell { padding: 16px 12px 32px; }
  .clwo-modal-panel { padding: 22px 16px 16px; border-radius: 16px; }
  #clwo-toast-host { top: auto; bottom: 16px; left: 16px; right: 16px; max-width: none; }
}

@media print {
  body * { visibility: hidden; }
  .clwo-modal, .clwo-modal *, .clwo-result-inline, .clwo-result-inline * { visibility: visible; }
  .clwo-modal { position: static; display: block !important; padding: 0; }
  .clwo-modal-backdrop, .clwo-modal-close { display: none !important; }
  .clwo-modal-panel { box-shadow: none; border: 0; max-height: none; width: 100%; }
}
