:root{
  color-scheme:dark;
  font-family:system-ui,-apple-system,sans-serif;
  background:#0f1015;
  color:#f8ecdc;
  --gold:#d8b57a;
  --gold-soft:#b8905f;
  --line:rgba(232,210,181,.28);
  --glass:rgba(175,165,147,.28);
  --panel:rgba(118,110,97,.42);
  --card1:#342831;
  --card2:#231d27;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  min-height:100vh;
  color:#f8ecdc;
  background:
    linear-gradient(rgba(5,8,18,.52),rgba(8,10,18,.68)),
    radial-gradient(circle at 50% 0%, rgba(251,236,193,.18), transparent 38%),
    url('/emmaus-road-clear.webp') center/cover no-repeat fixed,
    #0f1015;
}
a{color:#f3d39d;text-decoration:none}
.tools-shell{
  width:min(100%, 760px);
  margin:0 auto;
  padding:24px 14px 34px;
}
.tools-modal{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  border:1px solid rgba(243,224,201,.34);
  background:linear-gradient(180deg, rgba(186,179,164,.58), rgba(116,108,97,.58));
  box-shadow:0 18px 50px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}
.modal-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:22px 22px 18px;
  background:linear-gradient(180deg, rgba(221,220,214,.34), rgba(188,184,176,.12));
  border-bottom:1px solid rgba(247,241,232,.26);
}
.modal-title{
  font:700 clamp(1.8rem,4.6vw,2.35rem) Georgia,serif;
  letter-spacing:.01em;
  color:#f8f0e2;
  text-shadow:0 2px 10px rgba(0,0,0,.35);
}
.modal-title span{opacity:.96}
.close-bubble{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:72px;
  height:72px;
  border-radius:999px;
  border:2px solid rgba(193,232,245,.9);
  background:radial-gradient(circle at 30% 30%, rgba(232,232,225,.28), rgba(129,123,116,.42));
  box-shadow:0 0 0 4px rgba(196,233,244,.16), inset 0 1px 0 rgba(255,255,255,.18);
  color:#f2f3f6;
  font-size:1.65rem;
  line-height:1;
}
.modal-body{padding:20px 20px 12px}
.intro-copy p{
  margin:0 0 18px;
  font-size:clamp(1rem,2.7vw,1.08rem);
  line-height:1.45;
  color:#f1e5d6;
  text-shadow:0 1px 5px rgba(0,0,0,.24);
}
.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.grid button{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
  min-height:154px;
  padding:18px 18px 16px;
  border-radius:22px;
  border:1.5px solid rgba(197,160,111,.72);
  background:
    radial-gradient(circle at 0% 0%, rgba(100,72,90,.22), transparent 50%),
    linear-gradient(145deg,var(--card1),var(--card2));
  color:#fff6ea;
  text-align:left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 10px 22px rgba(0,0,0,.25);
  cursor:pointer;
}
.grid button:hover,.grid button:focus-visible{
  border-color:#f0d2a0;
  outline:2px solid rgba(240,210,160,.32);
  outline-offset:2px;
  transform:translateY(-1px);
}
.grid b{
  font-size:1.55rem;
  line-height:1;
  color:#efca84;
  font-weight:700;
}
.grid strong{
  font-size:clamp(1.08rem,3vw,1.18rem);
  line-height:1.14;
  overflow-wrap:anywhere;
}
.grid small{
  color:#e0d0c1;
  font-size:clamp(.90rem,2.25vw,.98rem);
  line-height:1.35;
}
.tool-panel{
  background:linear-gradient(180deg, rgba(37,28,41,.96), rgba(28,22,32,.98));
  border:1px solid rgba(197,160,111,.72);
  border-radius:22px;
  margin-top:14px;
  padding:18px;
  min-height:250px;
  box-shadow:0 10px 25px rgba(0,0,0,.22);
}
.tool-panel h2{font:700 clamp(1.8rem,4vw,2rem) Georgia,serif;margin:12px 0 10px}
.tool-panel p{line-height:1.6;color:#ddd0c0}
button,.action{cursor:pointer}
#back,.action{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:42px;max-width:100%;padding:10px 15px;margin:4px 6px 4px 0;
  background:#3b2c31;border:1px solid #c79f6b;color:#ffdfae;border-radius:12px;
  box-shadow:inset 0 1px rgba(255,255,255,.07);white-space:normal;text-align:center
}
#back:focus-visible,.action:focus-visible{outline:2px solid #efc985;outline-offset:2px}
.fields{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.fields input,.fields select,textarea{background:#130f17;color:#f9edda;border:1px solid #8b7053;border-radius:10px;padding:10px;min-width:0}.fields input{width:85px}.fields select{min-width:140px;flex:2}input[type=search]{flex:1;width:100%}textarea{width:100%;min-height:135px}blockquote{font:22px/1.5 Georgia,serif;border-left:3px solid #dfba75;padding:12px 18px;background:#1c1720;margin:14px 0}.item{padding:12px 3px;border-bottom:1px solid #6e5845}.item p{margin:4px 0}.item strong{color:#f1d19c}
.modal-footer{
  padding:8px 20px 18px;
}
.footer-note{
  margin:0 0 12px;
  font-size:.90rem;
  color:#ddd2c4;
}
.footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.footer-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 14px;
  border:1px solid rgba(197,160,111,.72);
  border-radius:12px;
  background:rgba(35,28,39,.72);
}
.hidden,[hidden]{display:none!important}
@media(max-width:480px){
  .tools-shell{padding:14px 10px 24px}
  .modal-topbar{padding:18px 18px 14px}
  .modal-body{padding:16px 16px 10px}
  .modal-footer{padding:6px 16px 16px}
  .close-bubble{width:58px;height:58px;font-size:1.35rem}
  .grid{gap:12px}
  .grid button{min-height:146px;padding:16px 15px 14px;border-radius:20px}
}
@media(max-width:360px){
  .grid button{min-height:136px;padding:13px 11px}
  .grid strong{font-size:1rem}
  .grid small{font-size:.85rem}
}
@media(min-width:760px){
  .tools-shell{width:min(100%, 860px)}
}
@media(prefers-reduced-motion:reduce){
  .grid button,.close-bubble{transition:none}
}
