.np-app,
.write-app,
.calc-app,
.cal-app,
.card-app,
.charmap-app,
.clip-app {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--face, #c0c0c0);
  color: var(--text, #000);
  font-family: var(--font-ui), Arial, sans-serif;
  font-size: 13px;
  line-height: 1.2;
}
.np-app [hidden],
.write-app [hidden],
.calc-app [hidden],
.cal-app [hidden],
.card-app [hidden],
.charmap-app [hidden],
.clip-app [hidden] {
  display: none !important;
}
.prod-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 9px 0;
  min-width: 0;
  justify-content: space-between;
}
.prod-form-row > input:not([type="checkbox"]),
.prod-form-row > select,
.prod-form-row > textarea {
  width: 220px;
  max-width: 65%;
  min-width: 0;
  box-sizing: border-box;
}
.prod-form-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 12px 0;
}
.prod-form-options label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.prod-form-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  margin: 12px 0 6px;
}
.prod-dialog-result {
  min-height: 20px;
  margin-top: 8px;
}
.prod-font-sample {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 95px;
  background: var(--window, #fff);
  overflow: hidden;
  margin-top: 15px;
}
.np-editor {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 3px 4px;
  border: 0;
  background: var(--window, #fff);
  color: var(--text, #000);
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.25;
  resize: none;
  outline: none;
  white-space: pre;
  tab-size: 8;
  overflow: auto;
}
.np-editor[wrap="soft"] {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.np-status,
.write-status,
.cal-status,
.card-status,
.charmap-status,
.clip-status {
  flex: none;
  min-height: 19px;
  box-sizing: border-box;
  padding: 2px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.write-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  flex: none;
  min-height: 29px;
  overflow-x: auto;
  white-space: nowrap;
}
.write-font-select {
  width: 155px;
  flex: none;
  height: 24px;
}
.write-size-select {
  width: 48px;
  flex: none;
  height: 24px;
}
.write-tool {
  min-width: 28px !important;
  width: 28px;
  height: 24px;
  padding: 0 3px !important;
  flex: none;
  line-height: 18px;
}
.write-tool:last-child {
  width: auto;
  min-width: 45px !important;
}
.write-bold {
  font-weight: bold !important;
}
.write-italic {
  font-style: italic;
}
.write-underline {
  text-decoration: underline;
}
.write-tool.is-pressed {
  border-color: #000 #fff #fff #000;
  box-shadow: inset 1px 1px #808080;
  background: #dedede;
}
.write-tool-divider {
  height: 23px;
  width: 2px;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  margin: 0 3px;
}
.write-align-left {
  text-align: left !important;
}
.write-align-center {
  text-align: center !important;
}
.write-align-right {
  text-align: right !important;
}
.write-ruler {
  height: 22px;
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 0 21px;
  background: repeating-linear-gradient(
    to right,
    transparent 0 9px,
    #808080 9px 10px,
    transparent 10px 19px,
    #000 19px 20px
  );
  background-size: auto 5px;
  background-repeat: repeat-x;
  background-position: bottom;
  background-color: var(--face, #c0c0c0);
  font:
    11px Arial,
    sans-serif;
  color: #000;
}
.write-ruler span {
  min-width: 6px;
  text-align: center;
  background: var(--face, #c0c0c0);
  padding: 0 2px;
}
.write-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #808080;
  padding: 10px;
  box-sizing: border-box;
}
.write-paper {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 680px;
  min-height: 100%;
  background: var(--window, #fff);
  color: var(--text, #000);
  padding: 28px 34px;
  box-shadow: 2px 2px #404040;
  transform-origin: top center;
}
.write-document {
  min-height: 270px;
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    16px/1.35 "Times New Roman",
    serif;
  color: var(--text, #000);
  tab-size: 8;
}
.write-document p {
  margin: 0 0 0.6em;
}
.write-document div {
  min-height: 1em;
}
.write-document ul,
.write-document ol {
  padding-left: 2em;
}
.write-viewport.write-normal {
  padding: 0;
  background: var(--window, #fff);
}
.write-normal .write-paper {
  max-width: none;
  box-shadow: none;
  padding: 8px !important;
}
.calc-app {
  padding: 7px;
  gap: 5px;
  overflow: auto;
  align-items: stretch;
  font-size: 12px;
}
.calc-expression {
  height: 15px;
  min-height: 15px;
  text-align: right;
  font:
    11px "Courier New",
    monospace;
  white-space: nowrap;
  overflow: hidden;
  color: #404040;
}
.calc-display-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  flex: none;
}
.calc-memory-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 25px;
  height: 27px;
  border: 1px solid #808080;
  font-size: 13px;
}
.calc-display {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 32px;
  box-sizing: border-box;
  padding: 3px 7px;
  color: #000;
  background: #fff;
  text-align: right;
  font:
    20px/24px "Courier New",
    monospace;
  outline: none;
  cursor: text;
}
.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: none;
}
.calc-memory-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.calc-clear-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 5px;
}
.calc-key {
  min-width: 0 !important;
  height: 33px;
  padding: 2px 4px !important;
  font:
    13px var(--font-ui),
    Arial,
    sans-serif;
  white-space: nowrap;
  user-select: none;
  touch-action: manipulation;
}
.calc-key:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -5px;
}
.calc-memory-key,
.calc-control-key,
.calc-operator {
  color: #800000 !important;
}
.calc-digit {
  color: #000080 !important;
}
.calc-science-key {
  color: #000080 !important;
  font-size: 12px;
}
.calc-body {
  display: flex;
  gap: 7px;
  flex: 1;
  min-height: 140px;
}
.calc-main-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(30px, 1fr));
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.calc-main-grid .calc-key {
  height: auto;
  min-height: 30px;
}
.calc-scientific-grid {
  display: none;
}
.calc-scientific .calc-scientific-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(21px, 1fr));
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.calc-scientific-grid .calc-key {
  height: auto;
  min-height: 21px;
  padding: 0 1px !important;
}
.calc-sci-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 13px;
  flex: none;
  border: 1px solid #808080;
  padding: 3px;
}
.calc-angle-options,
.calc-base-options {
  display: flex;
  gap: 5px;
}
.calc-sci-options label {
  display: flex;
  align-items: center;
  gap: 1px;
}
.calc-sci-options input {
  margin: 0 2px 0 0;
  width: 12px;
  height: 12px;
}
.calc-status {
  height: 14px;
  flex: none;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.calc-app:not(.calc-scientific) {
  align-items: center;
}
.calc-app:not(.calc-scientific) > .calc-expression,
.calc-app:not(.calc-scientific) > .calc-display-row,
.calc-app:not(.calc-scientific) > .calc-controls,
.calc-app:not(.calc-scientific) > .calc-body,
.calc-app:not(.calc-scientific) > .calc-status {
  width: 100%;
  max-width: 330px;
}
.calc-history {
  max-height: 280px;
  overflow: auto;
  background: #fff;
  padding: 3px;
}
.calc-history-item {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 5px;
  font-family: "Courier New", monospace;
  font-size: 13px;
}
.calc-history-item:hover,
.calc-history-item:focus {
  background: var(--selection, #000080);
  color: var(--selection-text, #fff);
}
.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  flex: none;
}
.cal-toolbar > .win-button {
  min-width: 28px;
  padding: 2px 7px;
}
.cal-month-title {
  flex: 1;
  font-weight: bold;
  min-width: 0 !important;
}
.cal-toolbar > .win-select {
  width: 73px;
}
.cal-main {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 7px;
  padding: 4px 6px 6px;
}
.cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 23px repeat(6, minmax(25px, 1fr));
  gap: 1px;
  flex: 1.12;
  min-width: 0;
  background: #808080;
  padding: 1px;
}
.cal-weekday {
  background: var(--face, #c0c0c0);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  font-weight: bold;
}
.cal-day {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: var(--window, #fff);
  color: var(--text, #000);
  font:
    13px var(--font-ui),
    Arial,
    sans-serif;
  text-align: left;
  padding: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: default;
  outline-offset: -3px;
  overflow: hidden;
}
.cal-day:hover {
  background: #e0e0e0;
}
.cal-day.cal-selected {
  background: var(--selection, #000080);
  color: var(--selection-text, #fff);
}
.cal-day.cal-outside:not(.cal-selected) {
  background: #dedede;
  color: #777;
}
.cal-day.cal-today .cal-day-number {
  font-weight: bold;
  text-decoration: underline;
}
.cal-day-marker {
  font:
    10px Arial,
    sans-serif;
  color: #800000;
  align-self: flex-end;
}
.cal-selected .cal-day-marker {
  color: #fff;
}
.cal-agenda {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cal-agenda-title {
  font-weight: bold;
  padding: 5px 2px 7px;
  font-size: 12px;
  text-align: center;
  min-height: 25px;
  box-sizing: border-box;
}
.cal-appointments {
  flex: 1;
  min-height: 0;
  background: var(--window, #fff);
  overflow: auto;
  padding: 0;
}
.cal-event {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-height: 35px;
  padding: 6px 3px;
  border-bottom: 1px solid #c0c0c0;
  font-size: 12px;
  cursor: default;
}
.cal-event input {
  margin: 1px 1px 0 0;
  width: 12px;
  height: 12px;
  flex: none;
}
.cal-event-time {
  width: 60px;
  flex: none;
  white-space: nowrap;
  font-size: 11px;
}
.cal-event-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.cal-event-text small {
  display: block;
  font-size: 10px;
  color: #666;
  margin-top: 3px;
  max-height: 30px;
  overflow: hidden;
}
.cal-event.is-selected {
  background: var(--selection, #000080);
  color: var(--selection-text, #fff);
}
.cal-event.is-selected small {
  color: #dedede;
}
.cal-event-done .cal-event-text {
  text-decoration: line-through;
  color: #777;
}
.cal-alarm-mark {
  font-size: 12px;
  flex: none;
}
.cal-event-actions {
  display: flex;
  gap: 4px;
  padding-top: 6px;
}
.cal-event-actions button {
  flex: 1;
  min-width: 0;
  padding: 2px 3px;
}
.cal-empty {
  padding: 15px 10px;
  color: #555;
  font-size: 12px;
  line-height: 1.7;
}
.cal-day-view .cal-month {
  display: none;
}
.cal-day-view .cal-agenda-title {
  text-align: left;
  font-size: 14px;
  padding-left: 5px;
}
.cal-day-view .cal-event-time {
  width: 84px;
}
.cal-empty-slot {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #dedede;
  background: #fff;
  height: 30px;
  padding: 0 8px;
  cursor: default;
  color: #444;
  text-align: left;
  font:
    12px var(--font-ui),
    Arial,
    sans-serif;
}
.cal-empty-slot > span {
  width: 80px;
  flex: none;
}
.cal-empty-slot > i {
  height: 100%;
  border-left: 1px solid #c0c0c0;
  flex: 1;
}
.cal-empty-slot:focus {
  background: #eee;
  outline: 1px dotted #000;
  outline-offset: -2px;
}
.cal-notes-input {
  resize: vertical;
  min-height: 65px;
}
.cal-alarm-option {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 12px 0 0;
}
.cal-search-results {
  max-height: 260px;
  overflow: auto;
}
.cal-search-result {
  display: block;
  width: 100%;
  padding: 6px;
  text-align: left;
  border: 0;
  background: #fff;
  font:
    13px var(--font-ui),
    Arial,
    sans-serif;
}
.cal-search-result:focus,
.cal-search-result:hover {
  background: var(--selection, #000080);
  color: #fff;
}
.card-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  flex: none;
}
.card-toolbar > .win-button {
  min-width: 27px;
  padding: 2px 6px;
}
.card-counter {
  min-width: 57px;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
}
.card-filter {
  flex: 1;
  min-width: 50px;
  width: 120px;
}
.card-main {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 8px;
  padding: 5px 8px 9px;
}
.card-index {
  flex: 0 0 135px;
  min-width: 85px;
  max-width: 35%;
  overflow: auto;
  background: #fff;
}
.card-index-item {
  display: block;
  border: 0;
  width: 100%;
  background: #fff;
  color: #000;
  text-align: left;
  padding: 4px 5px;
  font:
    12px var(--font-ui),
    Arial,
    sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.card-index-item b {
  font-weight: normal;
}
.card-index-item.is-selected {
  background: var(--selection, #000080);
  color: var(--selection-text, #fff);
}
.card-no-results {
  font-size: 11px;
  color: #777;
  padding: 8px 4px;
}
.card-stack {
  min-width: 0;
  flex: 1;
  position: relative;
  padding: 9px 6px 0 0;
}
.card-stack:before,
.card-stack:after {
  content: "";
  position: absolute;
  background: #fff;
  border: 1px solid #777;
  z-index: 0;
  top: 3px;
  left: 6px;
  right: 0;
  bottom: 6px;
}
.card-stack:after {
  top: 6px;
  left: 3px;
  right: 3px;
  bottom: 3px;
}
.card-sheet {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  height: 100%;
  box-sizing: border-box;
  background: #fff;
  min-width: 0;
}
.card-tab {
  height: 9px;
  position: absolute;
  left: 8px;
  top: -9px;
  border: 1px solid #000;
  border-bottom: 0;
  background: #fff;
  width: 40%;
}
.card-heading {
  border: 0;
  border-bottom: 1px solid #800000;
  background: #fff;
  padding: 8px 8px 6px;
  width: 100%;
  box-sizing: border-box;
  font:
    bold 16px/20px "Courier New",
    monospace;
  outline: none;
  color: #000;
}
.card-text {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  outline: none;
  border: 0;
  padding: 4px 8px;
  background: repeating-linear-gradient(
    to bottom,
    #fff 0,
    #fff 21px,
    #bfcfe7 21px,
    #bfcfe7 22px
  );
  font:
    14px/22px "Courier New",
    monospace;
  color: #000;
}
.card-empty {
  position: absolute;
  inset: 75px 10px auto;
  text-align: center;
  color: #666;
  font-size: 12px;
  line-height: 1.7;
  pointer-events: none;
}
.card-list-view .card-stack {
  display: none;
}
.card-list-view .card-index {
  max-width: none;
  flex: 1;
}
.card-list-view .card-index-item {
  white-space: normal;
  padding: 7px;
  border-bottom: 1px solid #ddd;
}
.card-list-view .card-index-item b {
  display: block;
  font-weight: bold;
}
.card-list-view .card-index-item span {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.4;
  max-height: 32px;
  overflow: hidden;
}
.charmap-app {
  padding: 7px;
  gap: 7px;
}
.charmap-font-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
  min-height: 25px;
}
.charmap-font-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.charmap-font {
  width: 100%;
  min-width: 70px;
}
.charmap-set {
  width: 160px;
  max-width: 42%;
}
.charmap-main {
  display: flex;
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.charmap-grid {
  display: grid;
  grid-template-columns: repeat(16, minmax(19px, 1fr));
  grid-auto-rows: 25px;
  align-content: start;
  overflow: auto;
  min-width: 0;
  flex: 1;
  background: #808080;
  gap: 1px;
  padding: 1px;
}
.charmap-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #fff;
  color: #000;
  font: 17px/1 inherit;
  font-family: inherit;
  font-size: 17px;
  padding: 0;
  cursor: default;
  overflow: hidden;
}
.charmap-cell:hover {
  outline: 1px solid #000;
  outline-offset: -2px;
}
.charmap-cell.is-selected {
  background: var(--selection, #000080);
  color: var(--selection-text, #fff);
  outline: 1px dotted #fff;
  outline-offset: -3px;
}
.charmap-side {
  width: 77px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.charmap-preview {
  height: 78px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  background: #fff;
  overflow: hidden;
}
.charmap-description {
  white-space: pre-line;
  font:
    11px/1.4 var(--font-ui),
    Arial,
    sans-serif;
  min-height: 44px;
}
.charmap-side button {
  width: 100%;
  min-width: 0;
  padding: 3px;
}
.charmap-copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.charmap-collected {
  flex: 1;
  width: 100%;
  min-width: 0;
  font-size: 17px;
  height: 27px;
}
.charmap-status {
  padding-left: 2px;
  font-size: 11px;
}
.clip-toolbar {
  display: flex;
  gap: 5px;
  padding: 4px;
  flex: none;
}
.clip-toolbar button {
  padding: 2px 7px;
  min-width: 0;
}
.clip-view {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 4px 4px;
  background: #fff;
  display: flex;
}
.clip-text {
  width: 100%;
  height: 100%;
  flex: 1;
  box-sizing: border-box;
  padding: 6px;
  background: #fff;
  border: 0;
  color: #000;
  resize: none;
  outline: none;
  white-space: pre-wrap;
  font:
    14px/1.3 "Courier New",
    monospace;
}
.clip-text[wrap="off"] {
  white-space: pre;
}
.clip-files {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  padding: 4px;
}
.clip-file {
  display: block;
  border: 0;
  width: 100%;
  text-align: left;
  background: #fff;
  padding: 4px;
  font:
    13px var(--font-ui),
    Arial,
    sans-serif;
}
.clip-file:focus {
  background: var(--selection, #000080);
  color: #fff;
}
.clip-empty {
  margin: auto;
  padding: 25px;
  color: #777;
  font-size: 14px;
  text-align: center;
}
@media (max-width: 600px) {
  .charmap-grid {
    grid-template-columns: repeat(12, minmax(18px, 1fr));
  }
  .card-index {
    flex-basis: 105px;
  }
  .write-font-select {
    width: 125px;
  }
  .cal-main {
    gap: 4px;
    padding: 3px;
  }
  .cal-event-time {
    width: 48px;
    font-size: 10px;
  }
  .cal-event {
    gap: 2px;
    padding-left: 2px;
    font-size: 11px;
  }
  .calc-sci-options {
    gap: 4px 6px;
  }
}
