:root {
  --bg: #eef6fb;
  --panel: #ffffff;
  --soft: #f5f5f5;
  --line: #d4e3ec;
  --line-strong: #b8cddb;
  --ink: #1c1c1c;
  --muted: #5b6268;
  --blue: #008dcf;
  --blue-deep: #00628f;
  --blue-pale: #e6f5fc;
  --warn: #8a5a00;
  --warn-bg: #fff8ec;
  --warn-line: #ecd6ae;
  --radius: 16px;
  color-scheme: light;
  font-family: Arial, 'Geeza Pro', Tahoma, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.65 }
button, input, select, textarea { font: inherit }
button, a, input, select, summary { touch-action: manipulation }
button, a { -webkit-tap-highlight-color: transparent }
button { cursor: pointer }
button:disabled, select:disabled, input:disabled, textarea:disabled {
  opacity: 1; cursor: not-allowed; background: #eceff1; color: #9aa1a7;
  border-color: #dfe4e8; box-shadow: none;
}
.btn:disabled { background: #c9d3da; color: #f4f7f9 }
a { color: var(--blue-deep) }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px }
[hidden] { display: none !important }

.wrap { max-width: 1080px; margin: auto; padding: 32px 24px 160px }
.top { display: flex; justify-content: space-between; align-items: center; gap: 20px }
.logo { display: block; width: 150px; height: auto }
.lang { border: 1px solid var(--blue); background: #fff; color: var(--blue-deep); padding: 10px 18px; border-radius: 30px; min-height: 44px; font-weight: bold }
.lang:hover:not(:disabled) { background: var(--blue-pale) }

.intro { background: var(--blue-pale); border: 1px solid #bfe3f4; border-radius: 22px; padding: 28px 28px 14px; margin: 26px 0 8px }
.intro .lede { color: #23404f }
.eyebrow { color: var(--blue-deep); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.14; max-width: 760px; margin: 0 0 24px; letter-spacing: -.01em }
h2 { font-size: 28px; margin: 44px 0 8px }
h3 { font-size: 21px; margin: 0 0 6px }
p { margin: 0 0 16px }
.lede { font-size: 18px; max-width: 740px; color: var(--muted) }
.muted { color: var(--muted) }
.small { font-size: 14px }
.hint { color: var(--blue-deep); margin: 12px 0 0 }

.review, .notice { border: 1px solid var(--line); background: #fff; padding: 16px 18px; border-radius: 12px; margin: 22px 0 }
.review { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line) }

.steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 }
.steps span { border: 1px solid var(--line); background: #fff; padding: 10px 16px; border-radius: 30px; font-size: 14px; color: var(--blue-deep) }
.steps span.on { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; font-weight: bold }

.addrow { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line) }
.addrow .fit { flex: 1 1 200px; margin: 0; color: var(--muted) }
.addrow .fit select { margin-top: 6px }
.qtyrow { display: flex; flex-direction: column; gap: 6px }
.addrow .add { flex: 1 1 200px }
.added { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--blue); background: var(--blue-pale); color: var(--blue-deep); font-size: 14px; font-weight: bold }

.sizebox { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft) }
.sizehead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px }
.sizebox p { margin: 8px 0 0 }
.sizebox .warn { color: var(--warn) }
.link { background: none; border: 0; color: var(--blue-deep); font-size: 14px; font-weight: bold; text-decoration: underline; padding: 8px 2px; min-height: 40px }
dialog#guide { border: 0; padding: 0; background: transparent; max-width: 520px; width: calc(100% - 32px) }
dialog#guide::backdrop { background: rgba(10, 40, 55, .55) }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; color: var(--ink) }
.modal h3 { color: var(--blue-deep) }
ul.guide { margin: 12px 0; padding-inline-start: 22px }
ul.guide li { margin-bottom: 8px }

.nav { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 0 }
.nav a, .nav .tab {
  text-decoration: none; padding: 11px 20px; font-weight: bold; border-radius: 28px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--blue-deep);
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { border-color: var(--blue); background: var(--blue-pale) }
.nav .tab.active { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px }
.product, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px }
.product { box-shadow: 0 2px 10px rgba(0, 98, 143, .07) }

.photo { height: 255px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; display: flex; align-items: center; justify-content: center; padding: 10px }
.photo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain }
.photo.empty { background: var(--soft); color: var(--muted); text-align: center; padding: 35px; border: 1px dashed var(--line-strong) }
.photo-label { font-size: 14px; color: var(--muted); margin-top: -8px; min-height: 23px }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-strong); border-radius: 26px; color: var(--ink);
  background: #fff; font-size: 14px; padding: 9px 16px; min-height: 46px;
  transition: background .12s, border-color .12s, transform .08s;
}
.chip .sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(28,28,28,.25); flex: none; display: inline-block }
.chip .tick { width: 14px; font-weight: bold; color: var(--blue-deep) }
.chip:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-pale) }
.chip:active:not(:disabled) { transform: scale(.96) }
.chip[aria-pressed=true] { border-color: var(--blue); background: var(--blue-pale); color: var(--blue-deep); box-shadow: inset 0 0 0 2px var(--blue); font-weight: bold }

