#headerStudyPoints {
  font:
    700 11px system-ui,
    sans-serif;
  white-space: nowrap;
  color: #d5bf86;
  margin-left: 5px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.study-points-dialog {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 22px;
  border: 1px solid #d5bf864d;
  border-radius: 22px;
  background: #111c2cf7;
  color: #f4eddf;
  box-sizing: border-box;
  font:
    14px/1.6 system-ui,
    sans-serif;
  overflow: auto;
}
.study-points-dialog::backdrop {
  background: #070d1ab8;
}
.study-points-dialog [hidden] {
  display: none !important;
}
.study-points-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.study-points-dialog h2 {
  margin: 0;
  font-size: 18px;
}
.study-points-dialog button {
  font: inherit;
  color: inherit;
  min-height: 44px;
  border: 1px solid #d5bf8645;
  border-radius: 10px;
  background: #ffffff08;
  padding: 8px 12px;
  cursor: pointer;
}
.study-points-dialog header button {
  font-size: 24px;
  line-height: 1;
  min-width: 44px;
}
.study-points-dialog button:focus-visible {
  outline: 2px solid #e3cc8c;
  outline-offset: 2px;
}
.study-points-dialog .points-total {
  font-size: 36px;
  font-weight: 750;
  margin: 14px 0 0;
  color: #e6d29a;
  font-variant-numeric: tabular-nums;
}
.points-earned {
  font-size: 13px;
  margin: 4px 0 14px;
  color: #d2c4aa;
  font-variant-numeric: tabular-nums;
}
.points-pending {
  font-size: 12px;
  margin: 0 0 14px;
  color: #d2c4aa;
}
.points-pending:empty {
  display: none;
}
.points-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}
.points-tabs button {
  flex: 1;
}
.points-tabs [aria-pressed="true"] {
  border-color: #d5bf86;
  background: #d5bf861c;
}
.study-points-dialog h3 {
  font-size: 13px;
  color: #cfc8ba;
  margin: 14px 0;
}
.points-history {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 40dvh;
  overflow: auto;
}
.points-history li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #ffffff14;
  gap: 16px;
}
.points-history li > div {
  min-width: 0;
}
.points-history strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.points-history small,
.points-history time {
  display: block;
  font-size: 11px;
  color: #c1c6ce;
  overflow-wrap: anywhere;
}
.points-history li > span {
  white-space: nowrap;
  color: #e6d29a;
  font-size: 17px;
  font-weight: 700;
}
.points-empty,
.points-methods p {
  font-size: 13px;
  color: #d2d5dd;
}
.points-methods .points-method-value {
  font-size: 18px;
  color: #e6d29a;
  font-weight: 700;
}
.study-points-dialog footer {
  margin-top: 18px;
}
.study-points-dialog footer button {
  width: 100%;
}
.study-points-dialog footer p {
  font-size: 11px;
  margin: 8px 0 0;
  color: #c1c6ce;
}
/* The balance wears the casino's chip, the same mark as the カジノ tab. */
#headerStudyPoints::before{content:"";display:inline-block;width:11px;height:11px;margin-right:3px;vertical-align:-1.5px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5bf86' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='5.4'/%3E%3Cpath d='M12 2v3.6M12 18.4V22M2 12h3.6M18.4 12H22'/%3E%3C/svg%3E") center/contain no-repeat;}

/* Lending points: the people, one person's standing, requests and history. */
.study-points-dialog .points-loans{display:block;width:100%;margin:4px 0 0;}
.people-loans{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 4px;}
.people-loans button{min-height:42px;border-radius:12px;}
/* The lending screen sits in the points dialog's frame (.study-points-dialog) and reuses its
   buttons, borders and gold numbers; only the pieces it adds are styled here. */
