:root{
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --brand: #2A7FFF;
  --brand-contrast: #ffffff;
  --accent: #FFE03A;
  --surface: #F3F4F6;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
}

:host([theme="dark"]), [data-theme="dark"]{
  --bg:#0b0f17; --fg:#e5e7eb; --muted:#9ca3af; --surface:#111827;
  --brand:#6ea8ff; --brand-contrast:#0b0f17; --accent:#ffd85a;
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--fg);font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif}

menu-talk-root{
  display:block;
  max-width:720px;
  margin:0 auto;
  padding:16px;
}

.card{
  background:var(--surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
}

.header{
  display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;
}
.brand{
  display:flex;gap:10px;align-items:center;font-weight:700;font-size:20px;
}
.brand-badge{
  width:36px;height:36px;border-radius:9px;background:var(--brand);
  display:grid;place-items:center;color:var(--brand-contrast);font-weight:800;
}

.controls{display:flex;gap:8px;align-items:center}
select,button{
  font:inherit;border-radius:12px;border:1px solid transparent;padding:10px 14px;background:var(--bg);color:var(--fg)
}
button.primary{background:var(--brand);color:var(--brand-contrast)}
button.ghost{background:transparent;border:1px solid var(--surface)}

.grid{
  display:grid;gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
@media (min-width:720px){
  .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

.tile{
  background:#fff;border-radius:14px;border:1px solid #e5e7eb;overflow:hidden;cursor:pointer;
  display:flex;flex-direction:column;min-height:120px;transition:transform .08s ease, box-shadow .08s ease;
}
.tile:focus{outline:3px solid var(--brand);outline-offset:2px}
.tile:active{transform:translateY(1px);box-shadow:none}
.tile .thumb{font-size:40px;display:grid;place-items:center;height:72px;background:#fafafa}
.tile .label{padding:10px 12px;display:flex;justify-content:space-between;align-items:center}
.tile .name{font-weight:600}
.tile .speak{border:none;background:var(--surface);padding:6px 10px;border-radius:10px}

.footer{
  margin-top:14px;display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:space-between
}
.badge{font-size:12px;color:var(--muted)}
.kbd{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;border:1px solid #e5e7eb;padding:.1rem .4rem;border-radius:6px;background:#fff;color:#111827}

.notice{
  margin-top:12px;font-size:14px;color:var(--muted)
}

/* High-contrast toggle simulation */
.high-contrast :where(.tile,.card,button,select){
  border-color:#000 !important;background:#fff !important;color:#000 !important;
}
