/* Clean options page layout. The values follow one compact mobile scale. */
body.seconds-mode {
  background: #f4f6fb;
  padding-bottom: 74px;
  overflow-x: hidden;
}

body.seconds-mode .topbar,
body.seconds-mode .bottom-nav {
  display: none !important;
}

/* Keep validation messages clear of the fixed trading controls. */
body.seconds-mode #toast {
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 110;
  width: min( calc(100vw - 32px), 520px );
  max-width: calc(100vw - 32px);
  text-align: center;
  white-space: normal;
  line-height: 1.45;
}

body.seconds-mode main {
  max-width: 728px;
  margin: 0 auto;
  padding: 0;
  overflow-x: hidden;
}

.seconds-page {
  max-width: 728px !important;
  min-height: 100vh;
  margin: 0 auto !important;
  padding: 0 !important;
  color: #6f7884;
  overflow-x: hidden;
}

.seconds-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
}

.seconds-header .back-button {
  position: absolute;
  left: 15px;
  top: 17px;
  width: 48px;
  height: 48px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: #f6f7fb url("assets/back-button-user-reference.png?v=20260830-3") center / 46px 40px no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  box-shadow: none !important;
}

.seconds-header select {
  width: min(330px, 72vw);
  max-width: 330px;
  padding: 0 30px;
  border: 0;
  background: transparent;
  appearance: none;
  color: #707985;
  text-align: center;
  text-align-last: center;
  font-size: 30px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seconds-stat-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 33.5%) minmax(0, 66.5%);
  min-height: 174px;
  margin: 8px 15px 45px;
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
}

.seconds-stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 42px;
  width: 4px;
  height: 88px;
  background: #3f9a61;
}

.seconds-stat-card::after {
  content: "";
  position: absolute;
  left: 33.5%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #edf0f4;
}

.seconds-main-price {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0 8px 0 27px;
}

.seconds-main-price strong {
  min-width: 0;
  overflow: hidden;
  color: #3f8e5c;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seconds-main-price span {
  margin-top: 9px;
  font-size: 20px;
  font-weight: 800;
}

.seconds-stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-content: center;
  gap: 10px 36px;
  min-width: 0;
  padding: 20px 28px 20px 72px;
}

.seconds-stats-grid::before {
  content: "";
  position: absolute;
  left: 0;
  top: 62px;
  width: 20px;
  height: 20px;
  border-right: 1px solid #edf0f4;
  border-top: 1px solid #edf0f4;
  background: #fff;
  transform: translateX(-10px) rotate(45deg);
}

.seconds-stats-grid span,
.seconds-stats-grid strong {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seconds-stats-grid span {
  color: #737d88;
  font-size: 14px;
  line-height: 1.42;
}

.seconds-stats-grid strong {
  display: block;
  color: #717a85;
  font-size: 17px;
  font-weight: 500;
}

.seconds-trend-tabs {
  display: flex;
  align-items: center;
  gap: 27px;
  margin: 0 7px 9px;
  color: #050609;
  font-size: 24px;
  line-height: 1.5;
  white-space: nowrap;
}

.seconds-trend-tabs button {
  position: relative;
  flex: 0 0 auto;
  padding: 0 0 9px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.seconds-trend-tabs button.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 22px;
  height: 5px;
  border-radius: 5px;
  background: #4aa371;
  transform: translateX(-50%);
}

.seconds-kline {
  height: 303px;
  margin: 0 0 90px;
  background: #fff;
  overflow: hidden;
}

.seconds-kline svg {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  overflow: hidden;
  touch-action: none;
}

.seconds-orders {
  min-height: 120px;
  margin: 0;
  padding: 0 20px 24px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.seconds-orders h2 {
  margin: 0 0 34px;
  color: #707985;
  font-size: 23px;
  font-weight: 500;
  text-align: center;
}

.seconds-orders h2::before,
.seconds-orders h2::after {
  content: "";
  display: inline-block;
  width: 64px;
  height: 1px;
  margin: 0 11px;
  background: #7d858e;
  vertical-align: middle;
}

.seconds-orders .seconds-empty-figure {
  display: none;
}

.seconds-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #eef1f3;
  background: transparent;
}

.seconds-order small {
  display: block;
  margin-top: 4px;
  color: #939ca7;
  font-size: 12px;
}

.seconds-order > div:last-child {
  text-align: right;
}

.seconds-order.active > div:last-child strong,
.seconds-order.WIN > div:last-child strong {
  color: #299553;
}

.seconds-order.LOSE > div:last-child strong {
  color: #ef3f46;
}

.seconds-bottom-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  max-width: 728px;
  margin: 0 auto;
  padding: 9px 15px;
  background: #fff;
}