.tag { font-size: 13px; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 20px; padding: 5px 12px; display: inline-block; margin-bottom: 10px }
.picks { margin-top: 6px }
.pick { border: 1px solid var(--blue); background: var(--blue-pale); border-radius: 12px; margin-top: 14px; padding: 14px 16px }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.pick-head b { display: inline-flex; align-items: center; gap: 8px }
.quantity { display: flex; align-items: center; gap: 10px }
.quantity .qty { min-width: 46px; text-align: center; font-weight: bold; color: var(--blue-deep) }
.quantity button { min-width: 44px; min-height: 44px; background: #fff; border: 1px solid var(--blue); color: var(--blue-deep); border-radius: 10px; font-weight: bold }
.remove { color: #a4231b; background: #fff; border: 1px solid #e3b5b1; border-radius: 10px; padding: 10px 14px; min-height: 44px; font-size: 14px; margin-top: 12px }
.remove:hover:not(:disabled) { background: #fdf2f1 }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px }
label { display: block; margin: 0 0 8px }
input, select, textarea { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); min-height: 48px }
input:focus, select:focus, textarea:focus { border-color: var(--blue) }
input[type=checkbox] { width: 22px; height: 22px; min-height: 22px; flex: none; accent-color: var(--blue) }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center }
.btn { background: var(--blue-deep); color: #fff; border: 0; border-radius: 12px; padding: 14px 26px; min-height: 48px; font-weight: bold; text-decoration: none; display: inline-flex; align-items: center; justify-content: center }
.btn:hover:not(:disabled) { background: #004e73 }
.ghost { background: #fff; color: var(--blue-deep); border: 1px solid var(--blue) }
.ghost:hover:not(:disabled) { background: var(--blue-pale) }

.sticky { position: fixed; bottom: 0; left: 0; right: 0; background: #ffffffF2; border-top: 1px solid var(--line-strong); box-shadow: 0 -2px 14px rgba(0, 98, 143, .12); z-index: 5; padding: 14px 24px max(14px, env(safe-area-inset-bottom)) }
.sticky > div { max-width: 1032px; margin: auto; display: flex; gap: 18px; justify-content: space-between; align-items: center }
.sticky b { color: var(--blue-deep); font-size: 20px }

.result { white-space: pre-wrap; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 22px; margin-top: 20px }
.error { color: #a4231b }
.foot { border-top: 1px solid var(--line-strong); padding-top: 26px; margin-top: 48px; font-size: 14px; color: var(--muted) }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }

.table-wrap { overflow: auto }
table { width: 100%; border-collapse: collapse; font-size: 14px }
th, td { text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); padding: 12px 10px }
th { color: var(--muted) }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 }
.stat { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px }
.stat b { display: block; font-size: 26px; color: var(--blue-deep) }
.filters { display: flex; gap: 16px; flex-wrap: wrap; align-items: end }
.filters > label { flex: 1 }
.admin { max-width: 1400px }
.admin .wrap { max-width: 1400px }
.details { white-space: pre-wrap }
.admin select { min-width: 145px }
details { margin: 10px 0 }
summary { cursor: pointer; color: var(--blue-deep) }

html[dir=rtl] .eyebrow { letter-spacing: 0 }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr }
}
@media (max-width: 640px) {
  .wrap { padding: 20px 16px 150px }
  .fields { grid-template-columns: 1fr }
  .intro { padding: 20px 18px 6px; border-radius: 18px }
  .photo { height: 240px }
  .product { padding: 18px }
  .logo { width: 128px }
  .sticky { padding: 12px 16px }
  .sticky .btn { padding: 12px 18px }
  .stats { grid-template-columns: 1fr 1fr }
  .pick-head { flex-wrap: wrap }
  h1 { font-size: 34px }
  .filters > label { min-width: 100% }
}
.brand { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; direction: ltr; width: max-content }
.sample { margin: 2px 0 6px; font-size: 13px }
.powered { unicode-bidi: plaintext; font-size: 12px; line-height: 1.2; color: var(--muted); letter-spacing: .02em }
#nav { position: sticky; top: 0; z-index: 4; background: var(--bg); padding: 10px 0; margin: 0 -4px; padding-inline: 4px; flex-wrap: nowrap; overflow-x: auto; border-bottom: 1px solid var(--line) }
#nav .tab { flex: none; min-height: 40px; padding: 8px 16px }
.totop { position: fixed; bottom: 96px; inset-inline-end: 18px; z-index: 6; background: #fff; color: var(--blue-deep); border: 1px solid var(--blue); border-radius: 24px; padding: 10px 16px; min-height: 44px; font-weight: bold; font-size: 14px; box-shadow: 0 2px 10px rgba(0,98,143,.15) }
.totop:hover { background: var(--blue-pale) }
html { scroll-padding-top: 76px }
.usage { margin: 4px 0 10px; color: var(--ink); font-size: 15px; line-height: 1.5 }
.price{margin:10px 0 4px}.price p{margin:0}.price b{font-size:16px}
.subtotal{margin-top:14px;padding:14px 16px;background:var(--blue-pale);border:1px solid var(--line);border-radius:12px}.subtotal p{margin:2px 0}
