.tmb-widget {
  --tmb-accent: #b8860b;
  --tmb-ink: #342b1f;
  --tmb-muted: #726857;
  --tmb-border: #eadfc9;
  --tmb-soft: #fffaf0;
  box-sizing: border-box;
  width: 100%;
  margin: 28px auto;
  overflow: hidden;
  color: var(--tmb-ink);
  background: #fff;
  border: 1px solid var(--tmb-border);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(80, 57, 22, .10);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  line-height: 1.75;
}

.tmb-widget *,
.tmb-widget *::before,
.tmb-widget *::after { box-sizing: border-box; }

.tmb-widget__header {
  padding: 28px 26px 22px;
  text-align: center;
  background:
    radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--tmb-accent) 18%, transparent), transparent 30%),
    linear-gradient(145deg, #fffdf8, var(--tmb-soft));
}

.tmb-widget__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--tmb-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.tmb-widget__title {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--tmb-ink) !important;
  background: none !important;
  border: 0 !important;
  font-size: clamp(22px, 4vw, 30px) !important;
  line-height: 1.35 !important;
}

.tmb-widget__lead {
  max-width: 680px;
  margin: 10px auto 0 !important;
  color: var(--tmb-muted);
  font-size: 14px;
}

.tmb-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 22px 26px 8px;
}

.tmb-form__field { flex: 1 1 280px; }
.tmb-form__field label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 800;
}

.tmb-form__date {
  width: 100%;
  min-height: 50px;
  padding: 9px 13px;
  color: var(--tmb-ink);
  background: #fff;
  border: 1px solid #cfc3af;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}

.tmb-form__date:focus {
  border-color: var(--tmb-accent);
  outline: 3px solid color-mix(in srgb, var(--tmb-accent) 18%, transparent);
}

.tmb-form__submit {
  flex: 0 0 auto;
  min-height: 50px;
  padding: 10px 24px;
  color: #fff;
  background: var(--tmb-accent);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--tmb-accent) 26%, transparent);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  transition: transform .18s ease, filter .18s ease;
}

.tmb-form__submit:hover { filter: brightness(.92); transform: translateY(-1px); }
.tmb-form__submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--tmb-accent) 28%, transparent); outline-offset: 3px; }

.tmb-form__error {
  flex-basis: 100%;
  margin: 0 !important;
  color: #a22626;
  font-size: 13px;
  font-weight: 700;
}

.tmb-widget__privacy {
  margin: 0 26px 20px !important;
  color: var(--tmb-muted);
  font-size: 12px;
  text-align: center;
}

.tmb-result { padding: 0 26px 26px; outline: none; }
.tmb-result__intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-top: 18px;
  border-top: 1px dashed var(--tmb-border);
}

.tmb-result__intro span {
  padding: 3px 10px;
  color: #fff;
  background: var(--tmb-accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.tmb-result__intro p { margin: 0 !important; color: var(--tmb-muted); font-size: 13px; }

.tmb-panel {
  margin: 16px 0 0;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--tmb-border);
  border-radius: 15px;
}

.tmb-panel__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tmb-panel__icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--tmb-accent);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
}

.tmb-panel__heading p { margin: 0 !important; color: var(--tmb-muted); font-size: 12px; }
.tmb-panel__heading h4 {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--tmb-ink) !important;
  background: none !important;
  border: 0 !important;
  font-size: 19px !important;
  line-height: 1.4 !important;
}

