/* Image Octopus v11: consistent controls, guided story flow, multi-look output. */
:root { --io-control-font: 15px; }
button, input, select, textarea { font-family: inherit; }
.choose-btn, .preview-btn, .action-btn, .flow-picker-btn,
.emoji-picker-btn, .wizard-button, .look-action, .looks-generate {
  font-size: var(--io-control-font);
  line-height: 1.3;
  text-align: center;
  font-weight: 800;
}
.choose-btn, .preview-btn, .action-btn, .emoji-picker-btn,
.wizard-button, .look-action, .looks-generate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.flow-picker-btn { align-items: center; }
#headlineInput, #namesInput, #locationInput, #dateInput { font-size: 16px; line-height: 1.35; }
#dateInput {
  display: block;
  width: 100%;
  min-height: 52px;
  background: linear-gradient(180deg,rgba(255,255,255,.15),rgba(255,255,255,.06));
  color: white;
  color-scheme: dark;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 11px 13px;
  outline: none;
}
#dateInput:focus-visible, button:focus-visible, .wizard-input:focus-visible,
.look-action:focus-visible, .looks-generate:focus-visible {
  outline: 3px solid #80bfff;
  outline-offset: 3px;
}
.io-actions { margin: 12px 0 0; display: grid; gap: 9px; }
.io-actions .io-secondary {
  width: 100%; min-height: 44px; border: 1px solid rgba(255,255,255,.23);
  border-radius: 15px; background: rgba(255,255,255,.10); color: white;
}
.io-muted { font-size: 12px; line-height: 1.45; color: #d6def0; margin: 4px 0 0; }
.wizard-modal[hidden], .looks-output[hidden] { display: none !important; }
.wizard-modal {
  position: fixed; inset: 0; z-index: 10010;
  display: grid; place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background: rgba(4,8,18,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.wizard-dialog {
  position: relative; width: min(100%, 440px); max-height: 90dvh; overflow-y: auto;
  border-radius: 25px; padding: 26px 22px 22px;
  background: linear-gradient(160deg,#263552 0%,#101725 75%);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 32px 80px rgba(0,0,0,.62);
  color: #fff;
}
.wizard-kicker { margin: 0 0 10px; font-size: 12px; font-weight: 800; color: #abd2ff; letter-spacing: .09em; text-transform: uppercase; }
.wizard-title { font-size: clamp(23px, 5vw, 29px); line-height: 1.17; margin: 0 38px 10px 0; font-weight: 800; }
.wizard-help { font-size: 14px; line-height: 1.5; min-height: 42px; color: #d8e4f5; margin: 0 0 16px; }
.wizard-progress { height: 5px; background: rgba(255,255,255,.14); border-radius: 999px; margin: 0 0 22px; overflow: hidden; }
.wizard-progress-fill { display: block; height: 100%; width: 25%; background: linear-gradient(90deg,#4da3ff,#87e7dd); transition: width 180ms ease; }
.wizard-input {
  display: block; width: 100%; min-height: 54px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28); background: #111e31;
  color: white; color-scheme: dark; font-size: 17px; padding: 12px 15px;
}
.wizard-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 0; }
.wizard-button {
  border: 1px solid rgba(255,255,255,.24); border-radius: 15px;
  min-height: 52px; color: #fff; background: rgba(255,255,255,.12);
}
.wizard-button.primary { background: linear-gradient(135deg,#2785ff,#635de9); border-color: #75b5ff; }
.wizard-close { position: absolute; right: 15px; top: 14px; width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.20); border-radius: 50%;
  background: rgba(255,255,255,.09); color: #fff; font-size: 21px; }
.looks-panel { margin-top: 12px; padding: 14px; border-radius: 17px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13); }
.looks-title { margin: 0 0 9px; font-size: 17px; font-weight: 850; }
.looks-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.looks-count { min-height: 46px; flex: 0 0 90px; color: white; background: #182336;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.22); padding: 10px; }
.looks-generate { min-height: 46px; flex: 1; padding: 10px 12px; color: white;
  border: 1px solid rgba(255,255,255,.20); border-radius: 12px; background: linear-gradient(135deg,#2563eb,#6d56d9); }
.looks-generate:disabled { opacity: .5; cursor: not-allowed; }
.looks-output { margin-top: 14px; }
.looks-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.look-card { min-width: 0; padding: 7px; border-radius: 12px; background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.15); }
.look-image { display: block; width: 100%; height: 124px; object-fit: contain; background: #121621; border-radius: 8px; }
.look-label { font-size: 12px; margin: 8px 0; color: white; text-align: center; font-weight: 800; }
.look-action { min-height: 36px; width: 100%; padding: 7px 3px; margin-top: 5px;
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.17); border-radius: 9px; font-size: 12px; }
.looks-download { width: 100%; min-height: 45px; padding: 9px; margin-top: 12px;
  border-radius: 12px; border: 1px solid #83c3ff; background: rgba(39,133,255,.25); color: white; font-size: 14px; font-weight: 850; }
.looks-status { margin: 10px 0 0; font-size: 12px; color: #d6def0; line-height: 1.45; }
@media (max-width: 520px) {
  .wizard-dialog { padding: 24px 18px 20px; }
  .looks-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .look-image { height: 142px; }
}
@media (prefers-reduced-motion: reduce) { .wizard-progress-fill { transition: none; } }

/* v11.1: flexible typography and style browser */
.io-type-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.io-type-row label { margin:0; }
.io-type-value { min-width:54px; padding:6px 9px; border-radius:10px; font-size:14px; font-weight:800; background:rgba(255,255,255,.12); text-align:center; }
.io-type-scale { display:flex; align-items:center; gap:12px; }
.io-type-scale .io-type-small { font-size:12px; color:var(--muted); }
.io-type-scale .io-type-large { font-size:21px; font-weight:800; }
#ioTextSize { flex:1; min-width:0; width:100%; height:32px; accent-color:#72bbff; cursor:pointer; }
.io-type-caption { margin:8px 0 0; color:#d6def0; line-height:1.4; font-size:12px; }
.io-style-open { width:100%; min-height:48px; margin-top:10px; background:linear-gradient(140deg,#2563eb,#6353e1); border:1px solid rgba(255,255,255,.26); border-radius:15px; color:#fff; font-size:15px; font-weight:800; }
.io-style-open[disabled] { opacity:.5; cursor:not-allowed; }
.io-style-modal[hidden] { display:none !important; }
.io-style-modal { position:fixed; inset:0; z-index:10012; padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom)); background:rgba(3,7,17,.83); backdrop-filter:blur(11px); -webkit-backdrop-filter:blur(11px); display:flex; align-items:center; justify-content:center; }
.io-style-dialog { width:min(100%,740px); max-height:93dvh; min-height:0; display:flex; flex-direction:column; gap:12px; border:1px solid rgba(255,255,255,.22); border-radius:22px; padding:18px; background:linear-gradient(170deg,#253450,#101725 75%); box-shadow:0 34px 86px rgba(0,0,0,.62); }
.io-style-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.io-style-heading h2 { margin:0 0 5px; font-size:22px; line-height:1.15; font-weight:850; }
.io-style-heading p { color:#d8e4f5; margin:0; font-size:13px; line-height:1.4; }
.io-style-close { width:40px; height:40px; flex:0 0 40px; border-radius:50%; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.24); color:#fff; font-size:23px; }
.io-style-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; overflow-y:auto; overscroll-behavior:contain; padding:3px 3px 12px; }
.io-style-card { position:relative; width:100%; min-width:0; padding:8px; border:2px solid rgba(255,255,255,.22); border-radius:16px; background:rgba(255,255,255,.075); color:#fff; text-align:center; display:flex; flex-direction:column; gap:7px; align-items:center; cursor:pointer; transition:border-color .14s,background .14s; }
.io-style-card[aria-pressed="true"] { border-color:#8ec9ff; background:rgba(51,126,230,.25); }
.io-style-card:focus-visible { outline:3px solid #80cfff; outline-offset:2px; }
.io-style-thumb { width:100%; height:175px; object-fit:contain; border-radius:9px; background:#0f1622; }
.io-style-name { font-size:14px; font-weight:850; line-height:1.3; }
.io-style-selected { color:#a9d5ff; font-weight:700; font-size:11px; min-height:15px; }
.io-style-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:3px; border-top:1px solid rgba(255,255,255,.13); }
.io-style-footer small { line-height:1.3; color:#d6def0; font-size:12px; }
.io-style-done { min-width:118px; min-height:43px; border:1px solid #8ec9ff; border-radius:12px; background:#226ce0; color:#fff; font-weight:800; }
@media(max-width:560px) {
  .io-style-dialog { padding:13px; border-radius:18px; max-height:95dvh; }
  .io-style-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .io-style-thumb { height:145px; }
  .io-style-heading h2 { font-size:20px; }
  .io-style-card { padding:6px; gap:5px; }
  .io-style-footer small { font-size:11px; }
}
@media(prefers-reduced-motion:reduce) { .io-style-card { transition:none; } }