.loans-dialog h2{font-size:17px;overflow-wrap:anywhere;padding-right:8px;text-transform:none;letter-spacing:0;}
.loans-body{display:flex;flex-direction:column;gap:12px;margin-top:12px;}
.loans-balance{margin:0;color:#d2c4aa;font-size:12px;}
.loans-hint,.loans-empty{margin:0;color:#c1c6ce;font-size:12px;list-style:none;}
.loans-error{margin:0;color:#f1b4b4;font-size:12px;}.loans-error:empty{display:none;}
.loans-people{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;}
.study-points-dialog .loans-person{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:12px 14px;text-align:left;}
.loans-person b{font-size:15px;}
.loans-standing{font-size:12px;color:#c1c6ce;}.loans-standing.is-lent{color:#e6d29a;}.loans-standing.is-owe{color:#f1b4b4;}
.loans-badge{position:absolute;right:12px;top:12px;padding:0 8px;border-radius:999px;background:#d5bf86;color:#111c2c;font:700 10px/1.7 system-ui,sans-serif;font-style:normal;}
.loans-summary{padding:14px 0 4px;text-align:center;}
.loans-summary small{color:#cfc8ba;font-size:12px;}
.loans-summary strong{display:block;color:#e6d29a;font-size:36px;font-weight:750;line-height:1.3;font-variant-numeric:tabular-nums;}
.loans-summary.is-owe strong{color:#f1b4b4;}.loans-summary.is-even strong{color:#f4eddf;}
.loans-summary p{margin:0;color:#d2c4aa;font-size:12px;}
.loans-request{padding:12px;border:1px solid #d5bf86;border-radius:12px;background:#d5bf861c;}
.loans-request.is-mine{display:flex;align-items:center;justify-content:space-between;gap:10px;border-style:dashed;border-color:#d5bf8645;background:transparent;}
.loans-request p{margin:0;font-weight:700;}.loans-request.is-mine p{font-weight:400;font-size:12px;color:#d2c4aa;}
.loans-request small{display:block;margin-top:2px;color:#d2c4aa;font-size:12px;}
.loans-form{display:flex;flex-direction:column;gap:8px;}
.loans-form input{box-sizing:border-box;width:100%;min-height:44px;padding:8px 12px;border:1px solid #d5bf8645;border-radius:10px;background:#ffffff08;color:#f4eddf;font:inherit;}
.loans-form input[data-loan-amount]{font-size:20px;font-weight:700;text-align:right;color:#e6d29a;}
.loans-form input::placeholder{color:#8f97a3;font-weight:400;}
.loans-quick{display:flex;flex-wrap:wrap;gap:6px;}
.study-points-dialog .loans-quick button{flex:1 0 auto;min-height:34px;padding:4px 10px;border-radius:999px;font-size:12px;}
.loans-actions{display:flex;gap:8px;margin-top:8px;}.loans-actions.is-grid{display:grid;grid-template-columns:1fr 1fr;margin-top:2px;}
.loans-actions:not(.is-grid) button{flex:1;}
.study-points-dialog .loans-primary{border-color:#d5bf86;background:#d5bf862e;color:#f4eddf;font-weight:700;}
.study-points-dialog.loans-dialog button:disabled{opacity:.4;cursor:default;}
.loans-dialog .loans-title{margin:8px 0 0;}
.loans-history{margin:0;padding:0;list-style:none;}
.loans-history li{display:grid;grid-template-columns:1fr auto;gap:2px 12px;padding:12px 0;border-bottom:1px solid #ffffff14;}
.loans-history li span{font-size:14px;}.loans-history .is-in span{color:#e6d29a;}.loans-history .is-out span{color:#f1b4b4;}
.loans-history time{font-size:11px;color:#c1c6ce;white-space:nowrap;}
.loans-history small{grid-column:1/-1;font-size:11px;color:#c1c6ce;}
.study-points-dialog .loans-back{align-self:flex-start;border-color:transparent;background:transparent;color:#e6d29a;padding:8px 0;}
/* Lending: one form, its action chosen with tabs */
.loans-tabs{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;padding:3px;border:1px solid #d5bf8645;border-radius:12px;}
.study-points-dialog .loans-tab{min-height:38px;padding:4px 6px;border:0;border-radius:9px;background:transparent;color:#d2c4aa;font-size:13px;font-weight:700;}
.study-points-dialog .loans-tab[aria-selected=true]{background:#d5bf86;color:#111c2c;}
.loans-amount{display:flex;align-items:baseline;gap:6px;padding:0 12px;border:1px solid #d5bf8645;border-radius:10px;background:#ffffff08;}
.loans-amount input[data-loan-amount]{flex:1;min-width:0;border:0;background:transparent;padding:6px 0;}
.loans-amount span{color:#d2c4aa;font-size:14px;}
.loans-rates{display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.loans-rates:empty{display:none;}
.loans-rates span{color:#d2c4aa;font-size:12px;margin-right:2px;}
.study-points-dialog .loans-rates button{flex:1 0 auto;min-height:32px;padding:2px 8px;border-radius:999px;font-size:12px;}
.study-points-dialog .loans-rates button[aria-pressed=true]{border-color:#d5bf86;background:#d5bf862e;color:#f4eddf;font-weight:700;}
.loans-preview{margin:0;min-height:1.4em;color:#e6d29a;font-size:13px;}
.study-points-dialog .loans-go{min-height:48px;font-size:15px;}
.loans-loading{margin-top:4px !important;color:#8f97a3 !important;font-size:11px !important;}
/* A person as a talk, like LINE: header, a slim standing bar, bubbles, and the line to talk */
.study-points-dialog.is-talk{display:flex;flex-direction:column;width:min(480px,100vw);height:min(760px,100dvh);max-height:100dvh;padding:0;border-radius:18px;overflow:hidden;background:#0f1724;}
@media (max-width:520px){.study-points-dialog.is-talk{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;margin:0;border:0;border-radius:0;}}
.study-points-dialog.is-talk[open]{display:flex;}
.study-points-dialog .talk-head{flex:none;display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:calc(8px + env(safe-area-inset-top)) 10px 8px;background:#152033;border-bottom:1px solid #ffffff12;}
.talk-head h2{flex:1;min-width:0;margin:0;font-size:16px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.study-points-dialog .talk-back{min-width:36px;min-height:36px;padding:0;border:0;background:transparent;color:#f4eddf;font-size:26px;line-height:1;}
.talk-avatar{flex:none;width:34px !important;height:34px !important;border-radius:50%;overflow:hidden;}
.talk-initial{display:grid;place-items:center;background:#2c3a52;color:#f4eddf;font-weight:700;}
.study-points-dialog .talk-profile{min-height:30px;padding:2px 10px;border-radius:999px;font-size:12px;}
.study-points-dialog.is-talk .loans-summary{flex:none;display:flex;align-items:baseline;justify-content:center;gap:8px;padding:6px 12px;background:#111c2c;border-bottom:1px solid #ffffff0d;text-align:left;}
.study-points-dialog.is-talk .loans-summary strong{display:inline;font-size:15px;line-height:1.4;}
.study-points-dialog.is-talk .loans-summary p{font-size:12px;}
.study-points-dialog.is-talk .loans-error{flex:none;margin:6px 12px 0;}
.talk-log{flex:1;min-height:0;overflow-y:auto;margin:0;padding:10px 12px 14px !important;list-style:none;background:#1b2536;overscroll-behavior:contain;}
.study-points-dialog .talk-log li{display:flex;align-items:flex-end;gap:6px;padding:3px 0;border:0;grid-template-columns:none;}
.talk-day{justify-content:center;margin:10px 0 6px;}
.study-points-dialog .talk-log .talk-day{display:flex;justify-content:center;font-size:11px;color:#c1c6ce;}
.talk-day::before{content:none;}
.talk-row.is-mine{flex-direction:row-reverse;}
.talk-bubble,.talk-card{max-width:76%;padding:8px 12px;border-radius:18px;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;}
.talk-row.is-theirs .talk-bubble{background:#2e3a4f;color:#f4eddf;border-top-left-radius:6px;}
.talk-row.is-mine .talk-bubble{background:#06c755;color:#062611;border-top-right-radius:6px;}
.talk-card{border:1px solid #d5bf8666;background:#141e2e;color:#f4eddf;white-space:normal;}
.talk-row.is-mine .talk-card{border-color:#06c75566;}
.study-points-dialog .talk-card span{display:block;font-weight:700;font-size:13px;color:inherit;}
.talk-row.is-in .talk-card span{color:#e6d29a;}.talk-row.is-out .talk-card span{color:#f1b4b4;}
.talk-row.is-gift .talk-card{border-color:#d5bf86;background:#d5bf861f;}
.talk-card small{display:block;margin-top:2px;color:#c1c6ce;font-size:11px;}
.talk-card.loans-request{border-style:solid;}
.talk-card .loans-actions{margin-top:8px;}
.study-points-dialog .talk-log time{flex:none;font-size:10px;color:#9aa3b0;white-space:nowrap;}
.talk-sheet{flex:none;max-height:62dvh;overflow-y:auto;padding:12px;background:#111c2c;border-top:1px solid #d5bf8640;}
.talk-compose{flex:none;display:flex;align-items:center;gap:8px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:#152033;border-top:1px solid #ffffff12;}
.study-points-dialog .talk-plus{flex:none;width:38px;height:38px;padding:0;border-radius:50%;font-size:20px;line-height:1;}
.study-points-dialog .talk-plus[aria-expanded=true]{background:#d5bf86;color:#111c2c;}
.talk-compose input{flex:1;min-width:0;min-height:38px;padding:6px 14px;border:1px solid #ffffff1f;border-radius:999px;background:#0f1724;color:#f4eddf;font:inherit;}
.study-points-dialog .talk-send{flex:none;min-height:38px;padding:4px 14px;border-radius:999px;border-color:#06c755;background:#06c755;color:#062611;font-weight:700;}
.loans-last{display:block;max-width:100%;color:#9aa3b0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.admin-player-gift{display:flex;flex-direction:column;gap:8px;margin-top:16px;padding-top:12px;border-top:1px solid #ffffff1a;}
.admin-player-gift h4{margin:0;}
.admin-gift-actions{display:flex;gap:8px;}
.admin-gift-actions button{flex:1;}
.admin-gift-list{margin:0;padding:0;list-style:none;max-height:40dvh;overflow:auto;}
.admin-gift-list li{display:flex;flex-direction:column;padding:6px 0;border-bottom:1px solid #ffffff14;}
.admin-gift-list li small{opacity:.75;font-size:11px;}
.admin-gift-list li:not(.is-taken) small{color:#e6b45c;opacity:1;}
/* The casino's lines in the points history: a loss in a muted red. */
.points-history li.is-casino > span.is-minus {
  color: #f08a8a;
}