.tmb-summary { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: center; gap: 24px; }
.tmb-score { display: flex; align-items: center; gap: 13px; }
.tmb-score__ring {
  --tmb-score: 50;
  display: grid;
  position: relative;
  flex: 0 0 98px;
  width: 98px;
  height: 98px;
  place-content: center;
  color: var(--tmb-accent);
  background: radial-gradient(circle closest-side, #fff 77%, transparent 79% 100%), conic-gradient(var(--tmb-accent) calc(var(--tmb-score) * 1%), #eee5d5 0);
  border-radius: 50%;
  text-align: center;
}

.tmb-score__number { font-size: 30px; font-weight: 900; line-height: 1; }
.tmb-score__unit { font-size: 11px; font-weight: 800; }
.tmb-score__copy span { display: block; color: var(--tmb-muted); font-size: 12px; }
.tmb-score__copy strong { display: block; color: var(--tmb-accent); font-size: 17px; }
.tmb-summary__text p { margin: 10px 0 0 !important; font-size: 14px; }
.tmb-trend { display: inline-block; padding: 4px 10px; color: var(--tmb-ink); background: var(--tmb-soft); border-radius: 999px; font-size: 13px; }
.tmb-trend strong { color: var(--tmb-accent); }

.tmb-chart { margin-top: 22px; overflow-x: auto; }
.tmb-chart svg { display: block; width: 100%; min-width: 560px; height: auto; overflow: visible; }
.tmb-chart__grid { stroke: #eee4d3; stroke-width: 1; stroke-dasharray: 6 6; }
.tmb-chart__line { fill: none; stroke: var(--tmb-accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.tmb-chart__point { fill: #fff; stroke: var(--tmb-accent); stroke-width: 3; }
.tmb-chart__point--today { fill: var(--tmb-accent); }
.tmb-chart__value { fill: var(--tmb-ink); font-size: 12px; font-weight: 800; text-anchor: middle; }
.tmb-chart__label { fill: var(--tmb-muted); font-size: 10px; text-anchor: middle; }

.tmb-rank-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--tmb-soft);
  border-radius: 12px;
  text-align: left;
}
.tmb-rank-hero > span { color: var(--tmb-accent); font-size: 48px; line-height: 1; }
.tmb-rank-hero p { margin: 0 !important; color: var(--tmb-muted); font-size: 13px; }
.tmb-rank-hero strong { display: block; color: var(--tmb-accent); font-size: 27px; line-height: 1.25; }
.tmb-ranking { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 !important; padding: 0 !important; list-style: none !important; counter-reset: none !important; }
.tmb-ranking__item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; min-height: 44px; margin: 0 !important; padding: 7px 10px; background: #faf8f3; border: 1px solid transparent; border-radius: 9px; font-size: 13px; }
.tmb-ranking__item::before { display: none !important; }
.tmb-ranking__item.is-you { position: relative; background: var(--tmb-soft); border-color: var(--tmb-accent); }
.tmb-ranking__rank { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; background: #988c79; border-radius: 50%; font-size: 11px; font-weight: 800; }
.tmb-ranking__item:nth-child(-n+3) .tmb-ranking__rank { background: var(--tmb-accent); }
.tmb-ranking__sign { font-weight: 700; }
.tmb-ranking__score { color: var(--tmb-muted); font-weight: 700; }
.tmb-ranking__you { grid-column: 2 / 4; color: var(--tmb-accent); font-size: 10px; font-weight: 800; line-height: 1; }

.tmb-chance { padding: 24px 18px; background: linear-gradient(145deg, var(--tmb-soft), #fff); border: 1px solid var(--tmb-border); border-radius: 14px; text-align: center; }
.tmb-chance__label { display: block; color: var(--tmb-muted); font-size: 12px; font-weight: 700; }
.tmb-chance > strong { display: block; margin: 3px 0 9px; color: var(--tmb-accent); font-size: clamp(29px, 7vw, 42px); line-height: 1.25; letter-spacing: .03em; }
.tmb-chance p { margin: 0 !important; font-size: 14px; }
.tmb-advice { margin: 13px 0 0 !important; color: var(--tmb-muted); font-size: 13px; }

.tmb-factors { display: grid; gap: 13px; margin-top: 21px; }
.tmb-factor__label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 13px; }
.tmb-factor__label strong { color: var(--tmb-accent); }
.tmb-factor__track { height: 9px; overflow: hidden; background: #eee7dc; border-radius: 999px; }
.tmb-factor__track span { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--tmb-accent) 55%, white), var(--tmb-accent)); border-radius: inherit; }
.tmb-warning { margin: 20px 0 0 !important; padding: 13px 15px; color: #69552e; background: #fff8df; border-left: 4px solid #d7a91c; border-radius: 6px; font-size: 12px; }
.tmb-warning strong { display: block; }

.tmb-main-number { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 18px; background: var(--tmb-soft); border-radius: 13px; }
.tmb-main-number span { color: var(--tmb-muted); font-size: 13px; font-weight: 700; }
.tmb-main-number strong { display: grid; width: 70px; height: 70px; place-items: center; color: #fff; background: var(--tmb-accent); border-radius: 50%; box-shadow: 0 7px 18px color-mix(in srgb, var(--tmb-accent) 25%, transparent); font-size: 34px; }
.tmb-lottery { margin-top: 18px; text-align: center; }
.tmb-lottery > p { margin: 0 0 10px !important; color: var(--tmb-muted); font-size: 13px; }
.tmb-number-balls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tmb-number-ball { display: grid; width: 43px; height: 43px; place-items: center; color: var(--tmb-accent); background: #fff; border: 2px solid var(--tmb-accent); border-radius: 50%; font-size: 15px; font-weight: 900; }
.tmb-disclaimer { margin: 18px 0 0 !important; padding: 13px 15px; color: var(--tmb-muted); background: #f7f5f1; border-radius: 8px; font-size: 11px; }
.tmb-widget__noscript { margin: 20px 26px !important; color: #a22626; }

@media (max-width: 640px) {
  .tmb-widget { border-radius: 14px; }
  .tmb-widget__header { padding: 23px 18px 18px; }
  .tmb-form { flex-direction: column; align-items: stretch; padding: 18px 18px 7px; }
  .tmb-form__field { flex-basis: auto; }
  .tmb-form__submit { width: 100%; }
  .tmb-widget__privacy { margin: 0 18px 17px !important; }
  .tmb-result { padding: 0 14px 18px; }
  .tmb-result__intro { align-items: flex-start; flex-direction: column; }
  .tmb-panel { padding: 17px 14px; }
  .tmb-summary { grid-template-columns: 1fr; gap: 14px; }
  .tmb-score { justify-content: center; }
  .tmb-summary__text { text-align: center; }
  .tmb-ranking { grid-template-columns: 1fr; }
  .tmb-chance > strong { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .tmb-form__submit { transition: none; }
}