.seconds-bottom-actions button {
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
}

.seconds-bottom-actions button.locked {
  opacity: 0.72;
  filter: saturate(0.88);
}

.seconds-bottom-actions button.locked:active {
  transform: none;
}

.seconds-bottom-actions button:first-child {
  background: #77808a;
}

.seconds-bottom-actions button:nth-child(2) {
  background: #d2454f;
}

.seconds-bottom-actions button:nth-child(3) {
  background: #3d8c58;
}

@media (max-width: 700px) {
  .seconds-header {
    height: 82px;
  }

  .seconds-header select {
    width: min(270px, 66vw);
    padding-inline: 24px;
    font-size: 23px;
  }

  .seconds-stat-card {
    min-height: 150px;
    margin: 8px 16px 28px;
  }

  .seconds-main-price {
    padding-left: 20px;
    padding-right: 6px;
  }

  .seconds-main-price strong {
    font-size: 23px;
    line-height: 1.3;
  }

  .seconds-main-price span {
    margin-top: 4px;
    font-size: 17px;
  }

  .seconds-stats-grid {
    gap: 8px 14px;
    padding: 16px 16px 16px 48px;
  }

  .seconds-stats-grid span {
    font-size: 12px;
  }

  .seconds-stats-grid strong {
    font-size: 15px;
  }

  .seconds-trend-tabs {
    gap: 16px;
    margin: 0 8px 8px;
    font-size: 19px;
  }
}

@media (max-width: 430px) {
  .seconds-header {
    height: 78px;
  }

  .seconds-header .back-button {
    left: 16px;
    top: 14px;
    width: 42px;
    height: 42px;
  }

  .seconds-header select {
    width: min(260px, 66vw);
    font-size: 22px;
  }

  .seconds-stat-card {
    grid-template-columns: minmax(0, 33.5%) minmax(0, 66.5%);
    min-height: 146px;
    margin: 8px 16px 26px;
  }

  .seconds-stat-card::before {
    top: 38px;
    height: 80px;
  }

  .seconds-main-price {
    padding-left: 22px;
  }

  .seconds-main-price strong {
    font-size: 22px;
  }

  .seconds-main-price span {
    margin-top: 4px;
    font-size: 17px;
  }

  .seconds-stats-grid {
    gap: 7px 9px;
    padding: 16px 10px 16px 34px;
  }

  .seconds-stats-grid::before {
    top: 55px;
  }

  .seconds-stats-grid span {
    font-size: 11px;
  }

  .seconds-stats-grid strong {
    font-size: 14px;
  }

  .seconds-trend-tabs {
    gap: 14px;
    margin-left: 8px;
    font-size: 18px;
  }

  .seconds-kline {
    height: 286px;
    margin-bottom: 64px;
  }

  .seconds-orders {
    min-height: 100px;
    padding-inline: 16px;
  }

  .seconds-orders h2 {
    margin-bottom: 24px;
    font-size: 21px;
  }

  .seconds-orders h2::before,
  .seconds-orders h2::after {
    width: 48px;
    margin-inline: 8px;
  }

  .seconds-bottom-actions {
    gap: 28px;
    padding-inline: 16px;
  }

  .seconds-bottom-actions button {
    height: 50px;
    font-size: 22px;
  }
}

