/* CARD3D Flow (2026-10-30): sign in, My ornaments, Review and pay, and the pages after payment. */

/* My ornaments in the top bar, beside New: underlined while that page is showing */
#mine-btn[aria-current="page"] { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 420px) { .top-right { gap: 4px; } .top-right .btn.small { padding: 6px 10px; } }

/* sign in */
.signin-page { display: grid; place-items: start center; padding: 4vh 0 2rem; }
.si-card { width: min(440px, 100%); background: var(--sheet); border: 1px solid var(--crease-soft); border-radius: 16px; padding: 24px 24px 18px; box-shadow: 0 18px 40px rgba(16,43,69,.08); }
.si-card h1 { margin-bottom: .3rem; }
.si-form .field { margin: .4rem 0 .8rem; }
.si-code { letter-spacing: .4em; font-size: 1.3rem !important; text-align: center; font-variant-numeric: tabular-nums; }
.si-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.si-btns .btn.teal { flex: 1 1 auto; }
.si-error { color: var(--danger); margin: 0 0 .6rem; font-size: .92rem; }
.si-error:empty { display: none; }
.si-invite { margin-top: 1.2rem !important; padding-top: .8rem; border-top: 1px dashed var(--crease-soft); }

/* My ornaments */
.mine-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; margin-bottom: .8rem; }
.mine-head h1 { margin: -.12em 0 .2rem; }
.mine-head .lede { margin: 0; }
.mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.m-card { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--crease-soft); border-radius: 14px; overflow: hidden; }
.m-img { aspect-ratio: 4 / 3; width: 100%; border: 0; padding: 10px; margin: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #fff, var(--paper)); cursor: pointer; }
/* (2026-10-30) the ornament centered in its box: the picture fills the box and is centered inside it */
.m-img { position: relative; overflow: hidden; }
.m-img img[src] { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); max-width: none; max-height: none; object-fit: contain; object-position: 50% 50%; margin: 0; }
.m-img:disabled { cursor: default; }
.m-img:not(:disabled):hover img { transform: scale(1.03); }
.m-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s; }
.m-img img:not([src]) { width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--crease-soft); animation: m-wait 1.4s ease-in-out infinite; }
@keyframes m-wait { 50% { opacity: .45; } }
.m-noimg { font-size: .85rem; color: var(--ink-faint); }
@media (prefers-reduced-motion: reduce) { .m-img img:not([src]) { animation: none; } }
.m-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.m-title { font-size: 1.3rem; margin: 0; overflow-wrap: anywhere; }
.m-rename { width: 100%; padding: 6px 10px; border: 1px solid var(--teal); border-radius: var(--radius); font-size: 1rem; }
.m-meta { font-size: .84rem; color: var(--ink-soft); margin: 0; }
.m-status { margin: .3rem 0 0; }
.m-state { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--crease-soft); color: var(--ink-soft); }
.m-state.editing { background: var(--teal-wash); color: var(--teal-deep); }
.m-state.approved { background: var(--gold-wash); color: #7A5E10; }
.m-state.paid, .m-state.production { background: var(--ink); color: #fff; }
.m-state.shipped { background: var(--teal); color: #fff; }
.m-state.returned { background: var(--ember-wash); color: var(--danger); }
.m-note { font-size: .86rem; margin: .4rem 0 0; padding: 6px 10px; border-radius: 8px; background: var(--gold-wash); }
.m-where { font-size: .82rem; color: var(--ink-faint); margin: .3rem 0 0; }
.m-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: .7rem; }
.m-confirm { margin-top: auto; padding-top: .6rem; }
.m-confirm p { font-size: .88rem; margin: 0 0 .4rem; }
.btn.danger { color: var(--danger); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-solid:hover { background: #8f2d2d; }

/* Review and pay */
.pay-page .order-main > h1 { margin: -.12em 0 .3rem; }
.table-scroll { overflow-x: auto; }
.charges { width: 100%; border-collapse: collapse; font-size: .93rem; }
.charges th, .charges td { text-align: left; vertical-align: top; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--crease-soft); }
.charges thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; }
.charges tbody th { font-weight: 500; min-width: 9em; }
.charges td { color: var(--ink-soft); }
.charges .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); padding-right: 0; }
.charges tfoot th, .charges tfoot td { border-bottom: 0; font-weight: 600; padding-top: 10px; }
.ship-choices { margin-top: .4rem; }
.pay-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: .6rem 0; font-size: .9rem; }
.pay-facts dt { color: var(--ink-soft); margin: 0; }
.pay-facts dd { margin: 0; overflow-wrap: anywhere; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--crease-soft); padding-top: 8px; margin: .4rem 0 .8rem; }
.pay-total strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pay-go { width: 100%; margin-bottom: .5rem; }
.pay-go:disabled { opacity: .45; cursor: not-allowed; }
.pay-links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: .4rem; }
.pay-msg { max-width: 640px; }
.pay-msg .note { margin: .6rem 0; }
@media (max-width: 640px) {
  .charges thead { display: none; }
  .charges tbody tr { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: 1px solid var(--crease-soft); }
  .charges tbody th, .charges tbody td { border: 0; padding: 0; }
  .charges tbody td:not(.num) { grid-column: 1 / -1; grid-row: 2; font-size: .84rem; }
  .charges tbody td.num { grid-row: 1; grid-column: 2; }
}

/* the Beta Agreement (2026-11-02) */
/* the page fits the window, so I agree and Exit are always on screen; only the agreement scrolls */
.terms-page:not(.terms-exit) { display: flex; flex-direction: column; height: calc(100vh - 96px); height: calc(100dvh - 96px); min-height: 380px; }
.terms-page { max-width: 760px; margin: 0 auto; }
.terms-page h1 { margin-bottom: 0; }
.terms-lead { max-width: none; font-weight: 600; font-size: .86rem; line-height: 1.35; margin: .5rem 0; }
.terms-text { flex: 1 1 0; min-height: 120px; overflow-y: auto; padding: 14px 18px; background: var(--sheet); border: 1px solid var(--crease); border-radius: 8px; font-size: .92rem; }
.terms-text p { max-width: none; margin: 0 0 .7rem; }
.terms-text ol { padding-left: 1.5rem; margin: 0 0 .7rem; }
.terms-text ol[type="a"] { list-style-type: lower-alpha; }
.terms-btns .btn.quiet { flex: 0 0 auto; }