/* Keep the holdings heading above the fixed action bar on short screens. */
@media (min-width: 431px) and (max-height: 870px) {
  .seconds-kline {
    margin-bottom: 60px;
  }
}
.back-button,
.seconds-header .back-button,
.payout-page-head .back-button,
.about-page .profile-subpage-head .back-button,
.profile-subpage-head .back-button{
  width:42px!important;
  height:42px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:#f6f7fb url("assets/back-button-user-reference.png?v=20260830-3") center/100% 100% no-repeat!important;
  color:transparent!important;
  font-size:0!important;
  line-height:0!important;
  box-shadow:none!important;
}
.back-button::before,
.back-button::after{display:none!important}

/* Post-order price movement panel. The order itself remains server-settled. */
.seconds-order-animation{
  position:fixed;
  inset:0;
  z-index:80;
  display:grid;
  place-items:start center;
  padding:18px 14px;
  background:#17231d26;
  opacity:0;
  visibility:hidden;
  transition:opacity .18s ease,visibility .18s ease;
  pointer-events:none;
}
.seconds-order-animation.show{opacity:1;visibility:visible;pointer-events:auto}
.seconds-order-animation-panel{
  width:min(560px,calc(100vw - 28px));
  margin-top:clamp(14px,8vh,64px);
  padding:18px 18px 14px;
  border:1px solid #e5ebe8;
  border-radius:18px;
  background:#fff;
  box-shadow:0 18px 55px #1b302744;
  transform:translateY(-8px);
  transition:transform .22s ease;
}
.seconds-order-animation.show .seconds-order-animation-panel{transform:translateY(0)}
.seconds-order-animation-panel header,
.seconds-order-animation-meta,
.seconds-order-animation-price,
.seconds-order-animation-panel footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.seconds-order-animation-panel header small{display:block;color:#7a8790;font-size:11px}
.seconds-order-animation-panel header strong{display:block;margin-top:3px;color:#1f2b34;font-size:18px}
.seconds-order-animation-panel header button{width:30px;height:30px;border:0;border-radius:50%;background:#f3f5f6;color:#69757e;font-size:22px;line-height:1;cursor:pointer}
.seconds-order-animation-meta{justify-content:flex-start;margin-top:14px;color:#7b8790;font-size:12px}
.seconds-order-animation-meta span:first-child{padding:4px 10px;border-radius:999px;font-weight:800}
.seconds-order-animation-meta span:first-child.up{background:#fff0f0;color:#d2454f}
.seconds-order-animation-meta span:first-child.down{background:#e7f7ee;color:#3d8c58}
.seconds-order-animation-price{align-items:baseline;margin-top:14px}
.seconds-order-animation-price strong{font-size:28px;font-variant-numeric:tabular-nums}
.seconds-order-animation-price span{font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
.seconds-order-animation-price .profit{color:#ef454b}.seconds-order-animation-price .loss{color:#148850}.seconds-order-animation-price .draw{color:#7a8490}
.seconds-order-animation-chart{height:190px;margin-top:12px;border:1px solid #edf1ef;border-radius:12px;background:#fbfcfc;overflow:hidden}
.seconds-order-animation-chart svg{display:block;width:100%;height:100%}
.animation-grid line{stroke:#e7ecea;stroke-width:1;stroke-dasharray:3 5}
.animation-open-line{stroke:#cbd5cf;stroke-width:1;stroke-dasharray:5 4}
.seconds-order-animation-chart polyline{fill:none;stroke:#7a8490;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;transition:stroke .18s ease}
.seconds-order-animation-panel footer{margin-top:11px;color:#87928d;font-size:11px}
.seconds-order-animation-panel footer button{border:0;background:transparent;color:#148850;font:inherit;font-weight:800;cursor:pointer}
@media(max-width:430px){
  .seconds-order-animation{padding:12px 10px}
  .seconds-order-animation-panel{width:calc(100vw - 20px);padding:15px 14px 12px}
  .seconds-order-animation-price strong{font-size:24px}
  .seconds-order-animation-chart{height:164px}
}

.seconds-settlement-result{
  position:fixed;
  inset:0;
  z-index:90;
  display:grid;
  place-items:center;
  padding:18px 14px;
  background:#17231d26;
}
.seconds-settlement-result-panel{
  width:min(560px,calc(100vw - 28px));
  padding:20px 20px 16px;
  border:1px solid #e5ebe8;
  border-radius:18px;
  background:#fff;
  box-shadow:0 18px 55px #1b302744;
}
.seconds-settlement-result-panel header,
.seconds-settlement-status,
.seconds-settlement-result-panel footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.seconds-settlement-result-panel header small{color:#7a8790;font-size:11px}
.seconds-settlement-result-panel header h2{margin:4px 0 0;color:#1f2b34;font-size:20px}
.seconds-settlement-result-panel header button{width:30px;height:30px;border:0;border-radius:50%;background:#f3f5f6;color:#69757e;font-size:22px;line-height:1;cursor:pointer}
.seconds-settlement-status{margin-top:18px;align-items:baseline}
.seconds-settlement-status strong{font-size:18px}
.seconds-settlement-status span{color:#7b8790;font-size:12px}
.seconds-settlement-status.profit strong,.seconds-settlement-profit.profit{color:#ef454b}
.seconds-settlement-status.loss strong,.seconds-settlement-profit.loss{color:#148850}
.seconds-settlement-status.draw strong,.seconds-settlement-profit.draw{color:#7a8490}
.seconds-settlement-profit{margin-top:16px;font-size:30px;font-weight:800;font-variant-numeric:tabular-nums}
.seconds-settlement-profit small{font-size:13px;font-weight:800}
.seconds-settlement-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px;padding-top:16px;border-top:1px solid #edf1ef}
.seconds-settlement-grid span,.seconds-settlement-grid strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.seconds-settlement-grid span{color:#87928d;font-size:11px}
.seconds-settlement-grid strong{margin-top:5px;color:#39454d;font-size:13px;font-variant-numeric:tabular-nums}
.seconds-settlement-result-panel footer{justify-content:flex-end;margin-top:20px}
.seconds-settlement-result-panel footer button{min-width:82px;padding:9px 14px;border:1px solid #dce5df;border-radius:8px;background:#fff;color:#148850;font-size:13px;font-weight:800;cursor:pointer}
.seconds-settlement-result-panel footer button:last-child{border-color:#148850;background:#148850;color:#fff}
@media(max-width:430px){
  .seconds-settlement-result-panel{width:calc(100vw - 20px);padding:16px 14px 14px}
  .seconds-settlement-profit{font-size:26px}
  .seconds-settlement-grid{gap:8px}
  .seconds-settlement-grid strong{font-size:12px}
}

/* Extra-tight mobile scale for older phones. */
@media (max-width: 700px) {
  .seconds-header {
    height: 68px;
  }

  .seconds-header .back-button {
    left: 12px;
    top: 11px;
    width: 38px;
    height: 38px;
  }

  .seconds-header select {
    width: min(230px, 64vw);
    padding: 0 18px;
    font-size: 18px;
  }

  .seconds-stat-card {
    min-height: 132px;
    margin: 6px 12px 18px;
  }

  .seconds-main-price {
    padding-left: 16px;
    padding-right: 6px;
  }

  .seconds-main-price strong {
    font-size: 20px;
    line-height: 1.25;
  }

  .seconds-main-price span {
    margin-top: 3px;
    font-size: 14px;
  }

  .seconds-stats-grid {
    padding: 12px 10px 12px 16px;
    gap: 6px 10px;
  }

  .seconds-stats-grid::before {
    top: 47px;
  }

  .seconds-stats-grid span {
    font-size: 11px;
  }

  .seconds-stats-grid strong {
    font-size: 13px;
  }

  .seconds-trend-tabs {
    gap: 12px;
    margin: 0 10px 6px;
    font-size: 16px;
  }

  .seconds-kline {
    height: 242px;
    margin-bottom: 52px;
  }

  .seconds-orders {
    padding: 0 14px 18px;
  }

  .seconds-orders h2 {
    margin-bottom: 18px;
    font-size: 18px;
  }

  .seconds-orders h2::before,
  .seconds-orders h2::after {
    width: 42px;
    margin-inline: 7px;
  }

  .seconds-bottom-actions {
    gap: 10px;
    padding: 8px 12px;
  }

  .seconds-bottom-actions button {
    height: 44px;
    font-size: 16px;
    border-radius: 8px;
  }

  #seconds-dialog {
    width: calc(100vw - 14px);
    max-width: none;
  }

  .seconds-modal {
    padding: 12px 12px 10px;
    border-radius: 16px;
  }

  .seconds-modal-head {
    font-size: 16px;
  }

  .seconds-modal-head b {
    padding: 3px 8px;
    font-size: 14px;
  }

  .seconds-modal-head button {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .seconds-modal-divider {
    margin: 10px 0;
  }

  .seconds-field-title {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .seconds-periods {
    gap: 5px;
  }

  .seconds-periods button {
    min-height: 108px;
    padding: 12px 4px 7px;
    border-radius: 8px;
    font-size: 18px;
  }

  .seconds-periods button small {
    font-size: 10px;
  }

  .seconds-periods button span,
  .seconds-periods button em {
    font-size: 11px;
    line-height: 1.25;
  }

  .seconds-periods button span {
    margin-top: 9px;
  }

  .seconds-periods button span b {
    font-size: 14px;
  }

  .seconds-balance-row {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .seconds-amount-row {
    grid-template-columns: 30px minmax(0, 1fr) 30px 42px 42px;
  }

  .seconds-amount-row button,
  .seconds-amount-row input {
    height: 42px;
    font-size: 14px;
  }

  .seconds-amount-row input {
    padding-inline: 8px;
  }

  .seconds-estimate {
    margin: 10px 0 12px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .seconds-estimate strong {
    font-size: 14px;
  }

  #seconds-submit {
    height: 44px;
    font-size: 17px;
  }

  .seconds-order-animation {
    padding: 8px 6px;
  }

  .seconds-order-animation-panel {
    width: calc(100vw - 12px);
    margin-top: 10px;
    padding: 12px 10px 10px;
    border-radius: 14px;
  }

  .seconds-order-animation-panel header strong {
    font-size: 15px;
  }

  .seconds-order-animation-price {
    margin-top: 10px;
  }

  .seconds-order-animation-price strong {
    font-size: 20px;
  }

  .seconds-order-animation-chart {
    height: 138px;
    margin-top: 10px;
  }

  .seconds-settlement-result {
    padding: 8px 6px;
  }

  .seconds-settlement-result-panel {
    width: calc(100vw - 12px);
    padding: 12px 10px 10px;
    border-radius: 14px;
  }

  .seconds-settlement-result-panel header h2 {
    font-size: 16px;
  }

  .seconds-settlement-status {
    margin-top: 12px;
  }

  .seconds-settlement-status strong {
    font-size: 15px;
  }

  .seconds-settlement-profit {
    margin-top: 12px;
    font-size: 22px;
  }

  .seconds-settlement-grid {
    margin-top: 12px;
    padding-top: 12px;
    gap: 8px;
  }

  .seconds-settlement-grid span {
    font-size: 10px;
  }

  .seconds-settlement-grid strong {
    font-size: 11px;
  }

  .seconds-settlement-result-panel footer {
    margin-top: 14px;
  }

  .seconds-settlement-result-panel footer button {
    min-width: 72px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .seconds-stat-card {
    min-height: 126px;
    margin: 5px 10px 16px;
  }

  .seconds-main-price strong {
    font-size: 18px;
  }

  .seconds-main-price span {
    font-size: 13px;
  }

  .seconds-trend-tabs {
    gap: 10px;
    font-size: 15px;
  }

  .seconds-kline {
    height: 224px;
    margin-bottom: 46px;
  }

  .seconds-orders h2 {
    font-size: 17px;
  }

  .seconds-periods button {
    min-height: 100px;
    font-size: 16px;
  }

  .seconds-order-animation-panel {
    padding: 11px 9px 9px;
  }

  .seconds-order-animation-chart {
    height: 128px;
  }

  .seconds-settlement-result-panel {
    padding: 11px 9px 9px;
  }

  .seconds-settlement-profit {
    font-size: 20px;
  }
}

/* Compact the post-order overlay while keeping the price movement readable. */
.seconds-order-animation-panel{width:min(440px,calc(100vw - 44px));padding:15px 16px 12px}
.seconds-order-animation-chart{height:154px}
.seconds-periods button em{font-size:16px;font-style:normal;font-weight:700}
@media(max-width:700px){
  .seconds-order-animation{padding:10px 18px}
  .seconds-order-animation-panel{width:min(390px,calc(100vw - 36px));margin-top:8px;padding:12px 13px 10px;border-radius:13px}
  .seconds-order-animation-meta{margin-top:10px}
  .seconds-order-animation-price{margin-top:8px}
  .seconds-order-animation-chart{height:118px;margin-top:8px}
  .seconds-order-animation-panel footer{margin-top:8px}
  .seconds-periods button em{font-size:15px;line-height:1.35}
}
@media(max-width:360px){.seconds-order-animation-panel{width:calc(100vw - 28px)}.seconds-order-animation-chart{height:104px}.seconds-periods button em{font-size:14px}}

/* Last mobile pass: keep the order form above an iPhone keyboard. */
@media(max-width:430px){
  #seconds-dialog{
    width:min(84vw,500px)!important;
    max-width:min(84vw,500px)!important;
    max-height:calc(100dvh - 16px);
    margin:8px auto;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }

  .seconds-modal{padding:12px 10px 12px!important}
  .seconds-modal-head{font-size:16px!important}
  .seconds-modal-head b{padding:3px 7px!important;font-size:13px!important}
  .seconds-modal-divider{margin:9px 0!important}
  .seconds-field-title{margin-bottom:6px!important;font-size:12px!important}
  .seconds-periods{gap:6px!important;padding-bottom:5px!important;scrollbar-width:none}
  .seconds-periods::-webkit-scrollbar{display:none}
  .seconds-periods button{flex-basis:calc((100% - 12px) / 3)!important;min-height:104px!important;padding:10px 3px 6px!important;font-size:17px!important}
  .seconds-periods button .seconds-period-value{min-height:21px!important}
  .seconds-periods button small,.seconds-periods button span,.seconds-periods button em{font-size:11px!important;line-height:1.2!important}
  .seconds-periods button span,.seconds-periods button span:not(.seconds-period-value){min-height:0!important;margin-top:6px!important}
  .seconds-periods button span b{font-size:14px!important}
  .seconds-periods button em{min-height:0!important;margin-top:3px!important}
  .seconds-balance-row{margin-bottom:8px!important;font-size:12px!important}
  .seconds-amount-row{grid-template-columns:28px minmax(0,1fr) 28px 42px 42px!important}
  .seconds-amount-row button,.seconds-amount-row input{height:40px!important;font-size:16px!important}
  .seconds-amount-row input{padding-inline:6px!important}
  .seconds-estimate{margin:8px 0 10px!important;padding:8px 10px!important;font-size:12px!important}
  .seconds-estimate strong{font-size:14px!important}
  #seconds-submit{height:42px!important;margin-top:0!important;font-size:16px!important}
}

@media(max-width:360px){
  .seconds-periods button{min-height:96px!important;font-size:16px!important}
  .seconds-amount-row{grid-template-columns:27px minmax(0,1fr) 27px 39px 39px!important}
}

/* Keep the minimum amount prominent like the reference layout. */
.seconds-periods button em{
  display:block;
  margin-top:5px!important;
  color:#4d5660;
  font-size:15px!important;
  font-style:normal;
  font-weight:700!important;
  line-height:1.25!important;
  white-space:nowrap;
}

@media(max-width:430px){
  .seconds-periods button em{
    font-size:14px!important;
  }
}

@media(max-width:360px){
  .seconds-periods button em{
    font-size:13px!important;
  }
}

/* Keep amount actions horizontal on narrow iPhone screens. */
@media(max-width:700px){
  .seconds-amount-row{
    grid-template-columns:32px minmax(0,1fr) 32px 52px 52px!important;
    min-width:0!important;
  }

  .seconds-amount-row button{
    min-width:0!important;
    padding:0 3px!important;
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow:hidden;
    writing-mode:horizontal-tb!important;
  }
}

@media(max-width:360px){
  .seconds-amount-row{
    grid-template-columns:30px minmax(0,1fr) 30px 50px 50px!important;
  }

  .seconds-amount-row button{
    font-size:15px!important;
  }
}

/* Match the reference sheet on every phone-sized viewport, including scaled Safari views. */
@media(max-width:700px){
  #seconds-dialog{
    width:min(80vw,500px)!important;
    max-width:min(80vw,500px)!important;
    margin:8px auto!important;
  }

  .seconds-modal-head{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:12px!important;
  }

  .seconds-modal-head>div{
    min-width:0;
    flex:1 1 auto;
  }

  .seconds-modal-head button{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    color:#6f7884!important;
    font-size:16px!important;
    line-height:1.25!important;
    white-space:nowrap!important;
  }

  .seconds-periods::-webkit-scrollbar{
    display:none;
  }
}

/* Match the reference hierarchy: duration first, return second, minimum last. */
.seconds-periods button .seconds-period-value{
  position:relative;
  z-index:3;
  display:inline-flex!important;
  align-items:baseline;
  justify-content:center;
  min-height:34px!important;
  color:#4e5660;
  font-size:27px!important;
  font-weight:500;
  line-height:1!important;
}

.seconds-periods button .seconds-period-value small{
  position:relative;
  z-index:3;
  margin-left:2px;
  color:#69727c;
  font-size:13px!important;
  font-weight:400;
}

.seconds-periods button>span:not(.seconds-period-value){
  margin-top:12px!important;
  color:#747c84!important;
  font-size:14px!important;
  font-weight:400!important;
  line-height:1.25!important;
}

.seconds-periods button>span:not(.seconds-period-value) b{
  color:#d24752!important;
  font-size:20px!important;
  font-weight:500!important;
}

.seconds-periods button em{
  margin-top:7px!important;
  color:#4d5660!important;
  font-size:15px!important;
  font-weight:700!important;
}

@media(max-width:700px){
  .seconds-periods button .seconds-period-value{
    min-height:29px!important;
    font-size:23px!important;
  }

  .seconds-periods button .seconds-period-value small{
    font-size:11px!important;
  }

  .seconds-periods button>span:not(.seconds-period-value){
    margin-top:9px!important;
    font-size:12px!important;
  }

  .seconds-periods button>span:not(.seconds-period-value) b{
    font-size:17px!important;
  }

  .seconds-periods button em{
    margin-top:5px!important;
    font-size:14px!important;
  }
}

@media(max-width:360px){
  .seconds-periods button .seconds-period-value{
    font-size:21px!important;
  }

  .seconds-periods button>span:not(.seconds-period-value) b{
    font-size:16px!important;
  }

  .seconds-periods button em{
    font-size:13px!important;
  }
}
